Title: | Explore and Import 'Metopio' Health Atlas Data and Spatial Layers |
---|---|
Description: | Allows for painless use of the 'Metopio' health atlas APIs <https://metopio.com/how-it-works/atlas/> to explore and import data. 'Metopio' health atlases store open public health data. See what topics (or indicators) are available among specific populations, periods, and geographic layers. Download relevant data along with geographic boundaries or point datasets. Spatial datasets are returned as 'sf' objects. |
Authors: | Ryan Zomorrodi [aut, cre, cph] |
Maintainer: | Ryan Zomorrodi <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.1.9000 |
Built: | 2024-12-23 04:24:30 UTC |
Source: | https://github.com/ryanzomorrodi/healthatlas |
List all combinations of population, periods, and
geographic layers available for a given topic. To
search for individual topics use ha_topics()
.
ha_coverage(topic_key, layer_key = NULL, keys_only = FALSE, progress = TRUE)
ha_coverage(topic_key, layer_key = NULL, keys_only = FALSE, progress = TRUE)
topic_key |
Unique ID specifying a topic. |
layer_key |
Character string or vector of Unique IDs for geographic layers. |
keys_only |
Return only keys? |
progress |
Display a progress bar? |
Topic coverage tibble.
ha_set("chicagohealthatlas.org") ha_coverage("POP", progress = FALSE)
ha_set("chicagohealthatlas.org") ha_coverage("POP", progress = FALSE)
Obtain data for one or more topics within specified populations for specified time periods and geographic scale.
All combinations of topic, population, period, and layer will be returned. Warnings will be generated for any invalid combinations.
ha_data( topic_key, population_key, period_key, layer_key, geometry = FALSE, progress = TRUE )
ha_data( topic_key, population_key, period_key, layer_key, geometry = FALSE, progress = TRUE )
topic_key |
Character string or vector of Unique IDs(s) specifying topic(s). |
population_key |
Character string or vector of Unique ID(s) for population stratification(s). |
period_key |
Character string or vector of Unique ID(s) for time period(s). |
layer_key |
Character string specifying an Unique ID for a geographic layer. |
geometry |
Attach geometry to output? |
progress |
Display a progress bar? |
Data tibble containing value and standard error for each topic measure.
ha_set("chicagohealthatlas.org") ha_data("POP", "H", "2014-2018", "zip")
ha_set("chicagohealthatlas.org") ha_data("POP", "H", "2014-2018", "zip")
Get health atlas currently connected to.
ha_get()
ha_get()
Current value of ha_URL environment variable.
ha_set("chicagohealthatlas.org") ha_get()
ha_set("chicagohealthatlas.org") ha_get()
Import geographic layer as a sf
object.
ha_layer(layer_key, progress = TRUE)
ha_layer(layer_key, progress = TRUE)
layer_key |
Unique ID for a geographic layer. |
progress |
Display a progress bar? |
sf
geographic layer.
ha_set("chicagohealthatlas.org") ha_layer("zip", progress = FALSE)
ha_set("chicagohealthatlas.org") ha_layer("zip", progress = FALSE)
List all geographic layers available.
ha_layers()
ha_layers()
Layer information tibble.
ha_set("chicagohealthatlas.org") ha_layers()
ha_set("chicagohealthatlas.org") ha_layers()
Import point layer as a sf
object.
ha_point_layer(point_layer_uuid)
ha_point_layer(point_layer_uuid)
point_layer_uuid |
Unique ID for a point layer. |
sf
point layer.
ha_set("chicagohealthatlas.org") ha_point_layer("67f58fa0-0dfa-4ee9-8600-c1ab4a093dc6")
ha_set("chicagohealthatlas.org") ha_point_layer("67f58fa0-0dfa-4ee9-8600-c1ab4a093dc6")
List all point layers available.
ha_point_layers()
ha_point_layers()
Point layer information tibble.
ha_set("chicagohealthatlas.org") ha_point_layers()
ha_set("chicagohealthatlas.org") ha_point_layers()
Set health atlas to connect to.
ha_set(ha_URL)
ha_set(ha_URL)
ha_URL |
URL of the health atlas home page. |
No return value. Sets ha_URL environment variable.
ha_set("chicagohealthatlas.org")
ha_set("chicagohealthatlas.org")
List the topic subcategories, which can be
used to filter topics within ha_topics()
.
ha_subcategories()
ha_subcategories()
Topic subcategory tibble.
ha_set("chicagohealthatlas.org") ha_subcategories()
ha_set("chicagohealthatlas.org") ha_subcategories()
List all topics available with descriptions and units.
ha_topics(subcategory_key = NULL, progress = TRUE)
ha_topics(subcategory_key = NULL, progress = TRUE)
subcategory_key |
Unique id for a topic subcategory |
progress |
Display a progress bar? |
Topics information tibble.
ha_set("chicagohealthatlas.org") ha_topics("education", progress = FALSE)
ha_set("chicagohealthatlas.org") ha_topics("education", progress = FALSE)