Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The in2csv example above handles this correctly. in2csv always writes output fil

Thanks to Ron Campbell of the Orange County Register for contributing the basis of **geo_2010.sql** Thanks to Mike Stucka of the Telegraph of Macon for suggestions to clarify the SQL and make it more compatible. Thanks to Tom Meagher of the Star-Ledger for SQL scripts for the 2000 census.

Note that the column IDs do not exactly match the values printed in the SF1 technical documentation. Our method was to zero-pad digits to three positions, but we made no allowance for the occasional presence of letters qualifying race/ethnic variations on certain tables. Therefore, our column lengths vary in length somewhat compared to the SF1 versions of the labels. (If anyone is motivated to create an alternate SQL file or view which maintains tighter consistency with the SF1 technical documentation, please feel free to send a file or issue a pull request.)
Note that the column IDs do not exactly match the values printed in the SF1 technical documentation. Our method was to zero-pad digits to three positions, but we made no allowance for the occasional presence of letters qualifying race/ethnic variations on certain tables. Therefore, our column lengths vary in length somewhat compared to the SF1 versions of the labels. A fixed version with columns that match the documentation precisly is available in the sql/2010_correct_columns directory.

The column names in our SQL files align with the metadata files described below.

Expand All @@ -35,4 +35,4 @@ JS (JavaScript)
===============
A first stab at encapsulating basic operations in JavaScript to make it easier for more people to use this. In need of
more examples and documentation, but should be somewhat straightforward for people accustomed to doing AJAX with jQuery.
Depends upon jQuery for ajax boilerplate. Please feel free to help make this more awesome.
Depends upon jQuery for ajax boilerplate. Please feel free to help make this more awesome.
5 changes: 5 additions & 0 deletions tools/sql/2010_correct_columns/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This directory contains a Ruby script and generated .sql file for the SF1 segments/files/tables, with correct column names that match up to the Data Dictionary Reference Names in the SF1 technical documentation. It also generates a rename_columns.sql file that can be used to fix tables created with the original names.

It uses/parses the 'packing list' file from the AK SF1 zip file.

The generated files were produced with this: `./generate_sql.rb`
Loading