set_metadata {geogenr} | R Documentation |
Set metadata layer
Description
The metadata layer includes the names and description through various fields of the variables contained in the reports.
Usage
set_metadata(geo, metadata)
## S3 method for class 'acs_5yr_geo'
set_metadata(geo, metadata)
Arguments
geo |
An |
metadata |
A |
Details
When we set the metadata layer, after filtering it, the data layer is also filtered keeping only the variables from the metadata layer.
Value
A sf
object.
See Also
Other data exploitation and export functions:
as_GeoPackage()
,
as_acs_5yr_geo()
,
as_flat_table()
,
as_geomultistar()
,
as_star_database()
,
get_metadata()
Examples
act <- anrc_2021_x01 |>
select_report(report = "B01002-Median Age By Sex")
geo <- act |>
as_acs_5yr_geo()
metadata <- geo |>
get_metadata()
metadata <- dplyr::filter(metadata, item2 == "Female")
geo2 <- geo |>
set_metadata(metadata)
[Package geogenr version 2.0.1 Index]