Title: | Import Public Health Ontario's Ontario Marginalization Index |
---|---|
Description: | The Ontario Marginalization Index is a socioeconomic model that is built on Statistics Canada census data. The model consists of four dimensions: In 2021, these dimensions were updated to "Material Resources" (previously called "Material Deprivation"), "Households and Dwellings" (previously called "Residential Instability"), "Age and Labour Force" (previously called "Dependency"), and "Racialized and Newcomer Populations" (previously called "Ethnic Concentration"). This update reflects a movement away from deficit-based language. 2021 data will load with these new dimension names, wheras 2011 and 2016 data will load with the historical dimension names. Each of these dimensions are imported for a variety of geographic levels (DA, CD, etc.) for the 2021, 2011 and 2016 administrations of the census. These data sets contribute to community analysis of equity with respect to Ontario's Anti-Racism Act. The Ontario Marginalization Index data is retrieved from the Public Health Ontario website: <https://www.publichealthontario.ca/en/data-and-analysis/health-equity/ontario-marginalization-index>. The shapefile data is retrieved from the Statistics Canada website: <https://www12.statcan.gc.ca/census-recensement/2011/geo/bound-limit/bound-limit-eng.cfm>. |
Authors: | William Conley [aut, cre] |
Maintainer: | William Conley <[email protected]> |
License: | GPL-3 |
Version: | 1.0.3 |
Built: | 2025-03-03 05:19:29 UTC |
Source: | https://github.com/wiiison/onmarg |
This function loads Public Health Ontario's Ontario Marginalization Index data into a dataframe which includes geographic variables (e.g. DA labels, CSD labels) and associated values for the four OnMarg domains of Instability, Material Deprivation, Dependency and Ethnic Concentration.
om_data(year, level)
om_data(year, level)
year |
Integer year of data to load |
level |
The level of precision to load, this can be "DAUID", "CTUID", "CSDUID", "CCSUID", "CDUID", "CMAUID", "PHUUID", "LHINUID", or "LHIN_SRUID" |
If the data file is unable to be downloaded, an error message will be produced.
A dataframe containing the Marginalization Index for every geographic identifier
DA_2016_data <- om_data(2016, "DAUID")
DA_2016_data <- om_data(2016, "DAUID")
This function combines Public Health Ontario's Ontario Marginalization Index data with Statistics Canada's shape files to create an sf_object. The sf_object can be used for mapping with packages such as ggplot, and for spatial analysis.
om_geo(year, level, format, quiet_sf = FALSE)
om_geo(year, level, format, quiet_sf = FALSE)
year |
Integer year of data to load. |
level |
The level of precision to load, this can be "DAUID", "CTUID", "CSDUID", "CCSUID", "CDUID", "CMAUID", "PHUUID", "LHINUID", or "LHIN_SRUID". |
format |
The format for the geographic object, this can be "sf" or "sp". |
quiet_sf |
Logical, whether or not to print a message after transforming geometry projection. |
If a year or level is used that does not exist or is not implemented, an error message will be produced. If the geometry file is unable to be downloaded, an error message will be produced.
A sf or sp object containing the Marginalization Index and geographic boundaries for every geographic identifier.
## Not run: DA_2016_geo <- om_geo(2016, "DAUID", "sf") ## End(Not run)
## Not run: DA_2016_geo <- om_geo(2016, "DAUID", "sf") ## End(Not run)
NA values are ignored and left NA
om_quint(x)
om_quint(x)
x |
Vector of values to recalculate quintiles for |
It can be used to recalculate the quintile scores for subsets of the OnMarg dataset.
Vector of quintile scores for each element in the input vector
## Not run: city_data$DEPRIVATION_Q_DA16 <- om_quint(city_data$DEPRIVATION_DA16) ## End(Not run)
## Not run: city_data$DEPRIVATION_Q_DA16 <- om_quint(city_data$DEPRIVATION_DA16) ## End(Not run)