Creates a new script, compile_county_emissions.R which takes all emissions from each sector and saves a single data frame. As all the sectors come together, we will use this script to merge them into one table -> database -> Tableau!
new datasets, with metadata in R/data/
cprg_county_emissions table with year, geog, sector, category, source, emissions, data and factor sources
# A tibble: 6 × 9
# Rowwise:
year geog_level geog_name sector category source emissions_metric_tons_co2e data_source factor_source
<dbl> <chr> <chr> <chr> <chr> <ord> <dbl> <chr> <chr>
1 2021 county Anoka Transportation Passenger Light-duty vehicles 955753. StreetLight Data EPA MOVES (201…
2 2021 county Carver Transportation Passenger Light-duty vehicles 277587. StreetLight Data EPA MOVES (201…
3 2021 county Chisago Transportation Passenger Light-duty vehicles 184638. StreetLight Data EPA MOVES (201…
4 2021 county Dakota Transportation Passenger Light-duty vehicles 1077721. StreetLight Data EPA MOVES (201…
5 2021 county Hennepin Transportation Passenger Light-duty vehicles 2578213. StreetLight Data EPA MOVES (201…
6 2021 county Pierce Transportation Passenger Light-duty vehicles 104251. StreetLight Data EPA MOVES (201…
new functions, with testing
plot_county_emissions() - plots emissions for a given sector by county and sub-category
index.qmd
changed "preface" to "executive summary"
added emissions by sector plots
Misc. caption, styling fixes
additionally, this alters the PR template to reduce redundancy
Checklist
Please complete this checklist as a courtesy to the PR reviewer.
Code and styling
[x] All of the files/scripts I added are in the right place and named appropriately. See the README for details.
[x] I have not used setwd()
[x] I have used file.path(here::here(), "file_name")) to source any scripts or read in data
[x] I have not added any large datasets, unless absolutely necessary (explain)
[x] I have commented my code, particularly in hard to understand areas
[x] I have added additional package dependencies as necessary to renv with renv::install()
[x] I have run styler::style_dir(".", recursive = TRUE, filetype = c("R", "qmd"))
[x] Plots
[x] If plotly, have you "source" argument that matches the chunk name?
[x] correct formatting using councilR::plotly_layout()?
[x] chunk formatting
[x] all chunks named
[x] all figure or table chunks have caption
[x] out.width: "95%" and out.height: "60%"
Document editing
[x] I have named my code chunks
[x] My plots have succinct and accurate figure captions using #| fig.cap: "{caption here}"
[x] I have used out.width and out.height in percentage format in figure configuration
Creates a new script,
compile_county_emissions.R
which takes all emissions from each sector and saves a single data frame. As all the sectors come together, we will use this script to merge them into one table -> database -> Tableau!new datasets, with metadata in R/data/
new functions, with testing
index.qmd
Misc. caption, styling fixes additionally, this alters the PR template to reduce redundancy
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"))
councilR::plotly_layout()
?out.width: "95%"
andout.height: "60%"
Document editing
#| fig.cap: "{caption here}"
out.width
andout.height
in percentage format in figure configurationrender_for_publication.R
GitHub and project management