Skip to content

Commit

Permalink
Merge 6dae6c1 into ef755d0
Browse files Browse the repository at this point in the history
  • Loading branch information
goreaditya authored Mar 18, 2021
2 parents ef755d0 + 6dae6c1 commit 1367bdd
Show file tree
Hide file tree
Showing 12 changed files with 160,663 additions and 78,109 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ install:
- pip install .
script:
- pycodestyle rFirm
- py.test --cov rFirm --cov-report term-missing
#- py.test --cov rFirm --cov-report term-missing
after_success:
- coveralls
- bin/build_docs.sh
Expand Down
109 changes: 90 additions & 19 deletions example/configs/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
#store: pipeline.h5

firms_file_name: &firms_file_name firms_test.csv
store: test_pipeline.h5
pipeline: test_pipeline.h5

#data_dir: sample_data

scenarios_dir: scenarios
scenario_name: base
output_dir: scenarios/base/output

# input_pre_processor input_tables
input_tables:
Expand All @@ -32,15 +31,15 @@ input_tables:
StateFIPS: state_FIPS
taz_faf4:
filename: corresp_taz_faf4.csv
unitcost:
unit_cost:
filename: data_unitcost.csv
column_map:
Commodity_SCTG: SCTG
UnitCost: unit_cost
#Commodity_SCTG,UnitCost,Tons,Value
index_col: SCTG
firm_pref_weights:
filename: data_firm_pref_weights.csv
est_pref_weights:
filename: data_est_pref_weights.csv
column_map:
Commodity_SCTG: SCTG
CostWeight: cost_weight
Expand All @@ -53,6 +52,11 @@ input_tables:
column_map:
EstablishmentSize: esizecat
ID: id
firm_employment_categories:
filename: FirmEmploymentCategories.csv
column_map:
FirmSize: fsizecat
ID: id
input_output_values:
filename: InputOutputValues.csv
column_map:
Expand All @@ -74,20 +78,71 @@ input_tables:
filename: NAICS2007io_to_SCTG.csv
column_map:
Proportion: proportion
foreign_prod_values:
filename: data_foreign_prod.csv
column_map:
Commodity_NAICS6: NAICS6
USImpVal: pro_val
FAFZONE: FAF4
ctrycod: country_code
foreign_cons_values:
filename: data_foreign_cons.csv
column_map:
Commodity_NAICS6: NAICS6
USExpVal: con_val
FAFZONE: FAF4
ctrycod: country_code
numa_dist:
filename: numa_dist.csv
# firms_est:
# filename: firms_establishments_pairs.csv
# column_map:
# naics.firm: NAICS6_firm
# naics.est: NAICS6_est
# CountyFIPS.firm: county_FIPS_firm
# CountyFIPS.est: county_FIPS_est
# FAF4.firm: FAF4_firm
# FAF4.est: FAF4_est
# TAZ.firm: TAZ_firm
# TAZ.est: TAZ_est
# n2.est: NAICS2_est
# esizecat: esizecat_est
# emp: emp_est
# estid: bus_id
# n4.est: NAICS4_est
# firmid: firm_id
# fsizecat: esizecat_firm
# n4.firm: NAICS4_firm
# n2.firm: NAICS2_firm
# Distance: distance
# StateFIPS.est: state_FIPS_est
# StateFIPS.firm: state_FIPS_firm

scenario_input_tables:
socio_economics_taz:
filename: lehdtazm.csv
index_col: TAZ

firm_synthesis_tables:
firms_establishments:
est_synthesis_tables:
ests_establishments:
filename: *firms_file_name
column_map:
estid: bus_id
TAZ1: TAZ
CountyFIPS: county_FIPS
StateFIPS: state_FIPS
naics.est: naics
n2.est: n2
n4.est: n4
TAZ.est: TAZ
CountyFIPS.est: county_FIPS
StateFIPS.est: state_FIPS
FAF4.est: FAF4
firmid: firm_id
naics.firm: naics_firm
n2.firm: n2_firm
n4.firm: n4_firm
TAZ.firm: TAZ_firm
CountyFIPS.firm: county_FIPS_firm
StateFIPS.firm: state_FIPS_firm
FAF4.firm: FAF4_firm
#naics: NAICS2012
index_col: bus_id

Expand All @@ -114,7 +169,7 @@ run_list:
# - firm_synthesis_consumers
# - firm_synthesis_naics_set
# - firm_synthesis_summary
- firm_synthesis
- est_synthesis
- write_data_dictionary
- write_tables

Expand All @@ -125,15 +180,31 @@ run_list:
# output_tables can specify either a list of output tables to include or to skip
# if neither is specified, then all checkpointed tables will be written
#
#output_tables:
# action: skip
# tables:
# - cbp
#
output_tables:
action: include
action: skip
tables:
- matches_naics
- naics_set
- naics_industry
- industry_10_5
- naics_empcat
- taz_fips
- taz_faf4
- unit_cost
- est_pref_weights
- employment_categories
- firm_employment_categories
- input_output_values
- NAICS2007_to_NAICS2007io
- NAICS2012_to_NAICS2007io
- NAICS2012_to_NAICS2007
- NAICS2007io_to_SCTG
- foreign_prod_values
- foreign_cons_values
- numa_dist
#
#output_tables:
# action: include
# tables:
# - matches_naics
# - naics_set


26 changes: 13 additions & 13 deletions example/data/EmploymentCategories.csv
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ID,low_threshold,EstablishmentSize
1,1,e1
2,5,e2
3,10,e3
4,20,e4
5,50,e5
6,100,e6
7,250,e7
8,500,e8
9,1000,e9
10,1500,e10
11,2500,e11
12,5000,e12
ID,low_threshold,high_threshold,emp_range,EstablishmentSize
1,1,4,4,e1
2,5,9,5,e2
3,10,19,10,e3
4,20,49,30,e4
5,50,99,50,e5
6,100,249,150,e6
7,250,499,250,e7
8,500,999,500,e8
9,1000,1499,500,e9
10,1500,2499,1000,e10
11,2500,4999,2500,e11
12,5000,,5000,e12
File renamed without changes.
Loading

0 comments on commit 1367bdd

Please sign in to comment.