/GridForecast

An example mobile app for the carbon intensity API, written in React Native

Primary LanguageJavaScriptMIT LicenseMIT

GridForecast

Travis branch Dependency Status Code Climate license

A demonstration app for the National Grid carbon intensity API, built in React Native.

Screnshot

Development

Requirements

  • NodeJS
  • Yarn

Running the app

The app uses Expo for development. Install the Expo app on your phone, then run:

yarn install
yarn start

Scan the QR code with the Expo app, and away you go.

Building Releases

The build process is also set up to use Expo. Read the Expo documentation for details on the process, but in summary:

yarn run exp login
yarn run exp start
yarn run exp build:ios | build:android
yarn run build:status

Using the carbon intensity API

The sample code that actually calls the carbon intensity API is in the /jsx/ForecastDayView.js file.

Credits