om_geo | R Documentation |
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)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.