code

This page includes links to code that some might find useful.

R code for common empirical tasks in climate change impact assessment
Reproducible R code and data for common tasks of data preparation and model estimation in the climate change impacts literature, from the chapter The Empirical Analysis of Climate Change Impacts and Adaptation in Agriculture, Handbook of Agricultural Economics 5 (2021) 3981–4073. Tasks covered include: fast aggregation of point and gridded weather data; construction of temperature exposure bins; semi-parametric estimation of non-linear and within-season varying effects of weather; dealing with spatial dependence; and common robustness checks presented in specification charts.
R code for specification charts
An R function for building specification charts, a compact way to visualize the robustness of results across many model specifications. Adapted from the charts in Anthropogenic climate change has slowed global agricultural productivity growth, Nature Climate Change 11 (2021) 306–312.