Learn R Programming

geogenr (version 2.0.1)

as_GeoPackage: 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 acs_5yr_geo as_GeoPackage(geo, dir = NULL, name = NULL)

Value

A string, file name.

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.

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

Run this code

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)

Run the code above in your browser using DataLab