co2-data
Version:
Carbon intensity of 66 countries and a world average updated to 2020
314 lines (310 loc) • 18.5 kB
text/typescript
import { CountryNames } from './types';
export const countryNames: CountryNames = {
AD: { zoneName: 'Andorra' },
AE: { zoneName: 'United Arab Emirates' },
AL: { zoneName: 'Albania' },
AM: { zoneName: 'Armenia' },
AR: { zoneName: 'Argentina' },
AT: { zoneName: 'Austria' },
'AUS-ACT': { zoneName: 'Unknown' },
'AUS-NSW': { countryName: 'Australia', zoneName: 'New South Wales' },
'AUS-NT': { countryName: 'Australia', zoneName: 'Northern Territory' },
'AUS-QLD': { countryName: 'Australia', zoneName: 'Queensland' },
'AUS-SA': { countryName: 'Australia', zoneName: 'South Australia' },
'AUS-TAS': { countryName: 'Australia', zoneName: 'Tasmania' },
'AUS-TAS-KI': { countryName: 'Tasmania', zoneName: 'King Island' },
'AUS-VIC': { countryName: 'Australia', zoneName: 'Victoria' },
'AUS-WA': { countryName: 'Australia', zoneName: 'Western Australia' },
AW: { zoneName: 'Aruba' },
AX: { zoneName: 'Åland Islands' },
BA: { zoneName: 'Bosnia and Herzegovina' },
BD: { zoneName: 'Bangladesh' },
BE: { zoneName: 'Belgium' },
BG: { zoneName: 'Bulgaria' },
BH: { zoneName: 'Bahrain' },
BO: { zoneName: 'Bolivia' },
'BR-CS': { countryName: 'Brazil', zoneName: 'Central Brazil' },
'BR-N': { countryName: 'Brazil', zoneName: 'North Brazil' },
'BR-NE': { countryName: 'Brazil', zoneName: 'North-East Brazil' },
'BR-S': { countryName: 'Brazil', zoneName: 'South Brazil' },
BY: { zoneName: 'Belarus' },
'CA-AB': { countryName: 'Canada', zoneName: 'Alberta' },
'CA-BC': { countryName: 'Canada', zoneName: 'British Columbia' },
'CA-MB': { countryName: 'Canada', zoneName: 'Manitoba' },
'CA-NB': { countryName: 'Canada', zoneName: 'New Brunswick' },
'CA-NL': { countryName: 'Canada', zoneName: 'Newfoundland and Labrador' },
'CA-NS': { countryName: 'Canada', zoneName: 'Nova Scotia' },
'CA-NT': { countryName: 'Canada', zoneName: 'Northwest Territories' },
'CA-NU': { countryName: 'Canada', zoneName: 'Nunavut' },
'CA-ON': { countryName: 'Canada', zoneName: 'Ontario' },
'CA-PE': { countryName: 'Canada', zoneName: 'Prince Edward Island' },
'CA-QC': { countryName: 'Canada', zoneName: 'Québec' },
'CA-SK': { countryName: 'Canada', zoneName: 'Saskatchewan' },
'CA-YT': { countryName: 'Canada', zoneName: 'Yukon' },
CH: { zoneName: 'Switzerland' },
'CL-SEN': { countryName: 'Chile', zoneName: 'Sistema Eléctrico Nacional' },
'CL-SIC': { zoneName: 'Unknown' },
CR: { zoneName: 'Costa Rica' },
CY: { zoneName: 'Cyprus' },
CZ: { zoneName: 'Czechia' },
DE: { zoneName: 'Germany' },
DK: { zoneName: 'Denmark' },
'DK-BHM': { countryName: 'Denmark', zoneName: 'Bornholm' },
'DK-DK1': { countryName: 'Denmark', zoneName: 'West Denmark' },
'DK-DK2': { countryName: 'Denmark', zoneName: 'East Denmark' },
DO: { zoneName: 'Dominican Republic' },
EE: { zoneName: 'Estonia' },
ES: { zoneName: 'Spain' },
'ES-CN-FVLZ': { countryName: 'Spain', zoneName: 'Fuerteventura/Lanzarote' },
'ES-CN-GC': { countryName: 'Spain', zoneName: 'Gran Canaria' },
'ES-CN-HI': { countryName: 'Spain', zoneName: 'El Hierro' },
'ES-CN-IG': { countryName: 'Spain', zoneName: 'Isla de la Gomera' },
'ES-CN-LP': { countryName: 'Spain', zoneName: 'La Palma' },
'ES-CN-TE': { countryName: 'Spain', zoneName: 'Tenerife' },
'ES-IB-FO': { countryName: 'Spain', zoneName: 'Formentera' },
'ES-IB-IZ': { countryName: 'Spain', zoneName: 'Ibiza' },
'ES-IB-MA': { countryName: 'Spain', zoneName: 'Mallorca' },
'ES-IB-ME': { countryName: 'Spain', zoneName: 'Menorca' },
FI: { zoneName: 'Finland' },
FO: { zoneName: 'Faroe Islands' },
FR: { zoneName: 'France' },
'FR-COR': { countryName: 'France', zoneName: 'Corsica' },
GB: { zoneName: 'Great Britain' },
'GB-NIR': { zoneName: 'Northern Ireland' },
'GB-ORK': { countryName: 'Great Britain', zoneName: 'Orkney Islands' },
'GB-SHI': { countryName: 'Great Britain', zoneName: 'Shetland Islands' },
GE: { zoneName: 'Georgia' },
GF: { zoneName: 'French Guiana' },
GP: { zoneName: 'Guadeloupe' },
GR: { zoneName: 'Greece' },
'GR-IS': { countryName: 'Greece', zoneName: 'Aegean Islands' },
GT: { zoneName: 'Guatemala' },
HN: { zoneName: 'Honduras' },
HR: { zoneName: 'Croatia' },
HU: { zoneName: 'Hungary' },
IE: { zoneName: 'Ireland' },
IL: { zoneName: 'Israel' },
IN: { zoneName: 'Unknown' },
'IN-AP': { countryName: 'India', zoneName: 'Andhra Pradesh' },
'IN-CT': { countryName: 'India', zoneName: 'Chhattisgarh' },
'IN-DL': { countryName: 'India', zoneName: 'Delhi' },
'IN-GJ': { countryName: 'India', zoneName: 'Gujarat' },
'IN-KA': { countryName: 'India', zoneName: 'Karnataka' },
'IN-MH': { countryName: 'India', zoneName: 'Maharashtra' },
'IN-PB': { countryName: 'India', zoneName: 'Punjab' },
'IN-UP': { countryName: 'India', zoneName: 'Uttar Pradesh' },
'IN-UT': { countryName: 'India', zoneName: 'Uttarakhand' },
IQ: { zoneName: 'Iraq' },
IS: { zoneName: 'Iceland' },
IT: { zoneName: 'Italy' },
'IT-CNO': { countryName: 'Italy', zoneName: 'Central North' },
'IT-CSO': { countryName: 'Italy', zoneName: 'Central South' },
'IT-NO': { countryName: 'Italy', zoneName: 'North' },
'IT-SAR': { countryName: 'Italy', zoneName: 'Sardinia' },
'IT-SIC': { countryName: 'Italy', zoneName: 'Sicily' },
'IT-SO': { countryName: 'Italy', zoneName: 'South' },
'JP-CB': { countryName: 'Japan', zoneName: 'Chūbu' },
'JP-CG': { countryName: 'Japan', zoneName: 'Chūgoku' },
'JP-HKD': { countryName: 'Japan', zoneName: 'Hokkaidō' },
'JP-HR': { countryName: 'Japan', zoneName: 'Hokuriku' },
'JP-KN': { countryName: 'Japan', zoneName: 'Kansai' },
'JP-KY': { countryName: 'Japan', zoneName: 'Kyūshū' },
'JP-ON': { countryName: 'Japan', zoneName: 'Okinawa' },
'JP-SK': { countryName: 'Japan', zoneName: 'Shikoku' },
'JP-TH': { countryName: 'Japan', zoneName: 'Tōhoku' },
'JP-TK': { countryName: 'Japan', zoneName: 'Tōkyō' },
KR: { zoneName: 'South Korea' },
KW: { zoneName: 'Kuwait' },
LT: { zoneName: 'Lithuania' },
LU: { zoneName: 'Luxembourg' },
LV: { zoneName: 'Latvia' },
MD: { zoneName: 'Moldova' },
ME: { zoneName: 'Montenegro' },
MK: { zoneName: 'North Macedonia' },
MQ: { zoneName: 'Martinique' },
MT: { zoneName: 'Malta' },
MX: { zoneName: 'Mexico' },
'MY-WM': { countryName: 'Malaysia', zoneName: 'Peninsula' },
NA: { zoneName: 'Namibia' },
NI: { zoneName: 'Nicaragua' },
NKR: { zoneName: 'Nagorno-Karabakh' },
NL: { zoneName: 'Netherlands' },
NO: { zoneName: 'Unknown' },
'NO-NO1': { countryName: 'Norway', zoneName: 'Southeast Norway' },
'NO-NO2': { countryName: 'Norway', zoneName: 'Southwest Norway' },
'NO-NO3': { countryName: 'Norway', zoneName: 'Middle Norway' },
'NO-NO4': { countryName: 'Norway', zoneName: 'North Norway' },
'NO-NO5': { countryName: 'Norway', zoneName: 'West Norway' },
NP: { zoneName: 'Nepal' },
'NZ-NZN': { countryName: 'New Zealand', zoneName: 'North Island' },
'NZ-NZS': { countryName: 'New Zealand', zoneName: 'South Island' },
OM: { zoneName: 'Oman' },
PA: { zoneName: 'Panama' },
PE: { zoneName: 'Peru' },
PL: { zoneName: 'Poland' },
PT: { zoneName: 'Portugal' },
'PT-AC': { countryName: 'Portugal', zoneName: 'Azores' },
'PT-MA': { countryName: 'Portugal', zoneName: 'Madeira' },
QA: { zoneName: 'Qatar' },
RE: { zoneName: 'Réunion' },
RO: { zoneName: 'Romania' },
RS: { zoneName: 'Serbia' },
RU: { zoneName: 'Russia' },
'RU-1': { countryName: 'Russia', zoneName: 'European Russia and Ural' },
'RU-2': { countryName: 'Russia', zoneName: 'Siberia' },
'RU-AS': { zoneName: 'Russia' },
'RU-EU': { zoneName: 'Russia' },
'RU-KGD': { countryName: 'Russia', zoneName: 'Kaliningrad' },
SA: { zoneName: 'Saudi Arabia' },
SE: { zoneName: 'Sweden' },
'SE-SE1': { zoneName: 'Unknown' },
'SE-SE2': { zoneName: 'Unknown' },
'SE-SE3': { zoneName: 'Unknown' },
'SE-SE4': { zoneName: 'Unknown' },
SG: { zoneName: 'Singapore' },
SI: { zoneName: 'Slovenia' },
SK: { zoneName: 'Slovakia' },
SV: { zoneName: 'El Salvador' },
TR: { zoneName: 'Turkey' },
TW: { zoneName: 'Taiwan' },
UA: { zoneName: 'Ukraine' },
'UA-CR': { countryName: 'Crimea', zoneName: 'Ukraine' },
'US-AK': { countryName: 'United States of America', zoneName: 'Alaska' },
'US-AL': { countryName: 'United States of America', zoneName: 'Alabama' },
'US-BPA': { countryName: 'United States of America', zoneName: 'BPA' },
'US-CA': { countryName: 'United States of America', zoneName: 'California' },
'US-CAL-BANC': { countryName: 'United States of America', zoneName: 'Balancing Authority Of Northern California' },
'US-CAL-CISO': { countryName: 'United States of America', zoneName: 'California Independent System Operator' },
'US-CAL-IID': { countryName: 'United States of America', zoneName: 'Imperial Irrigation District' },
'US-CAL-LDWP': { countryName: 'United States of America', zoneName: 'Los Angeles Department Of Water And Power' },
'US-CAL-TIDC': { countryName: 'United States of America', zoneName: 'Turlock Irrigation District' },
'US-CAR-CPLE': { countryName: 'United States of America', zoneName: 'Duke Energy Progress East' },
'US-CAR-CPLW': { countryName: 'United States of America', zoneName: 'Duke Energy Progress West' },
'US-CAR-DUK': { countryName: 'United States of America', zoneName: 'Duke Energy Carolinas' },
'US-CAR-SC': { countryName: 'United States of America', zoneName: 'South Carolina Public Service Authority' },
'US-CAR-SCEG': { countryName: 'United States of America', zoneName: 'South Carolina Electric & Gas Company' },
'US-CAR-YAD': { countryName: 'United States of America', zoneName: 'Alcoa Power Generating, Inc. Yadkin Division' },
'US-CENT-SPA': { countryName: 'United States of America', zoneName: 'Southwestern Power Administration' },
'US-CENT-SWPP': { countryName: 'United States of America', zoneName: 'Southwest Power Pool' },
'US-DUK': { zoneName: 'Unknown' },
'US-FLA-FMPP': { countryName: 'United States of America', zoneName: 'Florida Municipal Power Pool' },
'US-FLA-FPC': { countryName: 'United States of America', zoneName: 'Duke Energy Florida Inc' },
'US-FLA-FPL': { countryName: 'United States of America', zoneName: 'Florida Power & Light Company' },
'US-FLA-GVL': { countryName: 'United States of America', zoneName: 'Gainesville Regional Utilities' },
'US-FLA-HST': { countryName: 'United States of America', zoneName: 'City Of Homestead' },
'US-FLA-JEA': { countryName: 'United States of America', zoneName: 'JEA' },
'US-FLA-NSB': { countryName: 'United States of America', zoneName: 'Utilities Commission Of New Smyrna Beach' },
'US-FLA-SEC': { countryName: 'United States of America', zoneName: 'Seminole Electric Cooperative' },
'US-FLA-TAL': { countryName: 'United States of America', zoneName: 'City Of Tallahassee' },
'US-FLA-TEC': { countryName: 'United States of America', zoneName: 'Tampa Electric Company' },
'US-GA': { zoneName: 'Unknown' },
'US-HI-HA': { countryName: 'United States of America', zoneName: 'Hawaii' },
'US-HI-KA': { countryName: 'United States of America', zoneName: 'Kauai' },
'US-HI-KH': { countryName: 'United States of America', zoneName: 'Kahoolawe' },
'US-HI-LA': { countryName: 'United States of America', zoneName: 'Lanai' },
'US-HI-MA': { countryName: 'United States of America', zoneName: 'Maui' },
'US-HI-MO': { countryName: 'United States of America', zoneName: 'Molokai' },
'US-HI-NI': { countryName: 'United States of America', zoneName: 'Niihau' },
'US-HI-OA': { countryName: 'United States of America', zoneName: 'Oahu' },
'US-IPC': { countryName: 'United States of America', zoneName: 'IPC' },
'US-MIDA-OVEC': { countryName: 'United States of America', zoneName: 'Ohio Valley Electric Corporation' },
'US-MIDA-PJM': { countryName: 'United States of America', zoneName: 'PJM Interconnection, Llc' },
'US-MIDW-AECI': { countryName: 'United States of America', zoneName: 'Associated Electric Cooperative, Inc.' },
'US-MIDW-EEI': { countryName: 'United States of America', zoneName: 'Electric Energy, Inc.' },
'US-MIDW-GLHB': { countryName: 'United States of America', zoneName: 'GridLiance' },
'US-MIDW-LGEE': {
countryName: 'United States of America',
zoneName: 'Louisville Gas And Electric Company And Kentucky Utilities',
},
'US-MIDW-MISO': {
countryName: 'United States of America',
zoneName: 'Midcontinent Independent Transmission System Operator, Inc..',
},
'US-MISO': { countryName: 'United States of America', zoneName: 'MISO' },
'US-NC': { countryName: 'United States of America', zoneName: 'North Carolina' },
'US-NE-ISNE': { countryName: 'United States of America', zoneName: 'Iso New England Inc.' },
'US-NEISO': { countryName: 'United States of America', zoneName: 'New England' },
'US-NEVP': { zoneName: 'Unknown' },
'US-NV': { countryName: 'United States of America', zoneName: 'Nevada' },
'US-NW-AVA': { countryName: 'United States of America', zoneName: 'Avista Corporation' },
'US-NW-AVRN': { countryName: 'United States of America', zoneName: 'Avangrid Renewables Cooperative' },
'US-NW-BPAT': { countryName: 'United States of America', zoneName: 'Bonneville Power Administration' },
'US-NW-CHPD': { countryName: 'United States of America', zoneName: 'PUD No. 1 Of Chelan County' },
'US-NW-DOPD': { countryName: 'United States of America', zoneName: 'PUD No. 1 Of Douglas County' },
'US-NW-GCPD': { countryName: 'United States of America', zoneName: 'PUD No. 2 Of Grant County, Washington' },
'US-NW-GRID': { countryName: 'United States of America', zoneName: 'Gridforce Energy Management, Llc' },
'US-NW-GWA': { countryName: 'United States of America', zoneName: 'Naturener Power Watch, Llc (Gwa)' },
'US-NW-IPCO': { countryName: 'United States of America', zoneName: 'Idaho Power Company' },
'US-NW-NEVP': { countryName: 'United States of America', zoneName: 'Nevada Power Company' },
'US-NW-NWMT': { countryName: 'United States of America', zoneName: 'Northwestern Energy' },
'US-NW-PACE': { countryName: 'United States of America', zoneName: 'Pacificorp East' },
'US-NW-PACW': { countryName: 'United States of America', zoneName: 'Pacificorp West' },
'US-NW-PGE': { countryName: 'United States of America', zoneName: 'Portland General Electric Company' },
'US-NW-PSCO': { countryName: 'United States of America', zoneName: 'Public Service Company Of Colorado' },
'US-NW-PSEI': { countryName: 'United States of America', zoneName: 'Puget Sound Energy' },
'US-NW-SCL': { countryName: 'United States of America', zoneName: 'Seattle City Light' },
'US-NW-TPWR': {
countryName: 'United States of America',
zoneName: 'City Of Tacoma, Department Of Public Utilities, Light Division',
},
'US-NW-WACM': {
countryName: 'United States of America',
zoneName: 'Western Area Power Administration - Rocky Mountain Region',
},
'US-NW-WAUW': { countryName: 'United States of America', zoneName: 'Western Area Power Administration UGP West' },
'US-NW-WWA': { countryName: 'United States of America', zoneName: 'Naturener Wind Watch, Llc' },
'US-NY': { countryName: 'United States of America', zoneName: 'New York' },
'US-NY-NYIS': { countryName: 'United States of America', zoneName: 'New York Independent System Operator' },
'US-OR': { countryName: 'United States of America', zoneName: 'Oregon' },
'US-PJM': { countryName: 'United States of America', zoneName: 'PJM' },
'US-SC': { countryName: 'United States of America', zoneName: 'South Carolina' },
'US-SE-AEC': { countryName: 'United States of America', zoneName: 'Powersouth Energy Cooperative' },
'US-SE-SEPA': { countryName: 'United States of America', zoneName: 'Southeastern Power Administration' },
'US-SE-SOCO': { countryName: 'United States of America', zoneName: 'Southern Company Services, Inc. - Trans' },
'US-SEC': { zoneName: 'Unknown' },
'US-SOCO': { zoneName: 'Unknown' },
'US-SPP': { countryName: 'United States of America', zoneName: 'SPP' },
'US-SVERI': { countryName: 'United States of America', zoneName: 'SVERI' },
'US-SW-AZPS': { countryName: 'United States of America', zoneName: 'Arizona Public Service Company' },
'US-SW-DEAA': { countryName: 'United States of America', zoneName: 'Arlington Valley, LLC' },
'US-SW-EPE': { countryName: 'United States of America', zoneName: 'El Paso Electric Company' },
'US-SW-GRIF': { countryName: 'United States of America', zoneName: 'Griffith Energy, LLC' },
'US-SW-GRMA': { countryName: 'United States of America', zoneName: 'Gila River Power, LLC' },
'US-SW-HGMA': { countryName: 'United States of America', zoneName: 'New Harquahala Generating Company, LLC' },
'US-SW-PNM': { countryName: 'United States of America', zoneName: 'Public Service Company Of New Mexico' },
'US-SW-SRP': { countryName: 'United States of America', zoneName: 'Salt River Project' },
'US-SW-TEPC': { countryName: 'United States of America', zoneName: 'Tucson Electric Power Company' },
'US-SW-WALC': {
countryName: 'United States of America',
zoneName: 'Western Area Power Administration - Desert Southwest Region',
},
'US-TEN-TVA': { countryName: 'United States of America', zoneName: 'Tennessee Valley Authority' },
'US-TEX-ERCO': { countryName: 'United States of America', zoneName: 'Electric Reliability Council Of Texas, Inc.' },
'US-TN': { countryName: 'United States of America', zoneName: 'Tennessee' },
'US-TX': { countryName: 'United States of America', zoneName: 'ERCOT' },
UY: { zoneName: 'Uruguay' },
};
export const getCountries = (): { code: string; name: string }[] => {
const result: { code: string; name: string }[] = [];
Object.keys(countryNames).forEach((key) => {
const sanitisedKey = key.split('-')[0];
if (!result.find((val) => val.code === sanitisedKey)) {
if (key.length < 4 && countryNames[key].zoneName !== 'Unknown') {
const name = countryNames[key].zoneName;
result.push({ code: key, name });
} else if (key.length > 2 && countryNames[key].zoneName !== 'Unknown') {
const code = key.split('-')[0];
const name = countryNames[key].countryName || countryNames[key].zoneName;
result.push({ code, name });
}
}
});
return result;
};
export const findKeysByCode = (code?: string): string[] => {
if (code) {
return Object.keys(countryNames).filter((key) => key.indexOf(code) == 0);
} else {
return Object.keys(countryNames);
}
};