Loading Tiger Data, and populating missing table data (such as tabblock) Planned maintenance...

Why are current probes so expensive?

Inverse square law not accurate for non-point masses?

By what mechanism was the 2017 UK General Election called?

How does TikZ render an arc?

What is "Lambda" in Heston's original paper on stochastic volatility models?

How can I prevent/balance waiting and turtling as a response to cooldown mechanics

Vertical ranges of Column Plots in 12

Did pre-Columbian Americans know the spherical shape of the Earth?

Diophantine equation 3^a+1=3^b+5^c

The test team as an enemy of development? And how can this be avoided?

calculator's angle answer for trig ratios that can work in more than 1 quadrant on the unit circle

French equivalents of おしゃれは足元から (Every good outfit starts with the shoes)

As a dual citizen, my US passport will expire one day after traveling to the US. Will this work?

What is a more techy Technical Writer job title that isn't cutesy or confusing?

Should man-made satellites feature an intelligent inverted "cow catcher"?

How do Java 8 default methods hеlp with lambdas?

Does the main washing effect of soap come from foam?

Where did Ptolemy compare the Earth to the distance of fixed stars?

Plotting a Maclaurin series

Why not use the yoke to control yaw, as well as pitch and roll?

Do i imagine the linear (straight line) homotopy in a correct way?

Table formatting with tabularx?

Was the pager message from Nick Fury to Captain Marvel unnecessary?

malloc in main() or malloc in another function: allocating memory for a struct and its members



Loading Tiger Data, and populating missing table data (such as tabblock)



Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Tiger Census data of 2013Install PostGIS and TIGER Data in Ubuntu 12.04Extract city boundary from TIGER dataLoading Tiger & ACS Data Into CartoDBMissing files in Loader_Generate_Nation_Script for TIGER geocoderPopulating postgis tiger tablesCopy TIGER geocoder data to another machineTIGER shapefiles and ZCTAChange attribute table name in Tiger filepostgis moving tiger data





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















I'm working with postgis and followed many tutorials out there to try to use tiger data.



this one seems to be the best:



https://bluehatrecord.wordpress.com/2015/07/06/installing-the-tiger-geocoder-with-rhel-6-6-postgresql-9-4-postgis-2-1-7-and-the-tiger-2013-census-data/


To save time and make sure things are working, I reduced it to a smaller set of states to populate my Tiger data.



Looking in the output, I'm seeing things like this:



Unable to open tl_2016_44007_addr.shp or tl_2016_44007_addr.SHP.
tl_2016_44007_addr.dbf: shape (.shp) or index files (.shx) can not be opened, will just import attribute data.


and



Unable to open tl_2016_36019_featnames.shp or tl_2016_36019_featnames.SHP.
tl_2016_36019_featnames.dbf: shape (.shp) or index files (.shx) can not be opened, will just import attribute data.


and sometimes:



HTTP request sent, awaiting response... 304 Not Modified
File ‘www2.census.gov/geo/tiger/TIGER2016/PLACE/tl_2016_11_place.zip’ not modified on server. Omitting download.


I assume the second error means that it already downloaded the file, so it skipped it?



I ran the script again with just DC as a state, and even went with the author's example for a sanity check:



SELECT g.rating, ST_X(g.geomout) As lon, ST_Y(g.geomout) As lat, (addy).address As stno, (addy).streetname As street, (addy).streettypeabbrev As styp, (addy).location As city, (addy).stateabbrev As st, (addy).zip FROM geocode('1600 Pennsylvania Avenue Northwest, Washington, DC 20500') As g;


Success! I got back the matching data, which is good, but when I ran his second example to confirm:



SELECT g.*, ST_X(g.geomout) As lon,ST_Y(g.geomout) As lat,(addy).*, bg.tabblock_id AS FIPS FROM geocode('1600 Pennsylvania Avenue Northwest, Washington, DC 20500') As g
JOIN tabblock As bg
ON (g.geomout && bg.the_geom)
WHERE ST_Within (g.geomout, bg.the_geom);


