Module Expr Str ImportFrom alias alias alias ImportFrom alias alias alias ImportFrom alias Import alias Import alias Import alias Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Assign NameStore SubscriptLoad NameLoad Index NameLoad If BoolOpOr CompareNotEq Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Num CompareNotEq Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Num body Assign NameStore NameLoad orelse Assign NameStore NameLoad Assign NameStore Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad For NameStore Call NameLoad SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpMod Str Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Assign NameStore Call NameLoad NameLoad NameLoad Return Call AttributeLoad Call NameLoad Call AttributeLoad Call NameLoad NameLoad attr keyword NameLoad attr decorator_list If CompareEq NameLoad Str body TryExcept body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num handlers ExceptHandler body Assign NameStore Str Assign NameStore Str For NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str
N/A N/A 
Generate SQL "Create table" files for all of the SF1 tables, with column format compatible with
the bulk download files available at http://census.ire.org/data/bulkdata.html

Note that all table names and column names will be forced to lowercase for maximum interoperability
between databases.
 sqlalchemy Column MetaData Table sqlalchemy Float Integer String sqlalchemy.schema CreateTable N/A json N/A os.path N/A sys N/A LABELS N/A N/A json load N/A open ../metadata/sf1_labels.json _create_base_table N/A N/A name N/A N/A N/A Provide the common columns for all of our exports N/A metadata N/A MetaData N/A sql_table N/A Table N/A N/A name lower metadata N/A N/A N/A sql_table append_column N/A Column geoid N/A String length 11 primary_key True N/A N/A N/A sql_table append_column N/A Column sumlev N/A String length 3 nullable False N/A N/A N/A sql_table append_column N/A Column state N/A String length 2 nullable False N/A N/A N/A sql_table append_column N/A Column county N/A String length 3 N/A N/A N/A sql_table append_column N/A Column cbsa N/A String length 5 N/A N/A N/A sql_table append_column N/A Column csa N/A String length 3 N/A N/A N/A sql_table append_column N/A Column necta N/A String length 5 N/A N/A N/A sql_table append_column N/A Column cnecta N/A String length 3 N/A N/A N/A sql_table append_column N/A Column name N/A String length 90 nullable False N/A N/A N/A sql_table append_column N/A Column pop100 Integer nullable False N/A N/A N/A sql_table append_column N/A Column hu100 Integer nullable False N/A N/A N/A sql_table append_column N/A Column pop100_2000 Integer nullable True N/A N/A N/A sql_table append_column N/A Column hu100_2000 Integer nullable True N/A sql_table N/A sqlalchemy_for_table N/A N/A table_code table_name_prefix N/A ire_ N/A N/A table_labels N/A LABELS N/A table_code N/A N/A N/A N/A N/A N/A table_labels N/A name find AVERAGE -1 N/A N/A N/A N/A table_labels N/A name find MEDIAN -1 N/A N/A col_type Float N/A N/A col_type Integer N/A sql_table N/A _create_base_table N/A %s%s N/A table_name_prefix table_code N/A label N/A sorted N/A table_labels N/A labels N/A N/A N/A N/A sql_table append_column N/A Column N/A N/A label lower col_type N/A N/A N/A sql_table append_column N/A Column N/A %s_2000 N/A N/A label lower col_type N/A sql_table N/A sql_for_table N/A N/A table_code table_name_prefix N/A ire_ N/A N/A sql_table N/A sqlalchemy_for_table table_code table_name_prefix N/A N/A N/A N/A unicode N/A N/A N/A CreateTable sql_table compile dialect None strip N/A N/A N/A __name__ __main__ N/A N/A N/A N/A output_dir N/A N/A sys argv N/A 1 N/A N/A N/A N/A output_dir . N/A table_name_prefix ire_ N/A table_code N/A sorted LABELS N/A N/A table_name N/A N/A LABELS N/A table_code N/A name N/A fn N/A N/A N/A os path join output_dir N/A %s%s.sql N/A table_name_prefix table_code N/A N/A open fn w f N/A N/A N/A N/A f write N/A -- %s. %s
 N/A table_code table_name N/A N/A N/A f write -- designed to work with the IRE Census bulk data exports
 N/A N/A N/A f write -- see http://census.ire.org/data/bulkdata.html
 N/A N/A N/A f write N/A sql_for_table table_code N/A N/A N/A f write ;
