Learn R Programming

About

intensegRid

This package is an API wrapper for National Grid’s Carbon Intensity API. The API provides information on national and regional carbon intensity - the amount of carbon emitted per unit of energy consumed - for the UK.

Installation

Install the latest CRAN package with:

install.packages("intensegRid")

Or you can install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("KKulma/intensegRid")

Examples

For examples on how to use intensegRid package refer to the vignette.

Limitations

In its current form, the package only accepts dates as start or end inputs (as Dates or character string), but not timestamps. However you can easily filter the output of intensegRid functions using dplyr and lubridate packages.

Contribution

This is an open-source project and it welcomes your contribution! Feel free to use and test the package and if you find a bug, please, report it as an issue. You may want to go even a step further and fix an issue you just raised!

If you’re rather new to open source and git, this repo offers some easy to follow guidance on how to start. Thanks for your time and efforts!

Copy Link

Version

Install

install.packages('intensegRid')

Monthly Downloads

256

Version

0.1.2

License

CC0

Issues

Pull Requests

Stars

Forks

Maintainer

Kasia Kulma

Last Published

November 8th, 2022

Functions in intensegRid (0.1.2)

regions_lookup

regions_lookup
get_british_ci

Fetch British carbon intensity data for specified time period
get_postcode_ci

Get Carbon Intensity for specified postcode.
%>%

Pipe operator
get_data

Retrieve raw data from Carbon Intensity API
get_mix

Get generation mix for current half hour
get_regional_ci

Get Carbon Intensity data between specified datetimes for specified region
clean_colnames

Tidy up intensity results column names
get_stats

Get Carbon Intensity statistics between from and to dates
get_national_ci

Get Carbon Intensity data for current half hour for a specified GB Region
get_factors

Get Carbon Intensity factors for each fuel type