-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor DOE Energy Burden and COI to use YAML #1796
Merged
mattbowen-usds
merged 23 commits into
emma-nechamkin/release/score-narwhal
from
mattbowen-usds/1518-doe-coi-yaml-refactor
Aug 10, 2022
Merged
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
781e08f
added tribalId for Supplemental dataset (#1804)
esfoobar-usds 1833e3e
Setting zoom levels for tribal map (#1810)
esfoobar-usds 1c448a7
NRI dataset and initial score YAML configuration (#1534)
esfoobar-usds 150b793
Correct copy typo (#1809)
vim-usds a66e4a2
Add basic test suite for COI (#1518)
mattbowen-usds 2cc4dba
Update COI to use new yaml (#1518)
mattbowen-usds ecc147a
Add tests for DOE energy budren (1518
mattbowen-usds b40076e
Add dataset config for energy budren (1518)
mattbowen-usds b38efcc
Refactor ETL to use datasets.yml (#1518)
mattbowen-usds edf9178
Add fake GEOIDs to COI tests (#1518)
mattbowen-usds 5e0f71b
Refactor _setup_etl_instance_and_run_extract to base (#1518)
mattbowen-usds 6f24429
Add output-path tests (#1518)
mattbowen-usds 0349dbd
Update YAML to match constant (#1518)
mattbowen-usds 11e5a10
Don't blindly set float format (#1518)
mattbowen-usds e19f31b
Add defaults for extract (#1518)
mattbowen-usds 0808e8a
Run YAML load on all subclasses (#1518)
mattbowen-usds dde2209
Update description fields (#1518)
mattbowen-usds 790b2e6
Update YAML per final format (#1518)
mattbowen-usds 2be776a
Update fixture tract IDs (#1518)
mattbowen-usds c154ab2
Update base class refactor (#1518)
mattbowen-usds f948c7f
Remove old comment (#1518)
mattbowen-usds 9e5a802
Fix type signature and return (#1518)
mattbowen-usds 3776e24
Update per code review (#1518)
mattbowen-usds File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Empty file.
131 changes: 131 additions & 0 deletions
131
data/data-pipeline/data_pipeline/etl/score/config/datasets.yml
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,131 @@ | ||
--- | ||
datasets: | ||
- long_name: "FEMA National Risk Index" | ||
short_name: "nri" | ||
module_name: national_risk_index | ||
input_geoid_tract_field_name: "TRACTFIPS" | ||
load_fields: | ||
- short_name: "ex_loss" | ||
df_field_name: "RISK_INDEX_EXPECTED_ANNUAL_LOSS_SCORE_FIELD_NAME" | ||
long_name: "FEMA Risk Index Expected Annual Loss Score" | ||
field_type: float | ||
number_of_decimals_in_output: 6 | ||
|
||
- short_name: "ex_pop_loss" | ||
df_field_name: "EXPECTED_POPULATION_LOSS_RATE_FIELD_NAME" | ||
long_name: "Expected population loss rate (Natural Hazards Risk Index)" | ||
description_short: | ||
"Rate of fatalities and injuries resulting from natural hazards each year" | ||
description_long: | ||
"Rate relative to the population of fatalities and injuries due to fourteen | ||
types of natural hazards each year that have some link to climate change: | ||
avalanche, coastal flooding, cold wave, drought, hail, heat wave, hurricane, | ||
ice storm, landslide, riverine flooding, strong wind, tornado, wildfire, and | ||
winter weather. Population loss is defined as the Spatial Hazard Events and | ||
Losses and National Centers for Environmental Information’s (NCEI) reported | ||
number of fatalities and injuries caused by the hazard occurrence. To combine | ||
fatalities and injuries for the computation of population loss value, an | ||
injury is counted as one-tenth (1/10) of a fatality. The NCEI Storm Events | ||
Database classifies injuries and fatalities as direct or indirect. Both direct | ||
and indirect injuries and fatalities are counted as population loss. This | ||
total number of injuries and fatalities is then divided by the population in | ||
the census tract to get a per-capita rate of population risk." | ||
field_type: float | ||
number_of_decimals_in_output: 6 | ||
include_in_tiles: true | ||
include_in_downloadable_files: true | ||
create_percentile: true | ||
|
||
- short_name: "ex_ag_loss" | ||
df_field_name: "EXPECTED_AGRICULTURE_LOSS_RATE_FIELD_NAME" | ||
long_name: "Expected agricultural loss rate (Natural Hazards Risk Index)" | ||
description_short: | ||
"Economic loss rate to agricultural value resulting from natural hazards each | ||
year" | ||
description_long: | ||
"Percent of agricultural value at risk from losses due to fourteen types of | ||
natural hazards that have some link to climate change: avalanche, coastal | ||
flooding, cold wave, drought, hail, heat wave, hurricane, ice storm, | ||
landslide, riverine flooding, strong wind, tornado, wildfire, and winter | ||
weather. Rate calculated by dividing the agricultural value at risk in a | ||
census tract by the total agricultural value in that census tract." | ||
field_type: float | ||
number_of_decimals_in_output: 6 | ||
include_in_tiles: true | ||
include_in_downloadable_files: true | ||
create_percentile: true | ||
|
||
- short_name: "ex_bldg_loss" | ||
df_field_name: "EXPECTED_BUILDING_LOSS_RATE_FIELD_NAME" | ||
long_name: "Expected building loss rate (Natural Hazards Risk Index)" | ||
description_short: | ||
"Economic loss rate to building value resulting from natural hazards each year" | ||
description_long: | ||
"Percent of building value at risk from losses due to fourteen types of | ||
natural hazards that have some link to climate change: avalanche, coastal | ||
flooding, cold wave, drought, hail, heat wave, hurricane, ice storm, | ||
landslide, riverine flooding, strong wind, tornado, wildfire, and winter | ||
weather. Rate calculated by dividing the building value at risk in a census | ||
tract by the total building value in that census tract." | ||
field_type: float | ||
number_of_decimals_in_output: 6 | ||
include_in_tiles: true | ||
include_in_downloadable_files: true | ||
create_percentile: true | ||
|
||
- short_name: "has_ag_val" | ||
df_field_name: "CONTAINS_AGRIVALUE" | ||
long_name: "Contains agricultural value" | ||
field_type: bool | ||
- long_name: "Child Opportunity Index 2.0 database" | ||
short_name: "coi" | ||
module_name: "child_opportunity_index" | ||
input_geoid_tract_field_name: "geoid" | ||
load_fields: | ||
- short_name: "he_heat" | ||
df_field_name: "EXTREME_HEAT_FIELD" | ||
long_name: "Summer days above 90F" | ||
field_type: float | ||
include_in_downloadable_files: true | ||
include_in_tiles: true | ||
- short_name: "he_food" | ||
long_name: "Percent low access to healthy food" | ||
df_field_name: "HEALTHY_FOOD_FIELD" | ||
field_type: float | ||
include_in_downloadable_files: true | ||
include_in_tiles: true | ||
- short_name: "he_green" | ||
long_name: "Percent impenetrable surface areas" | ||
df_field_name: "IMPENETRABLE_SURFACES_FIELD" | ||
field_type: float | ||
include_in_downloadable_files: true | ||
include_in_tiles: true | ||
- short_name: "ed_reading" | ||
df_field_name: "READING_FIELD" | ||
long_name: "Third grade reading proficiency" | ||
field_type: float | ||
include_in_downloadable_files: true | ||
include_in_tiles: true | ||
- long_name: "Low-Income Energy Affordabililty Data" | ||
short_name: "LEAD" | ||
module_name: "doe_energy_burden" | ||
input_geoid_tract_field_name: "FIP" | ||
load_fields: | ||
- short_name: "EBP_PFS" | ||
df_field_name: "REVISED_ENERGY_BURDEN_FIELD_NAME" | ||
long_name: "Energy burden" | ||
field_type: float | ||
include_in_downloadable_files: true | ||
include_in_tiles: true | ||
- long_name: "Exaple ETL" | ||
short_name: "Example" | ||
module_name: "example_dataset" | ||
input_geoid_tract_field_name: "GEOID10_TRACT" | ||
load_fields: | ||
- short_name: "EXAMPLE_FIELD" | ||
df_field_name: "Input Field 1" | ||
long_name: "Example Field 1" | ||
field_type: float | ||
include_in_tiles: true | ||
include_in_downloadable_files: true | ||
|
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
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "Example ETL"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argh I missed it again! Fixed in 3776e24