Rail emissions
Provide distance and rail-type data for accurate rail emission calculations, with a country-by-country code reference.
For an accurate rail emissions calculation, you should attempt to ensure you provide Thrust Carbon with sufficient data for both:
- Calculate the 'distance' of travel
- Calculate the 'type' of rail travel
In all cases, it's okay if you are unable to provide a full dataset (it's rare that clients have all the available data), as Thrust Carbon will provide progressive fallbacks to all data calculations.
Data to calculate distance of travel
Thrust Carbon use as many data points as possible to try and calculate the origin/destination locations of a rail journey. We recommend you provide as many data points as possible so we are able to accurately resolve the location; suggested included locations:
distance- if you have the distance available in KM, we will always attempt to use this for the rail calculation in the first case. You should still provide the data below, since we may use the locations data to calculate the 'type' of rail travel.uic- a universal identifier of railway stationssncf/uk_station_code/trainline_code- vendor specific identifiers (you can provide more than one at once)address_line_1+postal_code+country_code- so Thrust Carbon can geocode the addresscoordinates- if you have this available, we can calculate based on latitude and longitude as a fallback.- Any other supported location code, since we may be able to find an average location based on this data: Location | Thrust Docs v2
- For example, if you can only provide the 'city' of travel, we will base the distance on the centre of the city.
Coordinates are an object, not a string
Send coordinates as an object, {"latitude": 51.5073509, "longitude": -0.1277583}. A combined, space-separated string such as "51.5073509 -0.1277583" does not error, but silently returns the wrong distance — tested examples of Paris to Lyon and London to Manchester both collapsed to the same incorrect 46.67 km when sent as a string.
It's okay if you don't have any location information
You should not ignore journeys that do not have any associated information. Instead send us the empty location dataset, and we will calculate based on an 'average' distance for that country.
Data to calculate 'type' of rail travel
Emissions differ based on the type of train that a customer travels upon. For example, a diesel train normally has significantly higher emissions per-kilometre compared to electrified trains.
We normally apply one of three rail types:
- If the country has emissions factors for different types of train (e.g. diesel, high-speed, etc), we will use the correct rail factor.
- If the country only has an emissions factor for all rail in the country (i.e. it doesn't differentiate between high-speed and slow rail), we will work out the country from the location data you provide above.
- If there is no published emissions factor for the country, we will apply a 'fallback' to the DEFRA domestic rail methodology.
country_code is the field name, and it drives the factor
The location field is country_code, not country. It is what selects the country-specific emission factor for NATIONAL_RAIL in the table below — get it wrong and the request does not fail, it silently falls back to a generic factor and returns a different, incorrect figure. Sending an accurate country_code alongside an accurate distance is the single most valuable thing you can do for rail accuracy.
Therefore, your implementation should attempt to pass us the information for the type of train. Therefore, if you have any of the following pieces of data, you should pass us the rail_type variable that corresponds to your data:
| Country | Supported Rail Type Code | Description |
|---|---|---|
| United Kingdom (and Default) | NATIONAL_RAIL NATIONAL_RAIL_LONG INTERNATIONAL_RAIL LIGHT_RAIL_TRAM TRAM LIGHT_RAIL SUBWAY LONDON_UNDERGROUND | National Rail National Rail > 300km International Rail Light rail and Tram Tram Light Rail Subway London Underground |
| Austria | NATIONAL_RAIL | National Rail |
| Belgium | NATIONAL_RAIL | National Rail |
| Switzerland | NATIONAL_RAIL NATIONAL_RAIL_LONG | National Rail National Rail > 300km |
| Czech Republic | NATIONAL_RAIL CZ-SCPNDL CZ-RJ | National Rail CD SC Pendolino CD Railjet |
| Germany | NATIONAL_RAIL NATIONAL_RAIL_LONG DE-RE DE-IC | National Rail National Rail > 300km Regional (IRE, RB, RE, S-Bahn,) Long-distance (ICE, InterCity, EuroCity) |
| Denmark | NATIONAL_RAIL | National Rail |
| Spain | NATIONAL_RAIL | National Rail |
| Finland | NATIONAL_RAIL | National Rail |
| France | NATIONAL_RAIL NATIONAL_RAIL_LONG FR-LYRIA FR-TGV-IN FR-TER FR-TGV-G FR-INTER FR-RER FR-TRIL FR-TGV-O | National Rail National Rail > 300km SNCF - LYRIA SNCF - TGV INOUI TER SNCF - TGV Intercités RER IDF Transilien SNCF - OUIGO |
| Netherlands** | NATIONAL_RAIL | National Rail |
| Norway | NATIONAL_RAIL | National Rail |
| Portugal | NATIONAL_RAIL | National Rail |
| Romania | NATIONAL_RAIL | National Rail |
| Sweden | NATIONAL_RAIL NATIONAL_RAIL_LONG SE-SJ-STD SE-SJX SE-SJ-EURONIGHT | National Rail National Rail > 300km SJ standard SJ X 2000 EuroNight train |
| Slovenia | NATIONAL_RAIL | National Rail |
| United States*** | NATIONAL_RAIL AMTRAK_OUTSIDE_NE AMTRAK_NE | National Rail Rail outside the North East corridor Rail within North East corridor |
** Netherlands national rail states the emissions per passenger km to be 0 kgCO2e as a result of utilising green electricity, as such any rail segments operating within NL will return an emission of 0. Confirmed against the live API.
*** AMTRAK_NE and AMTRAK_OUTSIDE_NE are not currently accepted by the API. Every casing tried is rejected with "The rail type field format is invalid." They remain listed here because it has not yet been confirmed whether this is a deliberate retirement or a bug — use NATIONAL_RAIL in the meantime.
NATIONAL_RAIL_LONG has no effect of its own — the switch is automatic
Sending NATIONAL_RAIL_LONG does not choose the long-distance factor. The API applies it automatically, per country, once the journey reaches exactly 300 km. Send NATIONAL_RAIL with an accurate distance and country_code, and the correct factor — short or long-distance — is selected for you. SERVICE behaves the same way: it returns the plain NATIONAL_RAIL factor, with no effect of its own that we've been able to observe.
Integration checklist
- Are you providing a segment
typeofrail? - Are you providing distance information?
- Are you providing at least one location information item?
- Are you providing additional location information as a fallback?
- For vendors in the
rail_typetable, are you providing the rail type code?
Example requests
Please contact the Thrust Carbon team for example requests. When contacting them, please make it clear what data you have available during the request stage; it is okay if you only have data for some requests, but please tell the team this.