it returned back 0 records. I did a select * from tabblock and it returned 0 records.



What table is that, and should it normally download based on the script?



If not, how is this table populated?










share|improve this question
















bumped to the homepage by Community 9 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















    1















    I'm working with postgis and followed many tutorials out there to try to use tiger data.



    this one seems to be the best:



    https://bluehatrecord.wordpress.com/2015/07/06/installing-the-tiger-geocoder-with-rhel-6-6-postgresql-9-4-postgis-2-1-7-and-the-tiger-2013-census-data/


    To save time and make sure things are working, I reduced it to a smaller set of states to populate my Tiger data.



    Looking in the output, I'm seeing things like this:



    Unable to open tl_2016_44007_addr.shp or tl_2016_44007_addr.SHP.
    tl_2016_44007_addr.dbf: shape (.shp) or index files (.shx) can not be opened, will just import attribute data.


    and



    Unable to open tl_2016_36019_featnames.shp or tl_2016_36019_featnames.SHP.
    tl_2016_36019_featnames.dbf: shape (.shp) or index files (.shx) can not be opened, will just import attribute data.


    and sometimes:



    HTTP request sent, awaiting response... 304 Not Modified
    File ‘www2.census.gov/geo/tiger/TIGER2016/PLACE/tl_2016_11_place.zip’ not modified on server. Omitting download.


    I assume the second error means that it already downloaded the file, so it skipped it?



    I ran the script again with just DC as a state, and even went with the author's example for a sanity check:



    SELECT g.rating, ST_X(g.geomout) As lon, ST_Y(g.geomout) As lat, (addy).address As stno, (addy).streetname As street, (addy).streettypeabbrev As styp, (addy).location As city, (addy).stateabbrev As st, (addy).zip FROM geocode('1600 Pennsylvania Avenue Northwest, Washington, DC 20500') As g;


    Success! I got back the matching data, which is good, but when I ran his second example to confirm:



    SELECT g.*, ST_X(g.geomout) As lon,ST_Y(g.geomout) As lat,(addy).*, bg.tabblock_id AS FIPS FROM geocode('1600 Pennsylvania Avenue Northwest, Washington, DC 20500') As g
    JOIN tabblock As bg
    ON (g.geomout && bg.the_geom)
    WHERE ST_Within (g.geomout, bg.the_geom);


    it returned back 0 records. I did a select * from tabblock and it returned 0 records.



    What table is that, and should it normally download based on the script?



    If not, how is this table populated?










    share|improve this question
















    bumped to the homepage by Community 9 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      1












      1








      1


      1






      I'm working with postgis and followed many tutorials out there to try to use tiger data.



      this one seems to be the best:



      https://bluehatrecord.wordpress.com/2015/07/06/installing-the-tiger-geocoder-with-rhel-6-6-postgresql-9-4-postgis-2-1-7-and-the-tiger-2013-census-data/


      To save time and make sure things are working, I reduced it to a smaller set of states to populate my Tiger data.



      Looking in the output, I'm seeing things like this:



      Unable to open tl_2016_44007_addr.shp or tl_2016_44007_addr.SHP.
      tl_2016_44007_addr.dbf: shape (.shp) or index files (.shx) can not be opened, will just import attribute data.


      and



      Unable to open tl_2016_36019_featnames.shp or tl_2016_36019_featnames.SHP.
      tl_2016_36019_featnames.dbf: shape (.shp) or index files (.shx) can not be opened, will just import attribute data.


      and sometimes:



      HTTP request sent, awaiting response... 304 Not Modified
      File ‘www2.census.gov/geo/tiger/TIGER2016/PLACE/tl_2016_11_place.zip’ not modified on server. Omitting download.


      I assume the second error means that it already downloaded the file, so it skipped it?



      I ran the script again with just DC as a state, and even went with the author's example for a sanity check:



      SELECT g.rating, ST_X(g.geomout) As lon, ST_Y(g.geomout) As lat, (addy).address As stno, (addy).streetname As street, (addy).streettypeabbrev As styp, (addy).location As city, (addy).stateabbrev As st, (addy).zip FROM geocode('1600 Pennsylvania Avenue Northwest, Washington, DC 20500') As g;


      Success! I got back the matching data, which is good, but when I ran his second example to confirm:



      SELECT g.*, ST_X(g.geomout) As lon,ST_Y(g.geomout) As lat,(addy).*, bg.tabblock_id AS FIPS FROM geocode('1600 Pennsylvania Avenue Northwest, Washington, DC 20500') As g
      JOIN tabblock As bg
      ON (g.geomout && bg.the_geom)
      WHERE ST_Within (g.geomout, bg.the_geom);


      it returned back 0 records. I did a select * from tabblock and it returned 0 records.



      What table is that, and should it normally download based on the script?



      If not, how is this table populated?










      share|improve this question
















      I'm working with postgis and followed many tutorials out there to try to use tiger data.



      this one seems to be the best:



      https://bluehatrecord.wordpress.com/2015/07/06/installing-the-tiger-geocoder-with-rhel-6-6-postgresql-9-4-postgis-2-1-7-and-the-tiger-2013-census-data/


      To save time and make sure things are working, I reduced it to a smaller set of states to populate my Tiger data.



      Looking in the output, I'm seeing things like this:



      Unable to open tl_2016_44007_addr.shp or tl_2016_44007_addr.SHP.
      tl_2016_44007_addr.dbf: shape (.shp) or index files (.shx) can not be opened, will just import attribute data.


      and



      Unable to open tl_2016_36019_featnames.shp or tl_2016_36019_featnames.SHP.
      tl_2016_36019_featnames.dbf: shape (.shp) or index files (.shx) can not be opened, will just import attribute data.


      and sometimes:



      HTTP request sent, awaiting response... 304 Not Modified
      File ‘www2.census.gov/geo/tiger/TIGER2016/PLACE/tl_2016_11_place.zip’ not modified on server. Omitting download.


      I assume the second error means that it already downloaded the file, so it skipped it?



      I ran the script again with just DC as a state, and even went with the author's example for a sanity check:



      SELECT g.rating, ST_X(g.geomout) As lon, ST_Y(g.geomout) As lat, (addy).address As stno, (addy).streetname As street, (addy).streettypeabbrev As styp, (addy).location As city, (addy).stateabbrev As st, (addy).zip FROM geocode('1600 Pennsylvania Avenue Northwest, Washington, DC 20500') As g;


      Success! I got back the matching data, which is good, but when I ran his second example to confirm:



      SELECT g.*, ST_X(g.geomout) As lon,ST_Y(g.geomout) As lat,(addy).*, bg.tabblock_id AS FIPS FROM geocode('1600 Pennsylvania Avenue Northwest, Washington, DC 20500') As g
      JOIN tabblock As bg
      ON (g.geomout && bg.the_geom)
      WHERE ST_Within (g.geomout, bg.the_geom);


      it returned back 0 records. I did a select * from tabblock and it returned 0 records.



      What table is that, and should it normally download based on the script?



      If not, how is this table populated?







      postgis postgis-2.0 tiger






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 7 '17 at 3:51









      PolyGeo

      54.1k1782246




      54.1k1782246










      asked Jul 6 '17 at 21:14









      NullHypothesisNullHypothesis

      1163




      1163





      bumped to the homepage by Community 9 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 9 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          The 304 error that you're getting is expected since you're re-running the script and the data has already been downloaded locally for most of the data sets and isn't deleted between runs.



          There seems to be two bugs in the function that generates the load script that provides the wrong URL for the tabblocks dataset, however.



          First, if you try to visit the tabblocks URL for the link in the script for it, you'll get a 404 error. In 2014 TIGER started adding the number 10 to the ZIP files. For example, it went from:



          http://www2.census.gov/geo/tiger/TIGER2016/TABBLOCK/tl_2016_25_tabblock.zip



          to



          http://www2.census.gov/geo/tiger/TIGER2016/TABBLOCK/tl_2016_25_tabblock10.zip



          This also applies to all the files within the zipped folder.



          Second, the command to move the data from the staging schema to the tiger_data schema is missing altogether.



          The following Python script can be used to fix both issues:



          state_file_path = 'path/to/your/script'
          with open(state_file_path, 'r') as file:
          script_data = file.read()

          script_data_correct_tabblock = script_data
          .replace('_tabblock.zip', '_tabblock10.zip')
          .replace('tl_2016_25_tabblock.dbf', 'tl_2016_25_tabblock10.dbf')
          .replace(
          '"ALTER TABLE tiger_staging.MA_tabblock RENAME geoid10 TO tabblock_id;"',
          '"ALTER TABLE tiger_staging.MA_tabblock RENAME geoid10 TO tabblock_id; SELECT loader_load_staged_data(lower('MA_tabblock'), lower('MA_tabblock'));"')

          with open(state_file_path, 'w') as file:
          file.write(script_data_correct_tabblock)





          share|improve this answer


























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "79"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f246704%2floading-tiger-data-and-populating-missing-table-data-such-as-tabblock%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            The 304 error that you're getting is expected since you're re-running the script and the data has already been downloaded locally for most of the data sets and isn't deleted between runs.



            There seems to be two bugs in the function that generates the load script that provides the wrong URL for the tabblocks dataset, however.



            First, if you try to visit the tabblocks URL for the link in the script for it, you'll get a 404 error. In 2014 TIGER started adding the number 10 to the ZIP files. For example, it went from:



            http://www2.census.gov/geo/tiger/TIGER2016/TABBLOCK/tl_2016_25_tabblock.zip



            to



            http://www2.census.gov/geo/tiger/TIGER2016/TABBLOCK/tl_2016_25_tabblock10.zip



            This also applies to all the files within the zipped folder.



            Second, the command to move the data from the staging schema to the tiger_data schema is missing altogether.



            The following Python script can be used to fix both issues:



            state_file_path = 'path/to/your/script'
            with open(state_file_path, 'r') as file:
            script_data = file.read()

            script_data_correct_tabblock = script_data
            .replace('_tabblock.zip', '_tabblock10.zip')
            .replace('tl_2016_25_tabblock.dbf', 'tl_2016_25_tabblock10.dbf')
            .replace(
            '"ALTER TABLE tiger_staging.MA_tabblock RENAME geoid10 TO tabblock_id;"',
            '"ALTER TABLE tiger_staging.MA_tabblock RENAME geoid10 TO tabblock_id; SELECT loader_load_staged_data(lower('MA_tabblock'), lower('MA_tabblock'));"')

            with open(state_file_path, 'w') as file:
            file.write(script_data_correct_tabblock)





            share|improve this answer






























              0














              The 304 error that you're getting is expected since you're re-running the script and the data has already been downloaded locally for most of the data sets and isn't deleted between runs.



              There seems to be two bugs in the function that generates the load script that provides the wrong URL for the tabblocks dataset, however.



              First, if you try to visit the tabblocks URL for the link in the script for it, you'll get a 404 error. In 2014 TIGER started adding the number 10 to the ZIP files. For example, it went from:



              http://www2.census.gov/geo/tiger/TIGER2016/TABBLOCK/tl_2016_25_tabblock.zip



              to



              http://www2.census.gov/geo/tiger/TIGER2016/TABBLOCK/tl_2016_25_tabblock10.zip



              This also applies to all the files within the zipped folder.



              Second, the command to move the data from the staging schema to the tiger_data schema is missing altogether.



              The following Python script can be used to fix both issues:



              state_file_path = 'path/to/your/script'
              with open(state_file_path, 'r') as file:
              script_data = file.read()

              script_data_correct_tabblock = script_data
              .replace('_tabblock.zip', '_tabblock10.zip')
              .replace('tl_2016_25_tabblock.dbf', 'tl_2016_25_tabblock10.dbf')
              .replace(
              '"ALTER TABLE tiger_staging.MA_tabblock RENAME geoid10 TO tabblock_id;"',
              '"ALTER TABLE tiger_staging.MA_tabblock RENAME geoid10 TO tabblock_id; SELECT loader_load_staged_data(lower('MA_tabblock'), lower('MA_tabblock'));"')

              with open(state_file_path, 'w') as file:
              file.write(script_data_correct_tabblock)





              share|improve this answer




























                0












                0








                0







                The 304 error that you're getting is expected since you're re-running the script and the data has already been downloaded locally for most of the data sets and isn't deleted between runs.



                There seems to be two bugs in the function that generates the load script that provides the wrong URL for the tabblocks dataset, however.



                First, if you try to visit the tabblocks URL for the link in the script for it, you'll get a 404 error. In 2014 TIGER started adding the number 10 to the ZIP files. For example, it went from:



                http://www2.census.gov/geo/tiger/TIGER2016/TABBLOCK/tl_2016_25_tabblock.zip



                to



                http://www2.census.gov/geo/tiger/TIGER2016/TABBLOCK/tl_2016_25_tabblock10.zip



                This also applies to all the files within the zipped folder.



                Second, the command to move the data from the staging schema to the tiger_data schema is missing altogether.



                The following Python script can be used to fix both issues:



                state_file_path = 'path/to/your/script'
                with open(state_file_path, 'r') as file:
                script_data = file.read()

                script_data_correct_tabblock = script_data
                .replace('_tabblock.zip', '_tabblock10.zip')
                .replace('tl_2016_25_tabblock.dbf', 'tl_2016_25_tabblock10.dbf')
                .replace(
                '"ALTER TABLE tiger_staging.MA_tabblock RENAME geoid10 TO tabblock_id;"',
                '"ALTER TABLE tiger_staging.MA_tabblock RENAME geoid10 TO tabblock_id; SELECT loader_load_staged_data(lower('MA_tabblock'), lower('MA_tabblock'));"')

                with open(state_file_path, 'w') as file:
                file.write(script_data_correct_tabblock)





                share|improve this answer















                The 304 error that you're getting is expected since you're re-running the script and the data has already been downloaded locally for most of the data sets and isn't deleted between runs.



                There seems to be two bugs in the function that generates the load script that provides the wrong URL for the tabblocks dataset, however.



                First, if you try to visit the tabblocks URL for the link in the script for it, you'll get a 404 error. In 2014 TIGER started adding the number 10 to the ZIP files. For example, it went from:



                http://www2.census.gov/geo/tiger/TIGER2016/TABBLOCK/tl_2016_25_tabblock.zip



                to



                http://www2.census.gov/geo/tiger/TIGER2016/TABBLOCK/tl_2016_25_tabblock10.zip



                This also applies to all the files within the zipped folder.



                Second, the command to move the data from the staging schema to the tiger_data schema is missing altogether.



                The following Python script can be used to fix both issues:



                state_file_path = 'path/to/your/script'
                with open(state_file_path, 'r') as file:
                script_data = file.read()

                script_data_correct_tabblock = script_data
                .replace('_tabblock.zip', '_tabblock10.zip')
                .replace('tl_2016_25_tabblock.dbf', 'tl_2016_25_tabblock10.dbf')
                .replace(
                '"ALTER TABLE tiger_staging.MA_tabblock RENAME geoid10 TO tabblock_id;"',
                '"ALTER TABLE tiger_staging.MA_tabblock RENAME geoid10 TO tabblock_id; SELECT loader_load_staged_data(lower('MA_tabblock'), lower('MA_tabblock'));"')

                with open(state_file_path, 'w') as file:
                file.write(script_data_correct_tabblock)






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited May 31 '18 at 0:05

























                answered May 30 '18 at 16:26









                BrideauBrideau

                325210




                325210






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f246704%2floading-tiger-data-and-populating-missing-table-data-such-as-tabblock%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Щит и меч (фильм) Содержание Названия серий | Сюжет |...

                    Венесуэла на летних Олимпийских играх 2000 Содержание Состав...

                    Meter-Bus Содержание Параметры шины | Стандартизация |...