census-with-r-book
census-with-r-book copied to clipboard
Typo and update tracker
Tracking typos here as I find them. Readers: feel free to let me know here!
- No chapter reference link to Ch9; incorrect link to Ch10 https://walker-data.com/census-r/analyzing-census-microdata.html#pums-data-and-the-tidyverse
- Should say the 2010 Brazilian Census, not 2020 https://walker-data.com/census-r/analyzing-census-microdata.html#pums-data-and-the-tidyverse
- Broken reference due to misspelling https://walker-data.com/census-r/analyzing-census-microdata.html#pums-data-and-the-tidyverse
- Broken reference due to my apparent inability to spell "plotting" correctly: https://walker-data.com/census-r/mapping-census-data-with-r.html#map-making-with-ggplot2-and-geom_sf
- Not a typo, but incorporate discussion from #5 in a callout box here: https://walker-data.com/census-r/other-census-and-government-data-resources.html#loading-microdata-into-a-database
- Add a new section on the 2020 redistricting data here: https://walker-data.com/census-r/an-introduction-to-tidycensus.html#decennial-census
- Modify the conclusion to reflect the addition of 2020 redistricting data https://walker-data.com/census-r/conclusion.html
- Add voting districts here https://walker-data.com/census-r/census-geographic-data-and-applications-in-r.html#data-availability-in-tigris and here https://walker-data.com/census-r/an-introduction-to-tidycensus.html#geography-and-variables-in-tidycensus
Hi Kyle. In the population pyramid section, the text says:
Importantly, to get the visualization to work correctly, value
must be mapped to the y
aesthetic and AGEGROUP
to the x
aesthetic, with the coord_flip()
function then used to plot the bars horizontally instead of vertically.
But the code uses geom_col()
and not coord_flip()
{r first-pyramid-utah, fig.cap = "A first population pyramid"}
ggplot(utah_filtered, aes(x = value, y = AGEGROUP, fill = SEX)) +
geom_col()
Also a typo in chapter 4 where "and" is "anmd":
In turn, it will be necessary to isolate those rows that represent five-year age bands by sex, anmd remove the rows that do not. This can be resolved with some data wrangling using tidyverse tools.
Thank you for catching this @smach!
Section 3.5, first para, last sentence: "roughtly" should be "roughly."
This can be translated roughtly as “we are 90 percent sure that the true value falls within a range defined by the estimate plus or minus the margin of error.”
Section 3.5.1, "for the male population age 85 and up (variable ID B01001_0025)" should readB01001_025.
Same sentence, "there are anywhere between 0 and 45 people in that Census tract." The table presents an estimate of 17 with an MOE of 20 at the 90% CL.
As an aside, I am struggling with the sentence "The appropriate denominator for this estimate is 100 with a margin of error of 3". I am unable to determine, either from the text or from the linked formulas in the Census pdf, how these numbers were drawn from the 25, MOE 5 hypothetical provided prior.
@darrellcarvalho yes, those are typos, thanks for catching. I'll add to the errata. I believe I updated the year in the code, but did not update the corresponding text when the numbers changed.
Regarding the "denominator" - all of those are made-up, hypothetical numbers. "Appropriate denominator" means in this case the ACS estimate that the numerator should be divided by. So you could think of it as if there is an estimate of 25 people in a Census tract aged over 25 with a bachelor's degree (with a margin of error of 5 around that estimate), and 100 total people aged over 25 in that Census tract (with a margin of error of 3 around that estimate), that's how you would determine the MOE for the derived proportion of 0.25.
@darrellcarvalho Ah, I see; I was not understanding that it was standing in as a hypothetical for the total estimate, so I was trying to figure out "how is 100 being generated from the 25, and 3 from the 5?". Thank you for the clarification!
I am loving the book so far!
4.6 Visualizing group-wise comparisons: example running through the section has code and visuals for 6 counties, but text only discusses 3 counties.
End of first paragraph, 6.3.4.2, broken hyperlink to Chapter 4 and question marks should be replaced by numeral 4.
First chunk in 7.7.2, when plotting Gi*, code as-written in book is not functional, throwing error:
Error in UseMethod("rescale") :
no applicable method for 'rescale' applied to an object of class "localG"
Fixed it in my code by coercing localG to float64 using as.double()
, but may be a sticking point for new readers who come across it.
Error in figure title:
Figure 8.14: Interactive scatterplot of PC1 and PC3 colored by cluster
Should read:
Figure 8.14: Interactive scatterplot of PC1 and PC2 colored by cluster