county.pts: approx lat lon of each US County by FIPS - 2020 A dataset...

county.ptsR Documentation

approx lat lon of each US County by FIPS - 2020 A dataset containing latitude and longitude approx of each US county, created as average lat and average lon of all block group internal points.

Description

approx lat lon of each US County by FIPS - 2020 A dataset containing latitude and longitude approx of each US county, created as average lat and average lon of all block group internal points.

Usage

county.pts

Format

A data frame with one row per county and FIPS.COUNTY, lat, lon as colnames

Details

 Creating county.pts from bg.pts to get lat lon of middle roughly of county from block group lat lon dataset: 
 
countylat <- aggregate(bg.pts$lat, by = list(substr(bg.pts$FIPS, 1, 5)), FUN = mean) 
countylon <- aggregate(bg.pts$lon, by = list(substr(bg.pts$FIPS, 1, 5)), FUN = mean) 
countyfips <- countylat$Group.1 
countylat  <- countylat$x 
countylon  <- countylon$x 
county.pts <- data.frame(FIPS.COUNTY = countyfips, lat = countylat, lon = countylon, stringsAsFactors = FALSE) 

 plot(bg.pts$lon, bg.pts$lat, pch = '.', col='gray', xlim = c(-170,-60), ylim = c(18, 75)) 
 points(county.pts$lon, county.pts$lat, pch = '.', col='red')
 text(lookup.states$lon, lookup.states$lat, labels = lookup.states$ST, cex = 0.6)
 
 Also see https://www2.census.gov/geo/docs/maps-data/data/gazetteer/2020_Gazetteer/2020_Gaz_counties_national.zip
  

ejanalysis/proxistat documentation built on April 2, 2024, 10:13 a.m.