census-postgres
census-postgres copied to clipboard
acs2009_5yr view_stored_by_tables.sql missing JOINS, duplicate views
Several census tables (B24121 to B24126) span multiple sequences and the corresponding views created in view_stored_by_tables are missing the relevant JOINs. There are also several hundred views which are duplicated (starting on line 46523 to EOF).
I have created a script that fixes these and the other acs2009_5yr issues #3 #4 #5 #6 using a bunch of dirty regexes and will make it public soon. But is it possible for someone with experience running the meta scripts to just re-run them for 2009? Or is it not so simple? Thanks!
I have written a script that creates an "import.sql" script for ACS 5-year data (it is currently hardcoded for illinois but should work for the country).
For years after 2010 it simply includes commands to run the usual census-postgres create/import/parse/store/insert/view/drop scripts.
For 2009 it uses a bunch of sed commands to fix all of the issues (documented line by line in the script) with the generated census-postgres scripts for that year (at least for Illinois).
If using this script is easier than fixing hte original issues with 2009, I can split the 2009 fixes out separately and submit a pull request.