if (requireNamespace("USpopcenters", quietly = TRUE)) {
# The center of population of Alaska
lon_lat_from_area(state = "alAskA")
# The center of population of Cook County, Illinois.
lon_lat_from_area(state = "IL", county = "Cook")
# The center of population of some tract in Manhattan
lon_lat_from_area(geoid = "36061021600")
}
Run the code above in your browser using DataLab