A plot suggests ozone levels are stable

Setup

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(targets)
library(ggplot2)

Introduction

The bulk of the computation should have already happened upstream, and the most of the code chunks in the report itself should be terse calls to tar_read() and tar_load().

--https://books.ropensci.org/targets/files.html#literate-programming

This report summarizes our results, mostly as terse calls to tar_read(). For implementation details, see the underlying targets pipeline:

writeLines(readLines("_targets.R"))

Methods

To make this project easy to reproduce and share we built the R package ds.targets. You can install it from GitHub with:

# install.packages("devtools")
devtools::install_github("2DegreesInvesting/ds.targets")

To clean the raw data we removed observations where Ozone values were missing.

# Source code
ds.targets::clean

# Before
raw_data <- tar_read(raw)
any(is.na(raw_data$Ozone))

# After
clean_data <- tar_read(data)
any(is.na(clean_data$Ozone))

To explored changes in Ozone through time we use a linear model.

Results

Here are our results:

tar_read(lm_plot)

Conclusion

We see no evidence that Ozone changes through time.



2DegreesInvesting/ds-targets documentation built on March 19, 2021, 9:45 a.m.