Skip to content

Commit

Permalink
Bibliography entry edits from publisher (#158)
Browse files Browse the repository at this point in the history
* Bib edits from pub

* Add missing bracket

* Fixing punctuation with parentheses

---------

Co-authored-by: Isabella Velasquez <[email protected]>
Co-authored-by: Rebecca Powell <[email protected]>
  • Loading branch information
3 people authored Aug 20, 2024
1 parent 1cb2851 commit ff5bf2d
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 36 deletions.
2 changes: 1 addition & 1 deletion 09-reproducible-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The {targets} package is an increasingly popular workflow manager that documents
\index{R Markdown|(} \index{Quarto|(}
Tools like Quarto and R Markdown aid in reproducibility by creating documents that weave together code, text, and results. We can present analysis results alongside the report's narrative, so there's no need to copy and paste code output into the final documentation. By eliminating manual steps, we can reduce the chances of errors in the final output.

Quarto and R Markdown documents also allow users to re-execute the underlying code when needed. Another analyst can see the steps we took, follow the scripts, and recreate the report. We can include details about our work in one place thanks to the combination of text and code, making our work transparent and easier to verify [@R-quarto; @rmarkdown2020].
Quarto and R Markdown documents also allow users to re-execute the underlying code when needed. Another analyst can see the steps we took, follow the scripts, and recreate the report. We can include details about our work in one place thanks to the combination of text and code, making our work transparent and easier to verify [@R-quarto; @rmarkdown2020man].

### Parameterization

Expand Down
4 changes: 2 additions & 2 deletions 14-ambarom-vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ In the countries that were asked this question, many households experienced a ch

## Mapping survey data {#ambarom-maps}

While the table effectively presents the data, a map could also be insightful. To create a map of the countries, we can use the package {rnaturalearth} and subset North and South America with the `ne_countries()` function [@R-rnaturalearth]. The function returns a simple features (sf) object with many columns [@sf2023], but most importantly, `soverignt` (sovereignty), `geounit` (country or territory), and `geometry` (shape). For an example of the difference between sovereignty and country/territory, the United States, Puerto Rico, and the U.S. Virgin Islands are all separate units with the same sovereignty. A map without data is plotted in Figure \@ref(fig:ambarom-americas-map) using `geom_sf()` from the {ggplot2} package, which plots sf objects [@ggplot2wickham].
While the table effectively presents the data, a map could also be insightful. To create a map of the countries, we can use the package {rnaturalearth} and subset North and South America with the `ne_countries()` function [@R-rnaturalearth]. The function returns a simple features (sf) object with many columns [@sf2023man], but most importantly, `soverignt` (sovereignty), `geounit` (country or territory), and `geometry` (the shape). For an example of the difference between sovereignty and country/territory, the United States, Puerto Rico, and the U.S. Virgin Islands are all separate units with the same sovereignty. A map without data is plotted in Figure \@ref(fig:ambarom-americas-map) using `geom_sf()` from the {ggplot2} package, which plots sf objects [@ggplot2wickham].

```{r}
#| label: ambarom-americas-map
Expand Down Expand Up @@ -460,7 +460,7 @@ country_shape_upd <- country_shape_crop %>%
"United States", geounit))
```

Now that the country names match, we can merge the survey and map data and then plot the resulting dataset. We begin with the map file and merge it with the survey estimates generated in Section \@ref(ambarom-estimates) (`covid_worry_country_ests` and `covid_educ_ests`). We use the {dplyr} function of `full_join()`, which joins the rows in the map data and the survey estimates based on the columns `geounit` and `Country`. A full join keeps all the rows from both datasets, matching rows when possible. For any rows without matches, the function fills in an `NA` for the missing value [@sf2023].
Now that the country names match, we can merge the survey and map data and then plot the resulting dataset. We begin with the map file and merge it with the survey estimates generated in Section \@ref(ambarom-estimates) (`covid_worry_country_ests` and `covid_educ_ests`). We use the {dplyr} function of `full_join()`, which joins the rows in the map data and the survey estimates based on the columns `geounit` and `Country`. A full join keeps all the rows from both datasets, matching rows when possible. For any rows without matches, the function fills in an `NA` for the missing value [@sf2023man].

```{r}
#| label: ambarom-join-maps-ests
Expand Down
86 changes: 53 additions & 33 deletions book.bib
Original file line number Diff line number Diff line change
Expand Up @@ -59,38 +59,38 @@ @book{fuller2011sampling
publisher = {John Wiley \& Sons}
}
@misc{lapopdat,
title = {The AmericasBarometer by the LAPOP Lab},
title = {The {A}mericas{B}arometer by the {LAPOP} Lab},
year = 2023,
howpublished = {\url{www.vanderbilt.edu/lapop}}
}
@misc{lapop,
title = {The AmericasBarometer by the LAPOP Lab},
title = {The {A}mericas{B}arometer by the {LAPOP} Lab},
author = {{LAPOP}},
year = 2023,
howpublished = {\url{www.vanderbilt.edu/lapop}}
}
@misc{lapop-about,
title = {About the AmericasBarometer},
title = {About the {A}mericas{B}arometer},
author = {{LAPOP}},
year = 2023,
howpublished = {\url{https://www.vanderbilt.edu/lapop/about-americasbarometer.php}}
}
@report{lapop-tech,
title = {AmericasBarometer 2021: Technical Information},
@techreport{lapop-tech,
title = {Americas{B}arometer 2021: Technical Information},
author = {{LAPOP}},
year = 2021,
howpublished = {\url{https://www.vanderbilt.edu/lapop/ab2021/AB2021-Technical-Report-v1.0-FINAL-eng-030722.pdf}},
institution = {Vanderbilt University}
}
@report{lapop-can,
title = {AmericasBarometer 2021 - Canada: Technical Information},
@techreport{lapop-can,
title = {Americas{B}arometer 2021 - {C}anada: Technical Information},
author = {{LAPOP}},
year = 2021,
howpublished = {\url{http://datasets.americasbarometer.org/database/files/ABCAN2021-Technical-Report-v1.0-FINAL-eng-110921.pdf}},
institution = {Vanderbilt University}
}
@report{lapop-usa,
title = {AmericasBarometer 2021 - {U.S.}: Technical Information},
@techreport{lapop-usa,
title = {Americas{B}arometer 2021 - {U.S.}: Technical Information},
author = {{LAPOP}},
year = 2021,
howpublished = {\url{http://datasets.americasbarometer.org/database/files/ABUSA2021-Technical-Report-v1.0-FINAL-eng-110921.pdf}},
Expand Down Expand Up @@ -153,17 +153,20 @@ @article{gelman2007weights
publisher = {Institute of Mathematical Statistics},
volume = 22,
number = 2,
pages = {153 -- 164},
pages = {153--164},
doi = {10.1214/088342306000000691},
howpublished = {\url{https://doi.org/10.1214/088342306000000691}},
keywords = {multilevel modeling, poststratification, sampling weights, shrinkage}
}
@article{gard2023weightsdef,
title = {Why weight? Analytic approaches for large-scale population neuroscience data},
author = {Gard, Arianna M. and Hyde, Luke W. and Heeringa, Steven G. and West, Brady T. and Mitchell, Colter},
year = 2023,
journal = {Dev Cogn Neurosci},
doi = {10.1016/j.dcn.2023.101196},
title = {Why weight? Analytic approaches for large-scale population neuroscience data},
journal = {Developmental Cognitive Neuroscience},
volume = {59},
pages = {101196},
year = {2023},
issn = {1878-9293},
doi = {https://doi.org/10.1016/j.dcn.2023.101196},
author = {Arianna M. Gard and Luke W. Hyde and Steven G. Heeringa and Brady T. West and Colter Mitchell},
howpublished = {\url{https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9843279/}}
}
@article{bollen2016weightsreg,
Expand All @@ -178,10 +181,10 @@ @article{bollen2016weightsreg
howpublished = {\url{https://doi.org/10.1146/annurev-statistics-011516-012958}}
}
@book{lumley2010complex,
title = {Complex Surveys: A Guide to Analysis Using {R}},
title = {Complex surveys: a guide to analysis Using {R}},
author = {Thomas Lumley},
year = 2010,
publisher = {John Wiley and Sons}
publisher = {John Wiley \& Sons}
}
@article{hansen1987,
title = {Some history and reminiscences on survey sampling},
Expand Down Expand Up @@ -225,9 +228,9 @@ @inbook{mack
year = 2018,
booktitle = {Managing Missing Data in Patient Registries: Addendum to Registries for Evaluating Patient Outcomes: A User’s Guide, Third Edition [Internet]},
howpublished = {\url{https://www.ncbi.nlm.nih.gov/books/NBK493614/}},
institution = {Rockville (MD): Agency for Healthcare Research and Quality (US)}
publisher = {Rockville (MD): Agency for Healthcare Research and Quality (US)}
}
@report{debell,
@techreport{debell,
title = {How to Analyze ANES Survey Data},
author = {DeBell, Matthew},
year = 2010,
Expand Down Expand Up @@ -265,24 +268,25 @@ @book{wickham2019advanced
title = {Advanced {R}},
author = {Wickham, Hadley},
year = 2019,
publisher = {CRC press},
publisher = {CRC {P}ress},
howpublished = {\url{https://adv-r.hadley.nz/}}
}
@book{wickham2023r4ds,
title = {R for Data Science: Import, Tidy, Transform, Visualize, and Model Data},
author = {Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett},
edition = {2rd Edition},
edition = {2nd},
year = 2023,
publisher = {O'Reilly Media},
howpublished = {\url{https://r4ds.hadley.nz/}}
}
@software{R-quarto,
@misc{R-quarto,
author = {Allaire, J.J. and Teague, Charles and Scheidegger, Carlos and Xie, Yihui and Dervieux, Christophe},
doi = {10.5281/zenodo.5960048},
month = feb,
title = {{Quarto}},
url = {https://github.com/quarto-dev/quarto-cli},
howpublished = {\url{https://github.com/quarto-dev/quarto-cli}},
version = {1.4},
note = {Type: Software},
year = {2024}
}
@misc{acs-pums-2021,
Expand Down Expand Up @@ -399,7 +403,7 @@ @book{Bradburn2004
author = {Norman M. Bradburn and Seymour Sudman and Brian Wansink},
year = 2004,
publisher = {Jossey-Bass},
edition = {2nd Edition}
edition = {2nd}
}
@book{Fowler1989,
title = {Standardized Survey Interviewing},
Expand Down Expand Up @@ -476,8 +480,8 @@ @inproceedings{Scott2007
pages = {3514--3518},
howpublished = {\url{http://www.asasrms.org/Proceedings/y2007/Files/JSM2007-000874.pdf}}
}
@book{git-w-R,
title = {Happy Git and GitHub for the useR},
@misc{git-w-R,
title = {Happy {G}it and {G}itHub for the use{R}},
author = {Jenny Bryan},
year = {2023},
howpublished = {\url{https://happygitwithr.com/}}
Expand All @@ -494,8 +498,7 @@ @misc{eia-cdd
title = "Units and calculators explained: Degree days",
author = "{U.S. Energy Information Administration}",
howpublished = "\url{https://www.eia.gov/energyexplained/units-and-calculators/degree-days.php}",
year = 2023,
note = "Accessed: 2024-03-26"
year = 2023
}
@article{npr-voting-trend,
author = "Barbara Sprunt",
Expand Down Expand Up @@ -524,15 +527,15 @@ @Book{ggplot2wickham
publisher = {Springer-Verlag New York},
year = {2016},
isbn = {978-3-319-24277-4},
url = {https://ggplot2.tidyverse.org},
howpublished = {\url{https://ggplot2.tidyverse.org}}
}

@Article{gtsummarysjo,
author = {Daniel D. Sjoberg and Karissa Whiting and Michael Curry and Jessica A. Lavery and Joseph Larmarange},
title = {Reproducible Summary Tables with the {gtsummary} Package},
journal = {{The R Journal}},
year = {2021},
url = {https://doi.org/10.32614/RJ-2021-053},
howpublished = {\url{https://doi.org/10.32614/RJ-2021-053}},
doi = {10.32614/RJ-2021-053},
volume = {13},
issue = {1},
Expand All @@ -547,28 +550,45 @@ @Article{targetslandau
volume = {6},
number = {57},
pages = {2959},
url = {https://doi.org/10.21105/joss.02959},
doi = {10.21105/joss.02959},
}

@Article{jsonliteooms,
title = {The {jsonlite} Package: A Practical and Consistent Mapping Between JSON Data and {R} Objects},
author = {Jeroen Ooms},
journal = {arXiv:1403.2805 [stat.CO]},
year = {2014},
url = {https://arxiv.org/abs/1403.2805},
howpublished = {\url{https://arxiv.org/abs/1403.2805}},
}

@Article{visdattierney,
title = {{visdat}: Visualising Whole Data Frames},
author = {Nicholas Tierney},
doi = {10.21105/joss.00355},
url = {http://dx.doi.org/10.21105/joss.00355},
howpublished = {\url{http://dx.doi.org/10.21105/joss.00355}},
year = {2017},
journal = {Journal of Open Source Software},
volume = {2},
number = {16},
pages = {355}
}

@Book{sf2023man,
author = {Edzer Pebesma and Roger Bivand},
title = {{Spatial Data Science: With applications in R}},
year = {2023},
publisher = {{Chapman \& Hall/CRC}},
howpublished = {\url{https://r-spatial.org/book/}},
doi = {10.1201/9780429459016}
}
@Book{rmarkdown2020man,
title = {R Markdown Cookbook},
author = {Yihui Xie and Christophe Dervieux and Emily Riederer},
publisher = {Chapman \& Hall/CRC},
year = {2020},
isbn = {9780367563837},
howpublished = {\url{https://bookdown.org/yihui/rmarkdown-cookbook}}
}
@misc{recs-svy,
title = {Residential Energy Consumption Survey (RECS) Form EIA-457A 2020 Household Questionnaire},
author = {{U.S. Energy Information Administration}},
Expand Down

0 comments on commit ff5bf2d

Please sign in to comment.