as_GeoPackage {geogenr}R Documentation

Save as GeoPackage

Description

Save the data layer (geographic information layer), the metadata layer and the data source description layer in a file in GeoPackage format to be able to work with other tools.

Usage

as_GeoPackage(geo, dir, name)

## S3 method for class 'acs_5yr_geo'
as_GeoPackage(geo, dir = NULL, name = NULL)

Arguments

geo

An acs_5yr_geo object.

dir

A string.

name

A string, file name.

Details

The GeoPackage format only allows defining a maximum of 1998 columns. If the number of variables and columns in the geographic layer exceeds this number, it cannot be saved in this format.

Value

A string, file name.

See Also

Other data exploitation and export functions: as_acs_5yr_geo(), as_flat_table(), as_geomultistar(), as_star_database(), get_metadata(), set_metadata()

Examples


act <- anrc_2021_x01 |>
  select_report(report = "B01002-Median Age By Sex")

geo <- act |>
  as_acs_5yr_geo()

dir <- tempdir()
file <- geo |>
  as_GeoPackage(dir)


[Package geogenr version 2.0.1 Index]