| read_areaframe | R Documentation |
Reads 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()).
read_areaframe(path, sf = FALSE)
path |
Path to the file. |
sf |
Return an |
A tibble, or an sf object.
## Not run:
cells <- read_areaframe("cells.parquet")
s <- select_units(cells, n = 300, size = "area", strata = "stratum")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.