Skip to content

Commit

Permalink
DEV only do NTA aggregations for now
Browse files Browse the repository at this point in the history
  • Loading branch information
damonmcc committed Mar 8, 2024
1 parent af7b6ec commit d212ac9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
36 changes: 18 additions & 18 deletions products/knownprojects/bash/03_aggregate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,37 @@ run_sql_file sql/aggregate/create_zap_projects.sql
echo "Preprocess column names to standardize"
run_sql_file sql/aggregate/preprocessing.sql

## Do SCA aggregations
echo "Create the SCA aggregation tables..."
# ## Do SCA aggregations
# echo "Create the SCA aggregation tables..."

echo "Build Elementary School Zones aggregate table"
run_sql_file sql/aggregate/sca/boundaries_es_zone.sql
# echo "Build Elementary School Zones aggregate table"
# run_sql_file sql/aggregate/sca/boundaries_es_zone.sql

echo "Build School Districts aggregate table"
run_sql_file sql/aggregate/sca/boundaries_school_districts.sql
# echo "Build School Districts aggregate table"
# run_sql_file sql/aggregate/sca/boundaries_school_districts.sql

echo "Build School Subdistricts aggregate table"
run_sql_file sql/aggregate/sca/boundaries_school_subdistricts.sql
echo "SCA sggregations are complete"
# echo "Build School Subdistricts aggregate table"
# run_sql_file sql/aggregate/sca/boundaries_school_subdistricts.sql
# echo "SCA sggregations are complete"

## Do general aggregations
echo "Create the general aggregate tables..."

echo "Build Census Tract aggregate table"
run_sql_file sql/aggregate/longform_ct_output.sql
dbt build --select future_units_by_ct
# echo "Build Census Tract aggregate table"
# run_sql_file sql/aggregate/longform_ct_output.sql
# dbt build --select future_units_by_ct

echo "Build NTA aggregate table"
run_sql_file sql/aggregate/longform_nta_output.sql
dbt build --select future_units_by_nta

echo "Build CDTA aggregate table"
run_sql_file sql/aggregate/longform_cdta_output.sql
dbt build --select future_units_by_cdta
# echo "Build CDTA aggregate table"
# run_sql_file sql/aggregate/longform_cdta_output.sql
# dbt build --select future_units_by_cdta

echo "Build Community District aggregate table"
run_sql_file sql/aggregate/longform_cd_output.sql
dbt build --select future_units_by_cd
# echo "Build Community District aggregate table"
# run_sql_file sql/aggregate/longform_cd_output.sql
# dbt build --select future_units_by_cd

echo "General aggregations are complete"

Expand Down
34 changes: 17 additions & 17 deletions products/knownprojects/bash/04_export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,30 @@ mkdir -p output
echo "Compress review folder"
zip -r review.zip review/

echo "Export SCA aggregation tables"
mkdir -p sca_aggregation
(
cd sca_aggregation
csv_export longform_csd_output &
csv_export longform_es_zone_output &
csv_export longform_subdist_output_cp_assumptions
wait
)
echo "Compress SCA aggregation folder"
zip -r sca_aggregation.zip sca_aggregation/
# echo "Export SCA aggregation tables"
# mkdir -p sca_aggregation
# (
# cd sca_aggregation
# csv_export longform_csd_output &
# csv_export longform_es_zone_output &
# csv_export longform_subdist_output_cp_assumptions
# wait
# )
# echo "Compress SCA aggregation folder"
# zip -r sca_aggregation.zip sca_aggregation/

echo "Export aggregation tables"
mkdir -p aggregation
(
cd aggregation
csv_export longform_ct_output
csv_export future_units_by_ct
# csv_export longform_ct_output
# csv_export future_units_by_ct
csv_export longform_nta_output
csv_export future_units_by_nta
csv_export longform_cdta_output
csv_export future_units_by_cdta
csv_export longform_cd_output
csv_export future_units_by_cd
# csv_export longform_cdta_output
# csv_export future_units_by_cdta
# csv_export longform_cd_output
# csv_export future_units_by_cd
wait
)
echo "Compress aggregation folder"
Expand Down

0 comments on commit d212ac9

Please sign in to comment.