clayton-aldern / co2-bot

A bot that generates + tweets a daily chart illustrating atmospheric CO2 concentrations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Carbot Dioxide

Hello! Carbot Dioxide is an R bot that pulls the most recent global atmospheric CO2 concentration average from NOAA, generates a ggplot2 chart with the data, and tweets it out. The main file is tweet-it.R. Thanks to the BBC for inspiration (especially Alison Benjamin and Wes Stephenson!).

To store credentials for the rtweet package, follow the instructions here. You'll also need the development version of ggplot2:

devtools::install_github("tidyverse/ggplot2")

The production bot runs on an EC2 instance, but you could also schedule it to run in the terminal with crontab and Rscript, e.g.:

crontab -e
30 8 * * * cd ~/path/to/co2-bot; /path/to/system/Rscript /path/to/tweet-it.R  # to run the bot at 8:30am every day

example chart

About

A bot that generates + tweets a daily chart illustrating atmospheric CO2 concentrations

License:MIT License


Languages

Language:R 100.0%