Title: | Explore and Import 'Metopio' Health Atlas Data and Spatial Layers |
Version: | 0.2.2 |
Description: | Allows for painless use of the 'Metopio' health atlas APIs https://metopio.com/health-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. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
Depends: | R (≥ 4.1.0) |
Imports: | curl, httr2, tibble, sf, chk |
Suggests: | dplyr, ggplot2, httptest2, knitr, purrr, rmarkdown, testthat (≥ 3.0.0) |
VignetteBuilder: | knitr |
URL: | https://ryanzomorrodi.github.io/healthatlas/, https://github.com/ryanzomorrodi/healthatlas |
Config/testthat/edition: | 3 |
BugReports: | https://github.com/ryanzomorrodi/healthatlas/issues |
NeedsCompilation: | no |
Packaged: | 2025-07-21 17:15:23 UTC; user |
Author: | Ryan Zomorrodi |
Maintainer: | Ryan Zomorrodi <rzomor2@uic.edu> |
Repository: | CRAN |
Date/Publication: | 2025-07-22 09:20:02 UTC |
List Topic Coverage
Description
List all combinations of population, periods, and
geographic layers available for a given topic. To
search for individual topics use ha_topics()
.
Usage
ha_coverage(topic_key, layer_key = NULL, keys_only = FALSE, progress = TRUE)
Arguments
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? |
Value
Topic coverage tibble.
Examples
ha_set("chicagohealthatlas.org")
ha_coverage("POP", progress = FALSE)
Obtain Data
Description
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.
Usage
ha_data(
topic_key,
population_key,
period_key,
layer_key,
geometry = FALSE,
progress = TRUE
)
Arguments
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? |
Value
Data tibble containing value and standard error for each topic measure.
Examples
ha_set("chicagohealthatlas.org")
ha_data("POP", "H", "2014-2018", "zip")
Get Health Atlas Portal
Description
Get health atlas currently connected to.
Usage
ha_get()
Value
Current value of ha_URL environment variable.
Examples
ha_set("chicagohealthatlas.org")
ha_get()
Obtain Geographic Layer
Description
Import geographic layer as a sf
object.
Usage
ha_layer(layer_key, progress = TRUE)
Arguments
layer_key |
Unique ID for a geographic layer. |
progress |
Display a progress bar? |
Value
sf
geographic layer.
Examples
ha_set("chicagohealthatlas.org")
ha_layer("zip", progress = FALSE)
List Geographic Layers
Description
List all geographic layers available.
Usage
ha_layers()
Value
Layer information tibble.
Examples
ha_set("chicagohealthatlas.org")
ha_layers()
Obtain Point Layer
Description
Import point layer as a sf
object.
Usage
ha_point_layer(point_layer_uuid)
Arguments
point_layer_uuid |
Unique ID for a point layer. |
Value
sf
point layer.
Examples
ha_set("chicagohealthatlas.org")
ha_point_layer("67f58fa0-0dfa-4ee9-8600-c1ab4a093dc6")
List Point Layers
Description
List all point layers available.
Usage
ha_point_layers()
Value
Point layer information tibble.
Examples
ha_set("chicagohealthatlas.org")
ha_point_layers()
Set Health Atlas Portal
Description
Set health atlas to connect to.
Usage
ha_set(ha_URL)
Arguments
ha_URL |
URL of the health atlas home page. |
Value
No return value. Sets ha_URL environment variable.
Examples
ha_set("chicagohealthatlas.org")
List Topic Subcategories
Description
List the topic subcategories, which can be
used to filter topics within ha_topics()
.
Usage
ha_subcategories()
Value
Topic subcategory tibble.
Examples
ha_set("chicagohealthatlas.org")
ha_subcategories()
List Topics
Description
List all topics available with descriptions and units.
Usage
ha_topics(subcategory_key = NULL, progress = TRUE)
Arguments
subcategory_key |
Unique id for a topic subcategory |
progress |
Display a progress bar? |
Value
Topics information tibble.
Examples
ha_set("chicagohealthatlas.org")
ha_topics("education", progress = FALSE)