Datasets Used in This Book

Every dataset in this book is open government data — free to download, no account required. This page collects them all in one place with download links so you can get the data before you start a chapter. Each data-using chapter also links back here.

TipWhere the data goes

Put each downloaded file in your project’s data/ folder, unchanged from the source. Read it with here("data", "<filename>") in R, or open it directly in Excel. Keep the raw file; save any cleaned version separately in outputs/.

NoteDownload directly from this book

Click a download link (the file name) in the table below to get the exact file used in the chapters, served straight from this book — no GitHub or account needed. Beside each is a source link to the official publisher for provenance. Some files are teaching extracts prepared from the larger published dataset, so the source may hold more data than the file used here. No links on this page are invented.

All datasets at a glance

Open datasets used across the book — click a file name to download it directly
Dataset Source (licence) Download · source Type Used in
BC silvicultureTrends in Silviculture in B.C. Environmental Reporting BC / BC Ministry of Forests (OGL — BC) bc_disturbance_reforestation.xlsx · source .xlsx Ch 1, 3, 4, 5, 8, 9, 12, 13
Ontario forest statisticsForest Resources of Ontario 2021 Government of Ontario (OGL — Ontario) on_forest_statistics_1.xlsx · source .xlsx Ch 2, 3, 4, 5, 8
BC air qualityVerified Hourly Air Quality & Meteorological Data BC Ministry of Environment (OGL — BC) airdata3.csv · source .csv Ch 5, 6, 7, 8, 9, 11
ECCC weather — daily climate, Vancouver Int’l A (Climate ID 1108447) Environment and Climate Change Canada inter_air_van_weather.csv · source .csv Ch 8
NRCan wildfire — National Fire Database, fire points Natural Resources Canada / CWFIS nfdb_fires_2021_2024.csv · source .csv Ch 4; Ch 9 (derived)
CSRD parks — Park Locations Columbia Shuswap Regional District Open Data csrd_parks.geojson · source .geojson Optional spatial resource

Dataset details

BC silviculture — bc_disturbance_reforestation.xlsx

  • Source: Environmental Reporting BC, Trends in Silviculture in B.C. (BC Ministry of Forests). Open Government Licence — British Columbia.
  • How it’s used: the running example for the Excel chapters (1–3) and the first reproducible R import (Ch 4–5); annual harvested, natural-disturbance, and reforested area by fiscal year, 1987–2023.
  • File: ~37 rows × 8 columns, three sheets (About / ReadMe / Data). Read the Data sheet. Small and clean — no preparation needed.

Ontario forest statistics — on_forest_statistics_1.xlsx

  • Source: Government of Ontario, Forest Resources of Ontario 2021. Open Government Licence — Ontario.
  • How it’s used: the messier, categorical file for Excel cleaning, PivotTables, and grouped summaries; a cross-classification of area by ownership × seral stage × forest type × age class.
  • File: the book uses a Region 3E teaching extract (~179 rows × 8 columns) of the larger published file.

BC air quality — airdata3.csv

  • Source: BC Ministry of Environment, Air Quality and Climate Monitoring: Verified Hourly Air Quality and Meteorological Data. Open Government Licence — British Columbia.
  • How it’s used: the real, messy file for cleaning (Ch 6), grouped summaries (Ch 7), the air + weather join (Ch 8), and ggplot2 (Ch 9). The book focuses on ground-level ozone (O₃), which is recorded at eight Lower Mainland stations.
  • File: a teaching extract prepared from the source (selected Lower Mainland stations, hourly, January 2000), ~11,900 rows × 26 columns, with realistic missingness across pollutants.

ECCC weather — inter_air_van_weather.csv

  • Source: Environment and Climate Change Canada, Historical Climate Data — Vancouver International Airport (Climate ID 1108447; web station ID 51442).
  • How it’s used: joined to the hourly air-quality data in Ch 8 to demonstrate a safe many-to-one join (hourly readings → daily weather).
  • File: daily climate for the year 2000 (~366 rows × 31 columns). The Direct CSV link above is the ECCC bulk-download endpoint; the script scripts/download_eccc_yvr_climate.R regenerates it.

NRCan wildfire — nfdb_fires_2021_2024.csv

  • Source: Natural Resources Canada, Canadian Wildland Fire Information System — Canadian National Fire Database (NFDB), fire point data.
  • How it’s used: a first-import practice file (Ch 4); in Ch 9 it is aggregated to an annual area-burned summary by scripts/build_wildfire_summary.R.
  • File: the book uses a 2021–2024 subset of the national point dataset (the source download is a shapefile covering 1950–present; convert/subset as needed).

CSRD parks — csrd_parks.geojson

  • Source: Columbia Shuswap Regional District Open Data (ArcGIS Hub), Park Locations feature layer.
  • How it’s used: the real spatial layer for the optional spatial extension (sf: inspect CRS, reproject to BC Albers, static geom_sf map; interactive leaflet map). Spatial analysis is no longer part of the required book — see Optional: Spatial Data Analysis in R.
  • File: 66 point features in WGS 84 (EPSG:4326). The Direct GeoJSON link is a live query; scripts/download_csrd_parks.R regenerates it.

Reproducible download scripts

Three small R scripts in scripts/ let you regenerate the data files from source:

  • download_eccc_yvr_climate.Rinter_air_van_weather.csv
  • download_csrd_parks.Rcsrd_parks.geojson
  • build_wildfire_summary.R → annual wildfire summary (from the NFDB points)