Package 'healthatlas'

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

Help Index


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)