noncensus icon indicating copy to clipboard operation
noncensus copied to clipboard

Populations in states data are misaligned

Open ramhiser opened this issue 11 years ago • 1 comments

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 avatar Dec 20 '14 01:12 ramhiser

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.

ramhiser avatar Dec 20 '14 02:12 ramhiser