Skip to content

Scrape NOAA web site to get daily atmospheric CO₂ data.

License

Notifications You must be signed in to change notification settings

wdenton/noa2co2

Repository files navigation

noa₂co₂

There is as yet no machine-readable data file available that gives daily atmospheric CO₂ readings from any of the many monitoring stations around the globe. Until there is, this fills in.

It scrapes the manually-entered data out of Recent Daily Average Mauna Loa CO₂ that is maintained by the Earth System Research Laboratory (part of the US government’s National Oceanic & Atmospheric Administration). That data is added to a CSV file (of all recent readings) and a JSON file (of just the last valid reading, ignoring any NAs).

How to use it

This requires Ruby and the Bundler gem.

To install:

git clone [email protected]:wdenton/noa2co2.git
cd noa2co2/
bundle install

To use:

./noa₂co₂.rb

To run from crontab with RVM you need a special wrapper script (change the directory as needed):

30 9-11 * * * cd ~/noa2co2/; ./rvm_noa₂co₂.sh

I use rbenv (installed with my Conforguration package) and use this for the cron job; sourcing .bashrc sets up the environment:

30 9-11 * * *  source ~/.bashrc; cd ~/noa2co2/; ./noa₂co₂.rb; ./update_github.sh

Direct links to the data

License

GPL v3. See COPYING.

About

Scrape NOAA web site to get daily atmospheric CO₂ data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published