This repository has been archived by the owner on Mar 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 104
/
definitions.js
246 lines (227 loc) · 10.7 KB
/
definitions.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
// Declare all types
// The value should not changed as it is stored in the database
// The variable name can however be changed
/* Units */
export const UNIT_LITER = 'L';
export const UNIT_KILOGRAMS = 'kg';
export const UNIT_MONETARY_EUR = 'EUR';
export const UNIT_ITEM = 'item';
export const UNIT_ENERGY = 'kWh';
export const UNIT_PORTION = 'portion';
export const UNIT_GLASS = 'glass';
export const UNIT_CUP = 'cup';
export const UNITS = [
UNIT_LITER,
UNIT_KILOGRAMS,
UNIT_MONETARY_EUR,
UNIT_ITEM,
UNIT_ENERGY,
UNIT_PORTION,
UNIT_GLASS,
UNIT_CUP,
];
export const UNIT_CURRENCIES = {
ALL: 'ALL',
ARS: 'ARS',
AUD: 'AUD',
BAM: 'BAM',
BGN: 'BGN',
BRL: 'BRL',
CAD: 'CAD',
CHF: 'CHF',
CNY: 'CNY',
CZK: 'CZK',
DKK: 'DKK',
EUR: 'EUR',
GBP: 'GBP',
HKD: 'HKD',
HRK: 'HRK',
HUF: 'HUF',
IDR: 'IDR',
ILS: 'ILS',
INR: 'INR',
ISK: 'ISK',
JPY: 'JPY',
KRW: 'KRW',
MKD: 'MKD',
MXN: 'MXN',
MYR: 'MYR',
NOK: 'NOK',
NZD: 'NZD',
PHP: 'PHP',
PLN: 'PLN',
RON: 'RON',
RSD: 'RSD',
RUB: 'RUB',
SEK: 'SEK',
SGD: 'SGD',
THB: 'THB',
TRY: 'TRY',
TWD: 'TWD',
USD: 'USD',
ZAR: 'ZAR',
};
/* Activity Types
Each activity type is tied to a specific UI
This is why it's important to group the electricity activities together
as they will use the electricityMap.
*/
export const ACTIVITY_TYPE_ELECTRICITY = 'ACTIVITY_TYPE_ELECTRICITY';
export const ACTIVITY_TYPE_ELECTRIC_VEHICLE_CHARGING = 'ACTIVITY_TYPE_ELECTRIC_VEHICLE_CHARGING';
export const ACTIVITY_TYPE_ELECTRIC_HEATING = 'ACTIVITY_TYPE_ELECTRIC_HEATING';
export const ACTIVITY_TYPE_NON_ELECTRIC_HEATING = 'ACTIVITY_TYPE_NON_ELECTRIC_HEATING';
export const ACTIVITY_TYPE_TRANSPORTATION = 'ACTIVITY_TYPE_TRANSPORTATION';
export const ACTIVITY_TYPE_MEAL = 'ACTIVITY_TYPE_MEAL';
export const ACTIVITY_TYPE_PURCHASE = 'ACTIVITY_TYPE_PURCHASE';
export const ELECTRICITY_ACTIVITIES = [
ACTIVITY_TYPE_ELECTRICITY,
ACTIVITY_TYPE_ELECTRIC_VEHICLE_CHARGING,
ACTIVITY_TYPE_ELECTRIC_HEATING,
];
export const ALL_ACTIVITY_TYPES = [
...ELECTRICITY_ACTIVITIES,
ACTIVITY_TYPE_NON_ELECTRIC_HEATING,
ACTIVITY_TYPE_TRANSPORTATION,
ACTIVITY_TYPE_MEAL,
ACTIVITY_TYPE_PURCHASE,
];
/* Transportation */
export const TRANSPORTATION_MODE_PLANE = 'plane';
export const TRANSPORTATION_MODE_BIKE = 'bike';
export const TRANSPORTATION_MODE_EBIKE = 'ebike';
export const TRANSPORTATION_MODE_CAR = 'car';
export const TRANSPORTATION_MODE_BUS = 'bus';
export const TRANSPORTATION_MODE_PUBLIC_TRANSPORT = 'public_transport';
export const TRANSPORTATION_MODE_TRAIN = 'train';
export const TRANSPORTATION_MODE_FERRY = 'ferry';
export const TRANSPORTATION_MODE_ESCOOTER = 'escooter';
export const TRANSPORTATION_MODE_MOTORBIKE = 'motorbike';
export const TRANSPORTATION_MODE_FOOT = 'foot';
export const TRANSPORTATION_MODE_OTHER_TRANSPORT = 'other_transport'; // funicular, elevator etc
/* Meals */
export const MEAL_TYPE_VEGAN = 'MEAL_TYPE_VEGAN';
export const MEAL_TYPE_VEGETARIAN = 'MEAL_TYPE_VEGETARIAN';
export const MEAL_TYPE_MEAT_OR_FISH = 'MEAL_TYPE_MEAT_OR_FISH';
export const MEAL_TYPE_PESCETARIAN = 'MEAL_TYPE_PESCETARIAN';
export const MEAL_TYPE_MEAT_LOW = 'MEAL_TYPE_MEAT_LOW';
export const MEAL_TYPE_MEAT_MEDIUM = 'MEAL_TYPE_MEAT_MEDIUM';
export const MEAL_TYPE_MEAT_HIGH = 'MEAL_TYPE_MEAT_HIGH';
// Car
// Size (values are used in co2eq/car/cars.json)
export const EUROCARSEGMENT_A = 'A'; // corresponds to size "Mini" in https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2019
export const EUROCARSEGMENT_B = 'B'; // corresponds to size "Supermini" in https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2019
export const EUROCARSEGMENT_C = 'C'; // corresponds to size "Lower medium" in https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2019
export const EUROCARSEGMENT_D = 'D'; // corresponds to size "Upper medium" in https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2019
export const EUROCARSEGMENT_E = 'E'; // corresponds to size "Executive" in https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2019
export const EUROCARSEGMENT_F = 'F'; // corresponds to size "Luxury" in https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2019
export const EUROCARSEGMENT_S = 'S'; // corresponds to size "Sports" in https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2019
export const EUROCARSEGMENT_J = 'J'; // corresponds to size "Dual purpose 4X4" in https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2019
export const EUROCARSEGMENT_M = 'M'; // corresponds to size "MPV" in https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2019
export const EUROCARSEGMENTS = [
EUROCARSEGMENT_A,
EUROCARSEGMENT_B,
EUROCARSEGMENT_C,
EUROCARSEGMENT_D,
EUROCARSEGMENT_E,
EUROCARSEGMENT_F,
EUROCARSEGMENT_S,
EUROCARSEGMENT_J,
EUROCARSEGMENT_M,
];
// Engine type (values are used in co2eq/car/cars.json)
export const ENGINETYPE_DIESEL = 'diesel';
export const ENGINETYPE_PETROL = 'petrol';
export const ENGINETYPE_PLUGIN_HYBRID_ELECTRIC = 'plugInHybridElectric';
export const ENGINETYPE_BATTERY_ELECTRIC = 'batteryElectric';
export const ENGINETYPE_HYBRID = 'hybrid';
export const ENGINETYPE_LPG = 'lpg';
export const ENGINETYPE_CNG = 'cng';
export const ENGINETYPES = [
ENGINETYPE_DIESEL,
ENGINETYPE_PETROL,
ENGINETYPE_PLUGIN_HYBRID_ELECTRIC,
ENGINETYPE_BATTERY_ELECTRIC,
ENGINETYPE_HYBRID,
ENGINETYPE_LPG,
ENGINETYPE_CNG,
];
// Heating source
export const HEATING_SOURCE_COAL_BOILER = 'HEATING_SOURCE_COAL_BOILER';
export const HEATING_SOURCE_OIL_BOILER = 'HEATING_SOURCE_OIL_BOILER';
export const HEATING_SOURCE_GAS_BOILER = 'HEATING_SOURCE_GAS_BOILER';
export const HEATING_SOURCE_GAS_MICRO_COMBINED_HEAT_AND_POWER =
'HEATING_SOURCE_GAS_MICRO_COMBINED_HEAT_AND_POWER';
export const HEATING_SOURCE_GAS_ABSORPTION_HEAT_PUMP = 'HEATING_SOURCE_GAS_ABSORPTION_HEAT_PUMP';
export const HEATING_SOURCE_BIOSOURCED_GASES = 'HEATING_SOURCE_BIOSOURCED_GASES';
export const HEATING_SOURCE_BIOMASS_BOILER = 'HEATING_SOURCE_BIOMASS_BOILER';
export const HEATING_SOURCE_GEOTHERMAL = 'HEATING_SOURCE_GEOTHERMAL';
export const HEATING_SOURCE_SOLAR_THERMAL = 'HEATING_SOURCE_SOLAR_THERMAL';
export const HEATING_SOURCE_DISTRICT_HEATING = 'HEATING_SOURCE_DISTRICT_HEATING';
// Hotel stay
export const HOTEL_CLASS_ZERO_TO_TWO_STARS = 'HOTEL_CLASS_ZERO_TO_TWO_STARS';
export const HOTEL_CLASS_THREE_STARS = 'HOTEL_CLASS_THREE_STARS';
export const HOTEL_CLASS_FOUR_STARS = 'HOTEL_CLASS_FOUR_STARS';
export const HOTEL_CLASS_FIVE_STARS = 'HOTEL_CLASS_FIVE_STARS';
/* Purchases */
// Food and beverages
export const PURCHASE_CATEGORY_FOOD = 'Food';
export const PURCHASE_CATEGORY_FOOD_BAKERY = 'Cereals and cereal products (ND)';
export const PURCHASE_CATEGORY_ALCOHOL = 'ALCOHOLIC BEVERAGES';
export const PURCHASE_CATEGORY_READY_FOOD = 'Ready-made food and other food products n.e.c. (ND)';
export const PURCHASE_CATEGORY_FOOD_SERVING_SERVICES = 'FOOD AND BEVERAGE SERVING SERVICES';
// Stores
export const PURCHASE_CATEGORY_STORE_CLOTHING = 'CLOTHING';
export const PURCHASE_CATEGORY_STORE_FOOD = 'FOOD AND NON-ALCOHOLIC BEVERAGES';
export const PURCHASE_CATEGORY_STORE_HARDWARE = 'TOOLS AND EQUIPMENT FOR HOUSE AND GARDEN';
export const PURCHASE_CATEGORY_STORE_GARDEN_AND_PET = 'GARDEN PRODUCTS AND PETS';
export const PURCHASE_CATEGORY_STORE_ELECTRONIC = 'Information and communication equipment';
export const PURCHASE_CATEGORY_STORE_BOOKS = 'NEWSPAPERS, BOOKS AND STATIONERY';
export const PURCHASE_CATEGORY_STORE_PERSONAL_CARE = 'PERSONAL CARE';
export const PURCHASE_CATEGORY_STORE_FURNISHING = 'Furnishings, loose carpets and rugs (D)';
export const PURCHASE_CATEGORY_STORE_HOUSEHOLD_APPLIANCE = 'HOUSEHOLD APPLIANCES';
// Healthcare
export const PURCHASE_CATEGORY_MEDICINES_AND_HEALTH_PRODUCTS = 'MEDICINES AND HEALTH PRODUCTS';
export const PURCHASE_CATEGORY_HEALTHCARE_DOCTOR = 'OUTPATIENT CARE SERVICES';
// Transportation
export const PURCHASE_CATEGORY_TRANSPORTATION_FUEL =
'Fuels and lubricants for personal transport equipment (ND)';
export const PURCHASE_CATEGORY_TRANSPORTATION_AUTOMOTIVE_MAINTENANCE_AND_REPAIR =
'Maintenance and repair of personal transport equipment (S)';
export const PURCHASE_CATEGORY_TRANSPORTATION_AUTOMOTIVE_PARTS =
'Parts and accessories for personal transport equipment (SD)';
export const PURCHASE_CATEGORY_OTHER_TRANSPORT_SERVICES = 'Other purchased transport services (S)';
export const PURCHASE_CATEGORY_TRANSPORT_ROAD = 'Passenger transport by road (S)';
export const PURCHASE_CATEGORY_TRANSPORT_AIR = 'Passenger transport by air (S)';
export const PURCHASE_CATEGORY_TRANSPORT_RAIL = 'Passenger transport by railway (S)';
export const PURCHASE_CATEGORY_TRANSPORT_BOAT =
'Passenger transport by sea and inland waterway (S)';
export const PURCHASE_CATEGORY_COMBINED_PASSENGER_TRANSPORT = 'Combined passenger transport (S)';
export const PURCHASE_CATEGORY_MISC_SERVICES_PERSONAL_TRANSPORT =
'Other services in respect of personal transport equipment (S)';
// Entertainment
export const PURCHASE_CATEGORY_ENTERTAINMENT_HOTEL = 'ACCOMMODATION SERVICES';
export const PURCHASE_CATEGORY_RECREATIONAL_SERVICES = 'RECREATIONAL SERVICES';
export const PURCHASE_CATEGORY_RECREATIONAL_DURABLES = 'RECREATIONAL DURABLES';
export const PURCHASE_CATEGORY_PACKAGE_HOLIDAYS = 'PACKAGE HOLIDAYS';
// Finances
export const PURCHASE_CATEGORY_FINANCIAL_SERVICES = 'FINANCIAL SERVICES';
export const PURCHASE_CATEGORY_INSURANCE = 'INSURANCE';
// Household - Housing
export const PURCHASE_CATEGORY_HOUSING = 'HOUSING, WATER, ELECTRICITY, GAS AND OTHER FUELS';
export const PURCHASE_CATEGORY_NON_DURABLE_HOUSEHOLD_GOODS = 'Non-durable household goods (ND)';
export const PURCHASE_CATEGORY_OTHER_ENERGY_HEATING_COOLING =
'Other energy for heating and cooling (ND)';
export const PURCHASE_CATEGORY_MAINTENANCE_DWELLING =
'MAINTENANCE, REPAIR AND SECURITY OF THE DWELLING';
export const PURCHASE_CATEGORY_MISC_DWELLING =
'WATER SUPPLY AND MISCELLANEOUS SERVICES RELATING TO THE DWELLING';
export const PURCHASE_CATEGORY_RENTAL = 'ACTUAL RENTALS FOR HOUSING';
export const PURCHASE_CATEGORY_GAS = 'Gas (ND)';
export const PURCHASE_CATEGORY_ELECTRICITY = 'Electricity (ND)';
// Purchase MISC
export const PURCHASE_CATEGORY_TOBACCO = 'TOBACCO';
export const PURCHASE_CATEGORY_OTHER_SERVICES = 'OTHER SERVICES';
export const PURCHASE_CATEGORY_SOCIAL_PROTECTION = 'SOCIAL PROTECTION';
export const PURCHASE_CATEGORY_OTHER_PERSONAL_EFFECTS = 'Other personal effects n.e.c. (SD)';
export const PURCHASE_CATEGORY_INFORMATION_COMMUNICATION = 'INFORMATION AND COMMUNICATION';
export const PURCHASE_CATEGORY_MOBILE_PHONE = 'Mobile phone';