Skip to contents

Ten made-up site locations in Alabama, as an sf object of points. Each point lies near the center of an Alabama city. The points were not taken from the locations of Pre-K classrooms or of any other facility, and the data contain no administrative records.

The sites are the sites input of examples that need a routing service, such as the one in cacs_run(), and the default sites_df of the map functions, such as cacs_plot_site_isochrone(). The bundled files legacy_2025_sites.rds and legacy_2025_isochrones.rds, used by several examples that run offline, give the same site_id values to other points, 130 to 440 kilometers away.

Usage

data("cacs_alabama_sites")

Format

An sf object (a data frame with a geometry column) with 10 rows and 5 columns. The points are in longitude and latitude on WGS 84 (EPSG:4326).

site_id

A string, "AL_SITE_01" to "AL_SITE_10".

site_name

A string, "Sample Site 1" to "Sample Site 10".

county_fips

A string giving the five-digit FIPS code of the county that contains the point, such as "01073" (Jefferson County) for the point near Birmingham.

region_label

A string naming the part of the state, such as "Birmingham Metro" or "North"; each site has a different one.

geometry

The point.

Source

Made for this package from public coordinates of the centers of ten Alabama cities: Birmingham, Mobile, Huntsville, Montgomery, Tuscaloosa, Auburn, Decatur, Florence, Dothan, and Gadsden, in the order of site_id. Each point was then moved by a random amount of up to 0.007 degrees of longitude and of latitude (less than 1 kilometer in all), drawn with a fixed random seed.

Examples

library(sf)
data("cacs_alabama_sites", package = "catchmentACS")
print(cacs_alabama_sites)
#> Simple feature collection with 10 features and 4 fields
#> Geometry type: POINT
#> Dimension:     XY
#> Bounding box:  xmin: -88.0382 ymin: 30.68891 xmax: -85.38495 ymax: 34.79879
#> Geodetic CRS:  WGS 84
#>       site_id      site_name county_fips     region_label
#> 1  AL_SITE_01  Sample Site 1       01073 Birmingham Metro
#> 2  AL_SITE_02  Sample Site 2       01097      South Coast
#> 3  AL_SITE_03  Sample Site 3       01089            North
#> 4  AL_SITE_04  Sample Site 4       01101          Central
#> 5  AL_SITE_05  Sample Site 5       01125     West Central
#> 6  AL_SITE_06  Sample Site 6       01081     East Central
#> 7  AL_SITE_07  Sample Site 7       01103    North Central
#> 8  AL_SITE_08  Sample Site 8       01077        Northwest
#> 9  AL_SITE_09  Sample Site 9       01069        Southeast
#> 10 AL_SITE_10 Sample Site 10       01055        Northeast
#>                      geometry
#> 1  POINT (-86.80902 33.52203)
#> 2   POINT (-88.0382 30.68891)
#> 3    POINT (-86.588 34.73295)
#> 4   POINT (-86.2999 32.36788)
#> 5  POINT (-87.56317 33.20985)
#> 6   POINT (-85.4865 32.61439)
#> 7  POINT (-86.98385 34.60084)
#> 8  POINT (-87.67252 34.79879)
#> 9  POINT (-85.38495 31.22738)
#> 10 POINT (-85.99976 34.02062)
nrow(cacs_alabama_sites)               # 10
#> [1] 10
sf::st_crs(cacs_alabama_sites)$epsg    # 4326
#> [1] 4326

# Needs a Census API key, and routes three sites on the public OSRM demo
# server with the osrm package; that server limits the requests it accepts.
if (FALSE) { # \dontrun{
library(sf)
result <- cacs_run(
  sites         = cacs_alabama_sites[1:3, ],
  state         = "AL",
  year          = 2023,
  drive_times   = c(5, 10, 15),
  variables     = "core",
  provider      = "osrm",
  weight_method = "area",
  output        = "long",
  verbose       = FALSE
)
head(result)
} # }