-
Notifications
You must be signed in to change notification settings - Fork 0
B-Nilson/canadata
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# canadata
<!-- badges: start -->
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://CRAN.R-project.org/package=canadata)
<!-- badges: end -->
The goal of canadata ("Canada" + "data") is to provide standardized Canadian spatial datasets for use in R.
The majority of data comes effectively unaltered from open data sources such as OpenStreetMap (thanks to {osmdata}) and Canada's Federal OpenData platform. Where possible, links to related datasets will be added (such as what Province/Territory, or forecast zone a community is in).
All polygon layers have been smoothed as minimally as possible for file size requirements while trying to maintain spatial accuracy. As a result, more complex boundaries may be smoother than in reality causing potential edge case issues. Please [submit and issue](https://github.com/B-Nilson/canadata/issues/new) if you encounter a problem that could be resolved be less smoothing.
All point layers have been saved as non-sf objects (lat/lng columns instead of a POINT geometry), and require converting to sf before performing spatial operations (see #converting-point-layers)
## Installation
You can install the development version of canadata like so:
``` r
# install.packages("pak")
pak::pak("B-Nilson/canadata")
```
## Datasets
The primary datasets made available are:
```{r datasets}
library(canadata)
provinces_and_territories |> print()
forecast_zones |> print()
indigenous_lands |> print()
communities |> print()
indigenous_communities |> print()
gridded_2016_population |> print()
```
## Converting Point Layers
All point layers have been saved as non-sf objects (lat/lng columns instead of a POINT geometry) with a CRS of `"WGS84"`, and require converting to sf before performing spatial operations:
```{r convert_points}
library(canadata)
communities |>
sf::st_as_sf(coords = c("lng", "lat"), crs = "WGS84") |>
print()
indigenous_communities |>
sf::st_as_sf(coords = c("lng", "lat"), crs = "WGS84") |>
print()
gridded_2016_population |>
sf::st_as_sf(coords = c("lng", "lat"), crs = "WGS84") |>
print()
```
About
Canadian Data
Resources
License
Unknown, MIT licenses found
Licenses found
Unknown
LICENSE
MIT
LICENSE.md
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published