[!NOTE] PRIOGRID v.3.0.1 is an unstable Alpha release. We will be releasing a Beta version shortly.
An R-package for collecting and standardizing open spatial data into a common grid format.
Resources: - R-package repository - Documentation - Suggest data sources and variables, or report issues - Download PRIOGRID data as .zip
What’s New in PRIOGRID v.3.x
- Better metadata handling — Stores information about data licenses, citations, and download URLs. Automatically downloads data and handles local data with user-specified options.
-
R, not SQL — More researchers know R, and the package leverages excellent spatial-data infrastructure with
sf,terra, andexactextractr. - Flexible spatio-temporal configuration — Change resolution, extent, and projection to test the modifiable areal unit problem or create tailored datasets (e.g., area-equal projections for polar regions).
- PRIOGRID is a research tool, not just a dataset.
Installation
Install PRIOGRID from GitHub using remotes or renv:
install.packages("renv")
renv::install("prio-data/priogrid")Optional R Packages
terra, sf, exactextractr, and arrow are listed in Suggests and are not installed automatically. They are only required for specific functionality (working with rasters) and will be requested the first time you use a function that needs them.
Troubleshooting Installation
terra, sf, and exactextractr depend on system-level geo-libraries. If installation of these packages fails, refer to their installation guides:
If you continue to experience issues after following these guides, please file an issue.
SSL Certificate Issues
If you encounter SSL certificate errors when downloading data, try:
- Install system certificates:
Mac (Homebrew users):
Linux (Ubuntu/Debian):
- Install CURL R-package from source:
install.packages("curl", type = "source")Getting Started
Set a local folder for PRIOGRID to store downloaded and processed data (this persists across R sessions):
library(priogrid)
pg_set_rawfolder("/path/to/your/data/folder")Download the official release and read it into R:
download_priogrid()
pg_static <- read_pg_static()
pg_timevarying <- read_pg_timevarying()Browse available variables:
pgvariablesDocumentation
Full documentation is available in the package vignettes:
| Vignette | Description |
|---|---|
| Getting Started | Setup, downloading, and reading tabular data |
| Accessing as Rasters | Working with individual variables using terra
|
| Citations and Bibliography | Citing data providers in publications |
| Custom Configurations | Custom resolution, extent, projection, and time periods |
| Understanding Metadata | Exploring pgsources, pgvariables, and pgsearch()
|
| Contributing | Adding new data sources and variables |
Contributing
We welcome contributions. Report issues or suggest new data sources or variable ideas using our Issue Tracker.
Please see our contribution guidelines for details on how you can contribute with code.