Type: | Package |
Title: | Access the Michigan Substance Use Vulnerability Index (MI-SUVI) |
Version: | 0.1.1 |
Maintainer: | Brenden Smith <brendensmithmi@gmail.com> |
Description: | Easily import the MI-SUVI data sets. The user can import data sets with full metrics, percentiles, Z-scores, or rankings. Data is available at both the County and Zip Code Tabulation Area (ZCTA) levels. This package also includes a function to import shape files for easy mapping and a function to access the full technical documentation. All data is sourced from the Michigan Department of Health and Human Services. |
License: | CC0 |
URL: | https://github.com/brendensm/misuvi |
Encoding: | UTF-8 |
LazyData: | true |
Depends: | R (≥ 4.1.0) |
RoxygenNote: | 7.3.1 |
Imports: | curl, sf, tigris |
NeedsCompilation: | no |
Packaged: | 2025-02-10 16:37:51 UTC; b |
Author: | Brenden Smith [aut, cre, cph] |
Repository: | CRAN |
Date/Publication: | 2025-02-10 16:50:02 UTC |
Add shape files to your data
Description
This function queries shape files from the tigris package. This function returns an sf object.
Usage
add_geometry(x)
Arguments
x |
a data frame for which you want to add shape files to. Must be one of the MI-SUVI data sets. |
Value
an sf data.frame of MI-SUVI data.
Examples
## Not run:
my_data <- misuvi_load() |> add_geometry()
## End(Not run)
View misuvi data dictionary
Description
This package provides a tidy version of the MI-SUVI data sets. This function returns a data frame of the cleaned variable names and the original variable names.
Usage
dictionary()
Value
A data.frame of the abbreviated and full names of the MI-SUVI variables.
Examples
dictionary()
View the MI-SUVI Documentation
Description
This function opens up a PDF of the MI-SUVI documentation in your web browser.
Usage
documentation()
Value
NULL, opens a web browser of the technical documentation.
Examples
documentation()
Load MI-SUVI Data
Description
This function allows the user to select the MI-SUVI data set they want returned.
Usage
misuvi_load(geography = "county", type = "zscores", moe = FALSE)
Arguments
geography |
Choose the geographic level you want returned to you. "county" or "zcta". |
type |
Select the type of data frame you would like returned. Options include "metrics", "percentiles", "zscores", and "ranks". |
moe |
Logical – choose whether margin of error variables are returned. This applies to the "metrics" data sets only. |
Value
A clean data.frame of MI-SUVI data.
Examples
zcta_metrics <- misuvi_load("zcta", "metrics")
county_zscores <- misuvi_load("county", "zscores")
Regional Groupings for Michigan
Description
This dataset provides cross walks between Michigan Counties and PIHPs, regions, urbanicity groupings, emergency preparedness regionals, and Michigan State Police Districts.
Usage
regional_groupings
Format
'regional_groupings' A data frame with 83 rows and 10 columns.
Source
Downloaded from the State of Michigan's website: https://www.michigan.gov/opioids/-/media/Project/Websites/opioids/documents/Public-Use-Dataset-County-Population-and-Regional-Groupings.xlsx?rev=6ac0d413e9164876b1bcd32acfc30f0c