Read the cells of an area frame exported by the areaframe service
Source:R/connectors.R
read_areaframe.RdReads a frame of grid cells as exported by the area-frame service (a
Parquet file with cell_index, centroid_lon, centroid_lat, area_m2
and the geometry as WKB, plus any stratum or covariate columns) or any
spatial file sf can read (GeoPackage, GeoJSON, shapefile), and returns
the plain frame select_units() works on: unit, lat, lon, area
in square kilometres (also used as size), and the other columns. With
sf = TRUE the geometries are kept and an sf object is returned instead
(see as_frame() and as_sf()).
Examples
if (FALSE) { # \dontrun{
cells <- read_areaframe("cells.parquet")
s <- select_units(cells, n = 300, size = "area", strata = "stratum")
} # }