This is a fork of TheCanMole's work in recording of the NZU Carbon Price with additional automation of the scrape itself.
Scrape is found in the api.py, to run simply run python api.py, This will pull the data from the Carbon News RSS feed and add it to the nzu-edited-raw-prices-data.csv file.
This data repository provides a reproducible public domain data series of mean monthly spot prices of the New Zealand emission unit (or "NZU"), the domestic emission unit in the New Zealand emissions trading scheme.
New Zealand has had an emissions trading scheme since 2009. Although private sector carbon brokers display current and some historic trading prices for sales of the NZ emission unit (the "NZU"), there is no public data series of the New Zealand carbon price.
There is a chart of the data at Wikimedia Commons.
Data preparation was performed with the R programming language, R version 3.3.3 (2017-03-06) with the RKWard 0.6.5 IDE running on an i586-pc-linux-gnu (32-bit), Debian GNU/Linux 9 (Stretch) MX-17 operating system on a Dell Inspiron 6000 laptop.
The raw price data has been manually 'web-scraped' and recorded in the file NZU-weekly-prices-data.csv.
Run the R script NZU-monthly-mean.r from a directory to download and process the raw data into a mean monthly time series. This is then written to a file nzu-month-price.csv.
-
The raw data: nzu-weekly-prices-data.csv.
-
The edited price data with the addition of a month column: nzu-edited-raw-prices-data.csv.
-
The mean monthly price data: nzu-month-price.csv.
-
The mean weekly price data: weeklymeanprice.csv.
This data package and these datasets and the R scripts are made available under the Public Domain Dedication and License v1.0 whose full text can be found at: http://www.opendatacommons.org/licenses/pddl/1.0/. You are free to share, to copy, distribute and use the data, to create or produce works from the data and to adapt, modify, transform and build upon the data, without restriction.
-
nzu-weekly-prices-data.csv (web-scraped raw price data, irregular dates, price and url reference)
-
nzu-edited-raw-prices-data.csv (raw price data, irregular dates, with added month column, price and url reference)
-
NZU-monthly-mean.r (R script file of code to process raw price data to monthly mean price)
-
nzu-month-price.csv (the monthly mean of the raw price data)
-
weeklymeanprice.csv (the weekly mean of the raw price data)
-
NZU-charts.r (R script file of code to create charts)
-
Licence.txt (Public Domain Dedication and License v1.0 http://opendatacommons.org/licenses/pddl/1.0/)
Theecanmole. (2016). New Zealand emission unit (NZU) monthly prices 2010 to 2016: V1.0.01 [Data set]. Zenodo. http://doi.org/10.5281/zenodo.221328