getEstimate: Get AskCHIS NE Estimates

Description Usage Arguments Examples

Description

This function gets data from the AskCHIS NE API. If attributes = null, it will return the population, estimate, as well as other statistical attributes.

Usage

1
2
getEstimate(indicator, attributes = NULL, geoLevel = NULL,
  locations = NULL, year = NULL, apiKey)

Arguments

indicator

The indicator id (can be obtained using getMetadata()) (required).

attributes

The specific attributes requested. A comma separated list that can include: estimate, population, SE, CI_L95, CI_U95, CV, MSE. Will return all if not specified (optional).

geoLevel

The specific level of geography requested. A list that can include: zcta, cities, counties, assembly, congress, senate, state (optional).

locations

The specific locations requested. A comma separated list that must include geoIds (can be obtained from geoSearch()) (optional).

year

The year of the data you request. Indicators and years available can be requested through the getMetadata() function. (optional).

apiKey

Your API key (required).

Examples

1
2
3
4
5
6
7
## Not run: 
getEstimate(indicator = 'OBESEA', attributes = list("estimate", "population"), locations = list("666000", "644000"),
 year = 2014, apiKey = '<YOUR API KEY>')
# Returns a data frame with adult obesity estimates and populations for Los Angeles and
# San Diego cities.

## End(Not run)

bogdanrau/askchisne documentation built on May 12, 2019, 11:31 p.m.