get_dataset: Load data into R Environment

Description Usage Arguments Value Author(s) Examples

Description

get_dataset retrieves the actual data of a selected dataset from the histing server. The data can be subsetted by providing a vector containing only the needed field names. To store the subsetted dataset persistently in the specified output directory, the export option should be set to TRUE.

Usage

1
2
get_dataset(sel_dataset, fields = FALSE, sp_ref = 4326,
  export = FALSE, format = "shp")

Arguments

sel_dataset

Dataframe, containing the information of a selected dataset.

fields

Vector of characters, containing field names that should be included in the imported subset.

sp_ref

Numeric. An EPSG code of a desired Spatial reference. Default is 4326.

export

Logical, wheter the imported subset should be exported to the output directory or not.

format

Character. If export is TRUE, which export format should be used. Options are "shp", "kml", "csv".

Value

Spatial Object. Ready to use spatial object of the selected dataset with all filters applied.

Author(s)

Sandro Groth

Examples

1
2
3
4
5
datasets <- search_datasets("Zensus 2011", aoi = TRUE)
sel_dataset <- select_dataset(datasets, 1)
## checkout available fields
fields(sel_dataset)
age1829 <- get_dataset(sel_dataset, c("OBJECTID", "NAME", "ALTER_1"), export = T, format = "csv")

SandroGroth/esriOpenData documentation built on May 17, 2019, 4:21 a.m.