View source: R/list_GeographicItems.R
list_GeographicItems | R Documentation |
Lists available geographies (e.g., Fulton County, Georgia) for specified measures and geographic types. If multiple measures or geography types are submitted, the results for each combination of these two inputs will be returned as a separate list element in the output.
list_GeographicItems(
measure,
geo_type = NA,
simplified_output = TRUE,
rollup = 0,
token = NULL
)
measure |
Specifies the measure of interest as an ID or name. IDs should be unquoted; name entries should be quoted strings. |
geo_type |
An optional argument in which you can specify a geographic type as a quoted string (e.g., "State", "County") or a geographic type ID as an unquoted numeric value (e.g., 1, 2). The "geographicType" and "geographicTypeId" columns in the list_geography_types() output contain a list of potential geo_type entries associated with each measure. |
simplified_output |
If TRUE, a simplified output table is returned. If FALSE, the raw output from the Tracking Network Data API is returned. The default is TRUE. |
rollup |
Submitting a value of 1 returns only parent geographies (e.g., for a county-level measure, the states containing the relevant counties will be returned). A value of 0 returns the child geographies (e.g., for a county-level measure, all counties where there is data will be returned). This argument does nothing if the focal geography type is already a state or tribal area (highest level geographic type). The default is 0. |
token |
An optional argument to submit a Tracking API token acquired from trackingsupport(AT)cdc.gov as a quoted string. It is recommended that you save your token using the tracking_api_token() function so that you don't need to enter your token when you run this function. It will be automatically pulled from you .Renviron file. |
This function returns a list with each element containing a data frame corresponding to each combination of the specified measures and geographic types.
## Not run:
geo1_id<-list_GeographicItems(measure=370)
geo2_name<-
list_GeographicItems(measure=c("Number of summertime (May-Sep) heat-related deaths, by year"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.