-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into git_action_testground
- Loading branch information
Showing
91 changed files
with
4,705 additions
and
51 deletions.
There are no files selected for viewing
16 changes: 0 additions & 16 deletions
16
...d_data_products/historical__capital_expenditures_time_series__read_me_data_dictionary.yml
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
...oducts/historical__operating_and_capital_funding_time_series__read_me_data_dictionary.yml
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
...cal__service_data_and_operating_expenses_time_series_by_mode__read_me_data_dictionary.yml
This file was deleted.
Oops, something went wrong.
60 changes: 60 additions & 0 deletions
60
...mediate/ntd_funding_and_expenses/int_ntd__capital_expenditures_time_series_facilities.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{{ config(materialized="table") }} | ||
|
||
WITH | ||
source_pivoted AS ( | ||
{{ | ||
dbt_utils.unpivot( | ||
cast_to="int", | ||
relation=ref("stg_ntd__capital_expenditures_time_series__facilities"), | ||
exclude=[ | ||
"_2023_mode_status", | ||
"agency_name", | ||
"agency_status", | ||
"census_year", | ||
"city", | ||
"last_report_year", | ||
"legacy_ntd_id", | ||
"mode", | ||
"ntd_id", | ||
"reporter_type", | ||
"reporting_module", | ||
"state", | ||
"uace_code", | ||
"uza_area_sq_miles", | ||
"uza_name", | ||
"uza_population", | ||
"dt", | ||
"execution_ts" | ||
], | ||
field_name="year", | ||
value_name="facilities", | ||
) | ||
}} | ||
), | ||
|
||
int_ntd__capital_expenditures_time_series_facilities AS ( | ||
SELECT | ||
agency_name, | ||
agency_status, | ||
census_year, | ||
city, | ||
last_report_year, | ||
legacy_ntd_id, | ||
mode, | ||
format("%05d", cast(cast(ntd_id AS NUMERIC) AS INT64)) AS ntd_id, | ||
reporter_type, | ||
reporting_module, | ||
state, | ||
uace_code, | ||
uza_area_sq_miles, | ||
uza_name, | ||
uza_population, | ||
split(year, '_')[offset(1)] AS year, | ||
facilities, | ||
_2023_mode_status, | ||
dt, | ||
execution_ts | ||
FROM source_pivoted | ||
) | ||
|
||
SELECT * FROM int_ntd__capital_expenditures_time_series_facilities |
60 changes: 60 additions & 0 deletions
60
...intermediate/ntd_funding_and_expenses/int_ntd__capital_expenditures_time_series_other.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{{ config(materialized="table") }} | ||
|
||
WITH | ||
source_pivoted AS ( | ||
{{ | ||
dbt_utils.unpivot( | ||
cast_to="int", | ||
relation=ref("stg_ntd__capital_expenditures_time_series__other"), | ||
exclude=[ | ||
"_2023_mode_status", | ||
"agency_name", | ||
"agency_status", | ||
"census_year", | ||
"city", | ||
"last_report_year", | ||
"legacy_ntd_id", | ||
"mode", | ||
"ntd_id", | ||
"reporter_type", | ||
"reporting_module", | ||
"state", | ||
"uace_code", | ||
"uza_area_sq_miles", | ||
"uza_name", | ||
"uza_population", | ||
"dt", | ||
"execution_ts" | ||
], | ||
field_name="year", | ||
value_name="other", | ||
) | ||
}} | ||
), | ||
|
||
int_ntd__capital_expenditures_time_series_other AS ( | ||
SELECT | ||
agency_name, | ||
agency_status, | ||
census_year, | ||
city, | ||
last_report_year, | ||
legacy_ntd_id, | ||
mode, | ||
format("%05d", cast(cast(ntd_id AS NUMERIC) AS INT64)) AS ntd_id, | ||
reporter_type, | ||
reporting_module, | ||
state, | ||
uace_code, | ||
uza_area_sq_miles, | ||
uza_name, | ||
uza_population, | ||
split(year, '_')[offset(1)] AS year, | ||
other, | ||
_2023_mode_status, | ||
dt, | ||
execution_ts | ||
FROM source_pivoted | ||
) | ||
|
||
SELECT * FROM int_ntd__capital_expenditures_time_series_other |
60 changes: 60 additions & 0 deletions
60
...iate/ntd_funding_and_expenses/int_ntd__capital_expenditures_time_series_rolling_stock.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{{ config(materialized="table") }} | ||
|
||
WITH | ||
source_pivoted AS ( | ||
{{ | ||
dbt_utils.unpivot( | ||
cast_to="int", | ||
relation=ref("stg_ntd__capital_expenditures_time_series__rolling_stock"), | ||
exclude=[ | ||
"_2023_mode_status", | ||
"agency_name", | ||
"agency_status", | ||
"census_year", | ||
"city", | ||
"last_report_year", | ||
"legacy_ntd_id", | ||
"mode", | ||
"ntd_id", | ||
"reporter_type", | ||
"reporting_module", | ||
"state", | ||
"uace_code", | ||
"uza_area_sq_miles", | ||
"uza_name", | ||
"uza_population", | ||
"dt", | ||
"execution_ts" | ||
], | ||
field_name="year", | ||
value_name="rolling_stock", | ||
) | ||
}} | ||
), | ||
|
||
int_ntd__capital_expenditures_time_series_rolling_stock AS ( | ||
SELECT | ||
agency_name, | ||
agency_status, | ||
census_year, | ||
city, | ||
last_report_year, | ||
legacy_ntd_id, | ||
mode, | ||
format("%05d", cast(cast(ntd_id AS NUMERIC) AS INT64)) AS ntd_id, | ||
reporter_type, | ||
reporting_module, | ||
state, | ||
uace_code, | ||
uza_area_sq_miles, | ||
uza_name, | ||
uza_population, | ||
split(year, '_')[offset(1)] AS year, | ||
rolling_stock, | ||
_2023_mode_status, | ||
dt, | ||
execution_ts | ||
FROM source_pivoted | ||
) | ||
|
||
SELECT * FROM int_ntd__capital_expenditures_time_series_rolling_stock |
60 changes: 60 additions & 0 deletions
60
...intermediate/ntd_funding_and_expenses/int_ntd__capital_expenditures_time_series_total.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{{ config(materialized="table") }} | ||
|
||
WITH | ||
source_pivoted AS ( | ||
{{ | ||
dbt_utils.unpivot( | ||
cast_to="int", | ||
relation=ref("stg_ntd__capital_expenditures_time_series__total"), | ||
exclude=[ | ||
"_2023_mode_status", | ||
"agency_name", | ||
"agency_status", | ||
"census_year", | ||
"city", | ||
"last_report_year", | ||
"legacy_ntd_id", | ||
"mode", | ||
"ntd_id", | ||
"reporter_type", | ||
"reporting_module", | ||
"state", | ||
"uace_code", | ||
"uza_area_sq_miles", | ||
"uza_name", | ||
"uza_population", | ||
"dt", | ||
"execution_ts" | ||
], | ||
field_name="year", | ||
value_name="total", | ||
) | ||
}} | ||
), | ||
|
||
int_ntd__capital_expenditures_time_series_total AS ( | ||
SELECT | ||
agency_name, | ||
agency_status, | ||
census_year, | ||
city, | ||
last_report_year, | ||
legacy_ntd_id, | ||
mode, | ||
format("%05d", cast(cast(ntd_id AS NUMERIC) AS INT64)) AS ntd_id, | ||
reporter_type, | ||
reporting_module, | ||
state, | ||
uace_code, | ||
uza_area_sq_miles, | ||
uza_name, | ||
uza_population, | ||
split(year, '_')[offset(1)] AS year, | ||
total, | ||
_2023_mode_status, | ||
dt, | ||
execution_ts | ||
FROM source_pivoted | ||
) | ||
|
||
SELECT * FROM int_ntd__capital_expenditures_time_series_total |
58 changes: 58 additions & 0 deletions
58
...nding_and_expenses/int_ntd__operating_and_capital_funding_time_series_capital_federal.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{{ config(materialized="table") }} | ||
|
||
WITH | ||
source_pivoted AS ( | ||
{{ | ||
dbt_utils.unpivot( | ||
cast_to="int", | ||
relation=ref("stg_ntd__operating_and_capital_funding_time_series__capital_federal"), | ||
exclude=[ | ||
"_2023_status", | ||
"agency_name", | ||
"agency_status", | ||
"census_year", | ||
"city", | ||
"last_report_year", | ||
"legacy_ntd_id", | ||
"ntd_id", | ||
"reporter_type", | ||
"reporting_module", | ||
"state", | ||
"uace_code", | ||
"uza_area_sq_miles", | ||
"primary_uza_name", | ||
"uza_population", | ||
"dt", | ||
"execution_ts" | ||
], | ||
field_name="year", | ||
value_name="capital_federal", | ||
) | ||
}} | ||
), | ||
|
||
int_ntd__operating_and_capital_funding_time_series_capital_federal AS ( | ||
SELECT | ||
agency_name, | ||
agency_status, | ||
census_year, | ||
city, | ||
last_report_year, | ||
legacy_ntd_id, | ||
format("%05d", cast(cast(ntd_id AS NUMERIC) AS INT64)) AS ntd_id, | ||
reporter_type, | ||
reporting_module, | ||
state, | ||
uace_code, | ||
uza_area_sq_miles, | ||
primary_uza_name, | ||
uza_population, | ||
split(year, '_')[offset(1)] AS year, | ||
capital_federal, | ||
_2023_status, | ||
dt, | ||
execution_ts | ||
FROM source_pivoted | ||
) | ||
|
||
SELECT * FROM int_ntd__operating_and_capital_funding_time_series_capital_federal |
Oops, something went wrong.