if (FALSE) {
# Auto-detect and geocode - simplest usage
geodata <- auto_geocode_data("mydata.csv")
# With state names
state_data <- data.frame(
state = c("California", "Texas", "New York"),
population = c(39538223, 29145505, 20201249)
)
state_sf <- auto_geocode_data(state_data)
# With FIPS codes
fips_data <- data.frame(
fips = c("39049", "39035", "39113"), # Ohio counties
unemployment_rate = c(4.2, 3.8, 5.1)
)
county_sf <- auto_geocode_data(fips_data)
# With HUC codes (handles various formats)
watershed_data <- data.frame(
HUC_8 = c("04100009", "04100012", "04110002"),
water_quality_index = c(72, 65, 80)
)
huc_sf <- auto_geocode_data(watershed_data)
# Explicit specification
zip_sf <- auto_geocode_data(
my_data,
entity_column = "postal_code",
entity_type = "zipcode"
)
# Then use with your other GeoSpatialSuite functions
quick_map(state_sf, variable = "population")
}
Run the code above in your browser using DataLab