Learn R Programming

nomisdata (version 0.1.1)

fetch_spatial: Fetch Spatial Data

Description

Downloads data in KML format with spatial boundaries.

Usage

fetch_spatial(
  id,
  time = NULL,
  date = NULL,
  geography = NULL,
  select = NULL,
  exclude_missing = FALSE,
  ...,
  parse_sf = TRUE
)

Value

KML data as text or sf object (if parse_sf = TRUE)

Arguments

id

Dataset ID

time

Time period selection (same as fetch_nomis)

date

Specific date selection (alternative to time)

geography

Geography code(s) to filter

select

Column names to include

exclude_missing

Remove missing values if TRUE

...

Additional query parameters (measures, sex, etc.)

parse_sf

If TRUE and sf is available, parse to sf object

Examples

Run this code
# \donttest{
spatial_data <- fetch_spatial(
  "NM_1_1",
  time = "latest",
  geography = "TYPE480",
  measures = 20100,
  sex = 7
)
# }

Run the code above in your browser using DataLab