Working with Cal-Adapt Climate Data in R (#maptimeDavis & D-RUG)

April 26, 2022, 10 a.m. - April 26, 2022, noon

Organizer -

DataLab: Data Science and Informatics

Contact -

Location -



Cal-Adapt is California's official go-to source for downscaled climate data. Most people interact with Cal-Adapt through the website, but Cal-Adapt also features an API which can be used to query and import data through programming languages.

This hands-on workshop will teach you how to work with climate data wisely using caladaptR (, a R package which streamlines the process of importing data via the Cal-Adapt API. Through short hands-on exercises, you will learn how to construct API requests, fetch data from Cal-Adapt as data frames and rasters, and wrangle the data for analysis and visualization. Examples will showcase techniques for aggregating climate projections from multiple climate models and years, joining modeled climate data to other tabular data, transforming climate projections into more intuitive probabilities, and visualization through plots and maps. Data wrangling, analysis, and mapping examples will use the tidyverse, sf, tmap, and stars packages.

Learning Objectives

Participants in this workshop will

  1. Learn how to construct API requests and fetch climate data from Cal-Adapt
  2. Understand best practices for working with climate data wisely
  3. Understand techniques for converting climate data into actionable info


This hands-on portions of the workshop will be in R. Basic familiarity with R and RStudio (at least enough to run the sample code provided) is suggested.

Familiarity with climate data is helpful but not required. A short primer on climate data will be provided.

R and R studio

For more suggested preparation, see:

A free RStudio Cloud account is strongly encouraged

Instructor: Andy Lyons, UC ANR

Instructor Bio

Andy Lyons is Program Coordinator for the Informatics and GIS Statewide Program in the UC Division of Agriculture and Natural Resources. His R projects include packages to analyze animal movement, manage drone imagery, import climate data, and decision support tools for tree crops. He holds a PhD in Environmental Science Policy and Management from UC Berkeley.

Location: Zoom.

Cost: Free of charge.

Registration is closed for this event