CrunchGeography-class: 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)
# S4 method for CrunchVariable
geo(x)
# S4 method for CrunchVariable,CrunchGeography
geo(x) <- value
# S4 method for CrunchVariable,`NULL`
geo(x) <- value
availableGeodata(x = getAPIRoot())
Arguments
...
for CrunchGeography, named arugments to construct a
CrunchGeography from: geodatum, feature_key, and match_field
data
for CrunchGeography, list of named arugments to construct a
CrunchGeography from: geodatum, feature_key, and match_field
x
a crunch variable
value
value of the geography property to set
Value
geographic information of class CrunchGeography (NULL if there is none)
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:
geodatum an object of class CrunchGeodata which stores references to the Crunch-hosted (geo|topo)json to use
feature_key a character that is the feature inside of the (geo|topo)json to match match_field to (e.g. properties.name)
match_field a character that is the the variable metadata information to match to feature_key to (e.g. name)