-
Notifications
You must be signed in to change notification settings - Fork 1
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
Transportation emissions, 2002 - 2022 using territorial framework #104
Transportation emissions, 2002 - 2022 using territorial framework #104
Conversation
fa411ca
to
6eda737
Compare
no observations, but this makes everything join much more neatly
non-road isn't in EQUATES, only on-road
…plainer' into 91-transportation-methodology-explainer
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.
Whew! Amazing work Liz. There are some smallish changes with a few comments that should be quick approves or reverts.
The one exception is that directly reading files from urls continues to cause problems on my machine. Since this can be worked around by downloading and then directing to a file folder (less elegant but functional) I think it's okay to proceed and troubleshoot elsewhere at a later date.
Thank you for your comments, @pawilfahrt! I'm glad we added the path sanitizer and that things flow all together. |
Major changes throughout transportation sector.
compile_county_emissions.R
script is updated and testedDocumentation
_transportation/data-raw/epa/Re: Seeking guidance on consistent sccs.pdf
is saved for future use regarding source classification codes.Datasets and scripts
-
_meta/epa_us_ghgi.R
reads in the 2021 edition of the Inventory of U.S. Greenhouse Gas Emissions and Sinks by State: 1990-2021 (EPA GHGI)._transportation/data_methods_transportation.qmd
_transportation/_transportation_RDG.R
compiled basic emissions data for the first deadline of the Regional Development Guide. See Ensure transportation emissions up to date in RDG #124_transportation_compile.R
takes the very large compiled EPA dataset and summarizes it down to the emissions_year, data_source, geoid, county_name, vehicle_weight_label, and vehicle_fuel_label. This is also where non-road and aviation data will be brought in.New functions
read_smoke_ff10
reads in a SMOKE FF10 file from a given location, filters the data to only include MN and WI counties and certain pollutants, and saves the resulting data in a specified output location. Records metadata and original file names for better documentation. Lives in_transportation/data-raw/_read_smoke_ff10.R
listify()
takes in a vector and creates a formatted sentence fragment with commas and an "and" preceding the last item in the vector. Taken from a neat blog post. This lives inR/_quarto_helpers.R
round_emissions_metric_tons_co2e()
takes in a numeric vector and returns a nicely formatted sentence stating CO2e emissions in million or thousand metric tons, depending on value. Lives inR/_plotting_helpers()
Other
download_read_table()
now checks for an existing file in the given exdir before downloading from internet location. New parameterforce_download
bypasses this condition, so you can still make a fresh download if desired._transportation/data-raw/epa_source_classification_codes.R
. See EPA source classification codes #109Future considerations
Like with previous PRs on dev-2005-baseline, the entire Quarto document doesn't knit neatly, but all chunks in the transportation sections run without errors.
Checklist
Please complete this checklist as a courtesy to the PR reviewer.
Code and styling
setwd()
file.path(here::here(), "file_name"))
to source any scripts or read in datarenv::install()
styler::style_dir(".", recursive = TRUE, filetype = c("R", "qmd"))
source = "chunk-name"
inplot_ly()
councilR::plotly_layout()
?out.width: "95%"
. If a specific height is needed, use pixels. and/orout.height: "500px"
Document editing
render_for_publication.R
GitHub and project management