Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
checked against wisqars traffic data (see plots, can remove if we don't want in ingest)
# Conflicts: # .claude/settings.json # .gitignore # data/bundle_injury_overdose/dist/county_opioid_by_source.parquet # data/bundle_injury_overdose/dist/deaths_cause_age.parquet # data/bundle_injury_overdose/dist/deaths_cause_age_demographics.parquet # data/bundle_injury_overdose/dist/firearms_by_demographics.parquet # data/bundle_injury_overdose/dist/firearms_by_geography_and_source_state_year.parquet # data/bundle_injury_overdose/dist/firearms_geography_source.parquet # data/bundle_injury_overdose/dist/google_dma.parquet # data/bundle_injury_overdose/dist/heat_by_geography_and_source_state_year.parquet # data/bundle_injury_overdose/dist/heat_risk.parquet # data/bundle_injury_overdose/dist/overdose_by_demographics.parquet # data/bundle_injury_overdose/dist/overdose_by_geography_and_source.parquet # data/bundle_injury_overdose/dist/overdose_by_geography_and_source_county.parquet # data/bundle_injury_overdose/dist/overdose_by_geography_and_source_state_year.parquet # data/bundle_injury_overdose/dist/overdose_deaths_state.parquet # data/bundle_measles/dist/measles_state.parquet # data/nnds/standard/data.csv.gz # data/noaa_heat_risk/process.json # data/noaa_heat_risk/standard/data_county.csv.gz # data/noaa_heat_risk/standard/data_state.csv.gz # data/noaa_heat_risk/standard/datapackage.json # renv.lock
|
Forgot to add, only additional data that seems like we would maybe want is weather conditions for each accident and race of the person killed if the crash was fatal, but these data are only available post 2020. Let me know if you want me to incorporate. |
|
|
||
| measles_state_nnds <- vroom::vroom('../nnds/standard/data.csv.gz', show_col_types = FALSE) %>% | ||
| mutate(value = measles_imported + measles_indigenous ) %>% | ||
| mutate(value = measles_imported + measles_indigenous, |
There was a problem hiding this comment.
this file should not be included in the pull request
There was a problem hiding this comment.
I looked into this. It is fine, this is because it's part of the branch history but will not change anything in the PR. It is also the same as the version in main.
| if ("LAND_USE" %in% names(.)) as.integer(LAND_USE) else NA_integer_ | ||
| ), | ||
| # Alcohol involvement: DRUNK_DR = number of drunk drivers | ||
| alcohol_related = !is.na(DRUNK_DR) & as.integer(DRUNK_DR) >= 1, |
There was a problem hiding this comment.
should check on meaning of NA for DRUNK_DR. with this logic if DRUNK_DR is NA, then alcohol_related=0, which might be OK, depending on why it is NA
There was a problem hiding this comment.
per documentation, DRUNK_DR is actually not reliable prior to 2008 and isn't calculated after 2015... I am excluding for now but they provide logic to calculate if we want to include it.
| alcohol_related = !is.na(DRUNK_DR) & as.integer(DRUNK_DR) >= 1, | ||
| # Speeding: SPEEDREL only available from 2010 onward | ||
| speeding_related = if ("SPEEDREL" %in% names(.)) { | ||
| YEAR >= 2010 & !is.na(SPEEDREL) & as.integer(SPEEDREL) %in% 1:4 |
There was a problem hiding this comment.
this one seems to handle NA differently?
There was a problem hiding this comment.
Also excluding speeding_related for now as what I see in data dictionary doesn't match up with what I see in data
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
checked against wisqars (largely in alignment), can delete those files if we don't want in main repo