Skip to content

Instantly share code, notes, and snippets.

@digitalcampbell
digitalcampbell / daily_temp_anomaly_chart
Created July 6, 2023 15:25
Pull global temperature data from Climate Reanalyzer and create a daily temperature anomaly chart
library(tidyverse)
library(jsonlite)
library(splitstackshape)
library(RColorBrewer)
# pull daily temperature from https://climatereanalyzer.org/clim/t2_daily/
temp_json <- fromJSON("https://climatereanalyzer.org/clim/t2_daily/json/cfsr_world_t2_day.json")
# create dataframe
temp <- as.data.frame(temp_json) %>%