Difference between revisions of "Main Page/Research/Papers/kernel density estimators"
From phurvitz
Phil Hurvitz (talk | contribs) |
Phil Hurvitz (talk | contribs) m (User:Phil Hurvitz/Projects/In process/Papers/kernel density estimators moved to Main Page/Research/Papers/kernel density estimators) |
(No difference)
|
Latest revision as of 16:23, 27 January 2009
Contents
ZCTAs
one of the things I wanted to calculate was the pop of zctas:
- download: ZCTA
- replace successive blanks with commas (sed "s/ */,/")
- R code to get the mean population
z <- read.csv("zcta5.txt",header=F, as.is=T) states <- z[substr(z[,1],1,2)!="-8",] states <- states[substr(states[,1],1,2)!="-9",] states <- states[substr(states[,1],1,2)!="-9",] states <- states[substr(states[,1],1,2)!="-7",] states <- states[substr(states[,1],1,2)!="PR",] states <- states[substr(states[,1],1,2)!="PA",] states <- states[states[,4]!="(part)",] states[,4] <- as.numeric(states[,4]) mean.zcta.pop <- mean(states[,4])