convert a lat, lon, <value> dataset to county-level values

points2county(griddata)

Arguments

griddata

a data frame with columns lat, lon <some value>.

Value

a data.table with county-level information, including state and county name, state abbreviation, lat, lon, county_fips, state_fips, fips, and interpolated output

Details

Uses the earth function to fit a multivariate spline, and then reproject to the (approximate) centroids of US counties, for counties that fall within the lat / lon range of the data set

Examples

# NOT RUN {
data(ozone)
colnames(ozone) <- c('lon', 'lat', 'ozone')
# }