CrunchGeography-class {crunch}R Documentation

Geography properties for crunch variables

Description

Crunch stores geographic data as variable metadata. There are a number of functions that help access and change this metadata.

Usage

CrunchGeography(..., data = NULL)

geo(x)

geo(x) <- value

## S4 method for signature 'CrunchVariable'
geo(x)

## S4 replacement method for signature 'CrunchVariable,CrunchGeography'
geo(x) <- value

## S4 replacement method for signature 'CrunchVariable,'NULL''
geo(x) <- value

availableGeodata(x = getAPIRoot())

Arguments

...

for CrunchGeography, named arguments from which to construct a CrunchGeography: geodatum, feature_key, and match_field

data

for CrunchGeography, list of named arguments from which to construct a CrunchGeography: geodatum, feature_key, and match_field

x

a crunch variable

value

value of the geography property to set

Details

geo retrieves the geographic information associate with a variable. If there is geographic information it returns an object of class CrunchGeography otherwise it returns NULL.

CrunchGeography objects store geography metadata from a variable. There are three slots:

Value

geographic information of class CrunchGeography (NULL if there is none)

Examples

## Not run: 
geo(ds$location)

geo(ds$location)$feature_key <- "properties.name"
geo(ds$location)$match_field <- "name"

## End(Not run)

[Package crunch version 1.30.4 Index]