Learn R Programming

The rasterbc R Package

Dean Koch 2023-11-08

rasterbc provides access to a collection of 100m resolution gridded spatial ecological data on the province of British Columbia during the period 2001-2018, including yearly rasterized Forest Insect and Disease Survey (FIDS) pest damage polygons. Given a user-defined geographical region (polygon), the package downloads and imports requested data layers into R as SpatRaster objects. The goal is to improve access to a number of publicly accessible datasets on BC forests and simplify data ingress for modellers.

The available layers are:

All datasets were downloaded and processed in the years 2018-2020, then stored as raster tiles in the standard BC Albers projection, and hosted on FRDR. Follow the links in the list above for code and documentation on this process. The collection is published as a data publication for permanence and easy referencing.

Vignette

See the introduction vignette for instructions on getting started with this package.

Releases

rasterbc is available on CRAN:

rasterbc v1.0.1

Install it in R using the command

install.packages('rasterbc')

This will also install the dependencies sf and terra, if you don’t have them already.

Note that FRDR’s direct download services are occasionally unavailable, at which times the download functionality of rasterbc will also be unavailable. Check the FRDR homepage (eg for news about maintenance downtime) if you are having trouble downloading data tiles with rasterbc.

About

This project grew out of my doctoral thesis project on modelling outbreaks of the mountain pine beetle in central BC. Parts of of the rasterbc collection can be found in research publications with professors Mark Lewis and Subhash Lele on statistical methods for spatial data, models for animal dispersal, and an analysis of MPB activity in the Merrit TSA. We gratefully acknowledge the support of NSERC, TRIA-Net, and the University of Alberta Lewis Lab in this work.

Copy Link

Version

Install

install.packages('rasterbc')

Monthly Downloads

195

Version

1.0.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Dean Koch

Last Published

November 9th, 2023

Functions in rasterbc (1.0.2)

findblocks_bc

Identify NTS/SNRC codes covering a given geometry
opendata_bc

Load/merge data blocks and optionally clip/mask them
ntspoly_bc

National Topographic System Index Maps for British Columbia.
listdata_bc

List all available layers, or their associated filepaths and download status
getdata_bc

Download data from the rasterbc collection
datadir_bc

Set local directory for storage of raster data files
metadata_bc

Metadata for rasterbc collections