ramhiser / noncensus

U.S. Census Region and Demographic Data
Other
26 stars 7 forks source link

Populations in states data are misaligned #32

Open ramhiser opened 9 years ago

ramhiser commented 9 years ago

Quote from an email from Dan Irons:

In the “states” dataset, state populations appear to have been misassigned. For example, the populations of Alaska and Alabama have been transposed, likewise the populations of Arkansas and Alabama, and so on with each pair of states on down the list (although I haven’t checked every row). I haven’t looked at the package source to determine where the errors are introduced, and of course it is entirely possible that the errors were inherited from the data sources that you took the data from.

ramhiser commented 9 years ago

It turns out Dan was right. I was using base::merge to join some manually defined state information with the populations obtained from the US Census Bureau. The join was flawed. Using some dplyr::inner_join magic, the populations appear to be correct.