Closed majacannavo closed 3 years ago
Oh, yes, you are completely correct. I fixed it: 88bd193eedd9a4502af4f2ad836af4f3e002c0fc I should have known better when I saw how even all the numbers were. I mapped the distribution of population density and the pattern looked correct. I had pulled the sample population rather than the estimated total population. The data I accidentally provided is the number of people who participated in the ACS survey.
B01003_001
in the American Community Survey is the estimate of the total populationB00001_001
, which I accidentally gave you, is the unweighted sample count of the population
My apologies!I might as well share the R code for this. Call me out if you see anything in error:
library(tidycensus)
library(sf)
states <- list(c("NY","NH","VT","CT","RI","ME","MA","PA","NJ"))
for( i in 1:length(states[[1]])){
if( i == 1 ){
statepop <- get_acs(geography="county subdivision",
variables=c(pop="B01003_001"),
year=2018, geometry=TRUE, output="wide", state=states[[1]][i],
key="1fb2d48d1ae3f73a19d620f258ec9f823ad09b25")
}
else{
statepop <- rbind(statepop, get_acs(geography="county subdivision",
variables=c(pop="B01003_001"),
year=2018, geometry=TRUE, output="wide", state=states[[1]][i],
key="1fb2d48d1ae3f73a19d620f258ec9f823ad09b25") )
}
}
st_write(statepop, "netowns.gpkg")
In the new package is it popE or popM?
From: Joseph Holler notifications@github.com Sent: Saturday, March 6, 2021 4:44:04 PM To: GIS4DEV/GIS4DEV.github.io GIS4DEV.github.io@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [GIS4DEV/GIS4DEV.github.io] Are populations off in netown.gpkg? (#22)
I might as well share the R code for this. Call me out if you see anything in error:
library(tidycensus) library(sf) states <- list(c("NY","NH","VT","CT","RI","ME","MA","PA","NJ")) for( i in 1:length(states[[1]])){ if( i == 1 ){ statepop <- get_acs(geography="county subdivision", variables=c(pop="B01003_001"), year=2018, geometry=TRUE, output="wide", state=states[[1]][i], key="1fb2d48d1ae3f73a19d620f258ec9f823ad09b25") } else{ statepop <- rbind(statepop, get_acs(geography="county subdivision", variables=c(pop="B01003_001"), year=2018, geometry=TRUE, output="wide", state=states[[1]][i], key="1fb2d48d1ae3f73a19d620f258ec9f823ad09b25") ) } } st_write(statepop, "netowns.gpkg")
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/GIS4DEV/GIS4DEV.github.io/issues/22#issuecomment-792067560, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOZTNMOBR4WYSYABDYZGGS3TCKO2JANCNFSM4YXCX6RQ.
popE is population!
From: mtango99 notifications@github.com Date: Saturday, March 6, 2021 at 4:56 PM To: GIS4DEV/GIS4DEV.github.io GIS4DEV.github.io@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [GIS4DEV/GIS4DEV.github.io] Are populations off in netown.gpkg? (#22) In the new package is it popE or popM?
From: Joseph Holler notifications@github.com Sent: Saturday, March 6, 2021 4:44:04 PM To: GIS4DEV/GIS4DEV.github.io GIS4DEV.github.io@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [GIS4DEV/GIS4DEV.github.io] Are populations off in netown.gpkg? (#22)
I might as well share the R code for this. Call me out if you see anything in error:
library(tidycensus) library(sf) states <- list(c("NY","NH","VT","CT","RI","ME","MA","PA","NJ")) for( i in 1:length(states[[1]])){ if( i == 1 ){ statepop <- get_acs(geography="county subdivision", variables=c(pop="B01003_001"), year=2018, geometry=TRUE, output="wide", state=states[[1]][i], key="1fb2d48d1ae3f73a19d620f258ec9f823ad09b25") } else{ statepop <- rbind(statepop, get_acs(geography="county subdivision", variables=c(pop="B01003_001"), year=2018, geometry=TRUE, output="wide", state=states[[1]][i], key="1fb2d48d1ae3f73a19d620f258ec9f823ad09b25") ) } } st_write(statepop, "netowns.gpkg")
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/GIS4DEV/GIS4DEV.github.io/issues/22#issuecomment-792067560, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOZTNMOBR4WYSYABDYZGGS3TCKO2JANCNFSM4YXCX6RQ.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/GIS4DEV/GIS4DEV.github.io/issues/22#issuecomment-792070173, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AS643EJ7DR6PQ2CAPMQC2XLTCKQHHANCNFSM4YXCX6RQ.
and popM is the margin of error, a measure of uncertainty.
I was looking at the town populations in netown.gpkg and it seemed to me like they might be significantly off. I noticed that the population for Syracuse, NY, where I'm from, is listed as 14,000 in netown, whereas it's 143,293 if I look at the ACS 2018 5-year estimates on Social Explorer. I looked at some other cities and towns and noticed that their populations were also drastically different between netown and the data I could find on Social Explorer (or just Googling the population). Not all were off by a factor of 10, though, so I don't think the discrepancy is as simple as that. Are other people noticing the same thing/does anyone know what might be going on?