A real-time visualisation of the Greenhouse Gas (in terms of CO2 equivalent) footprint of electricity consumption built with d3.js, optimized for Google Chrome. Try it out at http://www.electricitymap.org, or download the app:
You can contribute by
- adding a new country on the map
- correcting data sources and capacities
- translating the map
- fixing existing issues
- submitting ideas, feature requests, or bugs in the issues section.
You can also see a list of missing data displayed as warnings in the developer console, or question marks in the country panel:
Check the contributing section for more details.
The carbon intensity of each country is measured from the perspective of a consumer. It represents the greenhouse gas footprint of 1 kWh consumed inside a given country. The footprint is measured in gCO2eq (grams CO2 equivalent), meaning each greenhouse gas is converted to its CO2 equivalent in terms of global warming potential over 100 year (for instance, 1 gram of methane emitted has the same global warming impact during 100 years as ~20 grams of CO2 over the same period).
The carbon intensity of each type of power plant takes into account emissions arising from the whole lifecycle of the plant (construction, fuel production, operational emissions, and decommissioning). Carbon-intensity factors used in the map are detailed in co2eq_parameters.js. These numbers come from the following scientific peer reviewed literature:
- IPCC (2014) Fifth Assessment Report is used as reference in most instances (see a summary in the wikipedia entry)
Country-specific carbon-intensity factors:
- Estonia:
- Norway:
Each country has a CO2 mass flow that depends on neighbouring countries. In order to determine the carbon footprint of each country, the set of coupled CO2 mass flow balance equations of each countries must be solved simultaneously. This is done by solving the linear system of equations defining the network of greenhouse gas exchanges. Take a look at this notebook for a deeper explanation.
Real-time electricity data is obtained using parsers
- Argentina: Cammesa
- Australia: AREMI National Map (CSV)
- Australia (Western): AEMO (CSV)
- Australia (distributed solar generation): Australian PV Institute
- Australia (South Battery): Nemwatch
- Austria: ENTSOE
- Bosnia and Herzegovina: ENTSOE
- Bolivia: CNDC
- Belgium: ENTSOE
- Brazil: ONS
- Bulgaria: TSO
- Canada (Alberta): AESO
- Canada (New Brunswick): NB Power
- Canada (Nova Scotia): Nova Scotia Power
- Canada (Ontario): IESO
- Canada (Prince Edward Island): Government of PEI
- Canada (Yukon): Yukon Energy
- Chile (SING): SGER
- Czech Republic: ENTSOE
- Costa Rica: ICE
- Cyprus : TSO
- Denmark: ENTSOE
- Dominican Republic: OC
- El Salvador: Unidad de Transacciones
- Estonia: ENTSOE
- Faroe Islands: SEV
- Finland: ENTSOE
- France: RTE
- Germany: ENTSOE
- Great Britain: ENTSOE
- Greece: ENTSOE
- Guatemala : AMM
- Hungary: ENTSOE
- Iceland: LANDSNET
- Ireland: ENTSOE
- Italy: ENTSOE
- India (Andhra Pradesh): CORE Dashboard
- India (Chhattisgarh): cspc.co.in
- India (Delhi): delhisldc
- India (Karnataka): kptclsldc.com
- India (Punjab): punjabsldc
- Latvia: ENTSOE
- Lithuania: ENTSOE
- Malaysia: GSO
- Moldova: MoldElectrica
- Montenegro: ENTSOE
- Netherlands: ENTSOE
- New Zealand: Transpower
- Nicaragua: CNDC
- Northern Ireland: SONI
- Norway: ENTSOE
- Panama: CND
- Peru: COES
- Poland: ENTSOE
- Portugal: ENTSOE
- Romania: ENTSOE
- Serbia: ENTSOE
- Singapore: EMC
- Slovakia: ENTSOE
- Slovenia: ENTSOE
- Spain:
- Spain (Canary Islands): REE
- Spain (Balearic Islands): REE
- Sweden: Statnett
- Switzerland: ENTSOE
- Taiwan: TAIPOWER
- Turkey: ytbs
- Ukraine: UKRENERGO
- United States: PYISO
- United States (California): CAISO
- United States (New England): NEISO
- United States (New York): NYISO
- Uruguay: UTE
Production capacities are centralized in the zones.json file.
- Argentina: Cammesa
- Austria:
- Wind: IGWindKraft
- Other: ENTSO-E
- Belarus: belstat.gov.by, RenEn
- Belgium: ENTSO-E
- Bolivia: CNDC
- Brazil: ONS
- Bulgaria: wikipedia.org
- Canada (British Columbia, Manitoba, New Brunswick, Newfoundland and Labrador, Nova Scotia, Prince Edward Island): wikipedia.org
- Canada (Ontario): Gridwatch
- Canada (Québec): Hydro-Québec
- Canada (Saskatchewan): SaskPower
- Chile (SING):
- Czech Republic: ENTSO-E
- Denmark
- Solar: wikipedia.org
- Wind: wikipedia.org
- Other: ENTSO-E
- Dominican Republic: Climatescope
- Estonia: ENTSO-E
- Faroe Islands: Johan Pauli Magnussen's Thesis, p44
- Finland:
- France
- Solar: wikipedia.org
- Wind: EWEA
- Other: RTE
- Germany: Fraunhoffer
- Great Britain: ENTSO-E
- Greece: ENTSO-E
- Guatemala: AMM
- Hungary:
- Iceland: Statistics Iceland
- Ireland
- Italy
- India (Andhra Pradesh): wikipedia.org
- India (Karnataka):
- Coal: kptclsldc.com
- Hydro: kptclsldc.com
- Renewables kptclsldc.com
- Latvia: ENTSO-E
- Lithuania: ENMIN
- Malaysia: GSO
- Moldova: FAS
- Montenegro: EPCG
- Netherlands: ENTSO-E
- Nicaragua: Climatescope
- Norway
- Wind: ieawind.org
- Other: ENTSO-E
- Northern Ireland: EIR Grid
- Poland: ENTSO-E
- Portugal:
- Romania: ENTSO-E
- Russia: Minenergo
- Serbia: ENTSO-E
- Singapore: Energy Market Authority
- Slovakia: SEPS
- Slovenia: ENTSO-E
- Spain: ENTSO-E
- Spain (Canary Islands):
- Hydro storage goronadelviento.es
- Wind, Solar REE
- Spain (Balearic Islands):
- Coal: wikipedia.org
- Wind, Solar REE
- Sweden:
- Switzerland: ENTSO-E
- Turkey:
- Renewables: IRENA
- Other:enerji.gov.tr
- Ukraine wikipedia.org
- United States of America:
We use the US National Weather Service's Global Forecast System (GFS)'s GFS 0.25 Degree Hourly data. Forecasts are made every 6 hours, with a 1 hour time step. The values extracted are wind speed and direction at 10m altitude, and ground solar irradiance (DSWRF - Downward Short-Wave Radiation Flux), which takes into account cloud coverage. In order to obtain an estimate of those values at current time, an interpolation is made between two forecasts (the one at the beginning of the hour, and the one at the end of the hour).
We use the Natural Earth Data Cultural Vectors country subdivisions (map admin subunits).
Want to help? Join us on slack at http://slack.tmrow.co.
To get started, clone or fork the repository, and install Docker.
The frontend will need compiling. In order to do this, open a terminal and run
docker-compose run --rm web npm run watch
This will watch over source file changes, and recompile if needed.
Now that the frontend is compiled, you can run the application by running the following command in a new terminal:
docker-compose up --build
Head over to http://localhost:8000/ and you should see the map! Note that the backend is responsible for calculation carbon emissions, so the map will be empty.
Once you're done doing your changes, submit a pull request to get them integrated into the production version.
If you want to update or add production capacities for a country then head over to the zones file and make any changes needed. The zones use ISO 3166-1 codes as identifiers, a list of which can be found here.
It is very simple to add a new country. The Electricity Map backend runs a list of so-called parsers every 5min. Those parsers are responsible for fetching the generation mix of a given country (check out the existing list in the parsers directory, or look at the work in progress).
A parser is a python script that is expected to define the method fetch_production
which returns the production mix at current time, in the format:
def fetch_production(country_code='FR', session=None):
return {
'countryCode': 'FR',
'datetime': '2017-01-01T00:00:00Z',
'production': {
'biomass': 0.0,
'coal': 0.0,
'gas': 0.0,
'hydro': 0.0,
'nuclear': null,
'oil': 0.0,
'solar': 0.0,
'wind': 0.0,
'geothermal': 0.0,
'unknown': 0.0
},
'storage': {
'hydro': -10.0,
},
'source': 'mysource.com'
}
The session
object is a python request session that you can re-use to make HTTP requests.
The production values should never be negative. Use None
, or omit the key if a specific production mode is not known.
Storage values can be both positive (when storing energy) or negative (when the storage is emptied).
The parser can also return an array of objects if multiple time values can be fetched. The backend will automatically update past values properly.
Once you're done, add your parser to the zones.json and exchanges.json configuration files. Finally update the real-time sources.
For more info, check out the example parser or browse existing parsers.
We've added a testing server locally. In order to test your parser, make sure first that you have installed the required modules as described in parsers/requirements.txt: for that you can run
pip install -r parsers/requirements.txt
Then, you can run
PYTHONPATH=. python mockserver/update_state.py <zone_name>
from the root directory, replacing <zone_name>
by the zone identifier of the parser you want to test. This will fetch production and exchanges and assign it a random carbon intensity value. It should appear on the map as you refresh your local browser.
While the map relies on having real-time (hourly or better) data it's still useful to collect data from past days, see the CAISO parser as an example. The most important parameters are that data is provided at regular intervals during the day and that generation is broken down by type. It's ok if coal/gas/oil are combined in the data.
-
ERROR: for X Cannot create container for service X: Invalid bind mount spec "<path>": Invalid volume specification: '<volume spec>'
. If you get this error after runningdocker-compose up
on Windows, you should telldocker-compose
to properly understand Windows paths by setting the environment variableCOMPOSE_CONVERT_WINDOWS_PATHS
to0
by runningsetx COMPOSE_CONVERT_WINDOWS_PATHS 0
. You will also need a recent version ofdocker-compose
. We have successfully seen this fix work with v1.13.0-rc4. More info here: docker/compose#4274. -
No website found at
http://localhost:8000
: This can happen if you're running Docker in a virtual machine. Find out docker's IP usingdocker-machine ip default
, and replacelocalhost
by your Docker IP when connecting.