Lune Docs Logo
Log inContact us

CSV upload

Calculate the CO₂e emissions for your shipment by uploading a CSV.

Pre-requisites

Complete the following setup steps before using this guide:
/illustrations/stamp-analytics.png
Log in and familiarize yourself with the Lune dashboard.

1. Fill in the CSV

Each row in the CSV represents a single shipment, supporting up to 10 legs per shipment. At least one leg is required per row. Each shipment must have the distance travelled, cargo weight, and transport method in order to be processed.We've outlined, below, the minimum requirements for successful use of Lune's CSV uploader. For a full list of headings that can be used in the CSV, as well as details about formatting, please see the CSV reference.
Minimum requirements
For a single leg shipment, with a known source and destination, the following headings should be included to be able to run an emission estimate calculation:
version
Required. Set this to 2 for all rows.
mass_kg
The shipment’s weight in kilograms.
source
Where the shipment originated. This can be provided as a comma-separated address, a UN/LOCODE, an IATA or ICAO airport code, or geographic coordinates.
leg1_destination
Where the shipment terminated. This can be provided as a comma-separated address, a UN/LOCODE, an IATA or ICAO airport code, or geographic coordinates.
leg1_method
The transport method for the leg.
You can also use our ready-made CSV templates that can be found in the Lune dashboard:
  • Sea shipment template: Five single-leg shipments by sea.
  • Road shipment template: Three single-leg shipments by road.
  • Air shipment template: Three single-leg shipments by air.
  • Train shipment template: Three single-leg shipments by train.
  • Multi-modal template. Three shipments with three legs each, using different transport methods. You can create a multi-modal sheet by combining the columns of the sea, road and air templates.
  • For multi-leg shipments, use the prefix legx_, replacing x with the leg number to identify values that are unique to each leg. For example, use leg1_ for the first leg and leg6_ for the sixth leg.
  • Cargo weight
    Cargo weight must be included in the CSV. However, it can be expressed using mass or number of containers. If you have both pieces of information, we recommend adding both for a more accurate estimate.
    mass_kg
    The shipment’s weight in kilograms. Either mass_kg or containers is required. Both can be provided for more accurate estimates.
    containers
    The number of TEU containers in the shipment. Either mass_kg or containers is required. Both can be provided for more accurate estimates.
    Distance or route
    Distance travelled must be included in the CSV. However, it can be expressed through number of kilometres, or the source and destination of a leg.
    legx_distance_km
    The distance traveled during this shipment leg, in kilometres.
    source
    Where the shipment originated.
    legx_destination
    Where the leg terminated; where the subsequent leg begins.
    The source and destination can be identified through:
    • Comma-seperated address, ending with a country code: The country code is a 3-letter ISO 3166 country code. For example, Apple Lane, London, SW1A 2AA, GBR.
    • UN LOCODE For example, CA.
    • IATA or ICAO airport code: For example, LHR.
    • Geographical coordinates: Should be formatted as lat x lon y . For example: lat 43.65 lon 79.38.
    Transport method
    Specify the transport method for each leg using the legx_method heading. Common values include:
    • cargo_plane
    • container_ship
    • diesel_truck
    All the available values can be found in the CSV reference.If tracking a sea shipment by vessel, leave the legx_method column blank and instead provide the vessel’s IMO number or name under legx_vessel_identification. Examples include:
    • IMO number: 9619969
    • Vessel name: MARIBO MAERSK
    Additional details such as fuel, trade lane, and refrigeration can be added to the shipments row. For a full list of available headings, go to the CSV reference.
    Tracking and analytics
    If you'd like to seperate the calculations by your end customer, you can include the following headers in each row. By including these headers, Lune can provide tailored analytics to each of your end customers.
    shipment_id
    A unique identifier for reconciling emission estimates with shipments in your system. Generate this string to track shipments in the results CSV.
    client_account_id
    Links the emission estimate to an existing client account. Required for generating emission reports for your customers.
    client_account_handle
    Associates the estimate with an existing client account if the handle matches. If no matching handle is found and no client_account_id is provided, a new client account is created. Required for generating emission reports for your customers.
    client_account_currency
    The client account’s currency, specified as an ISO 4217 three-letter currency code. Note: Lune does not support all currency codes. Required if creating a new client account via CSV.
    is_shipment
    Indicates whether the estimate is for an actual shipment. Defaults to false if left blank.
    shipped_at
    The shipment date and time, recorded for analytics purposes. Use the RFC 3339 section 5.6 timestamp format.

    2. Upload the CSV

    Populate the CSV sheet using your preferred editor. You can either omit or leave blank any non-required columns. Once all required values have been added, save the file in .csv format, ensuring it has the .csv file extension.Next, go to the logistics spreadsheet calculation page to upload your file. You can upload the CSV by either dragging and dropping it onto the page or clicking the Upload button to select the file manually. Make sure the file size does not exceed 2MB.An image showing the drag and drop area of the dashboard, where the CSV can be uploaded.Once uploaded, the file will begin processing automatically. You will receive an email notification when the processing is complete.

    3. Interpret the results

    Once the sheet has been processed and you receive the confirmation email, you can download the results directly from the confirmation email.The results are also available in a table at the bottom of the logistics spreadsheet calculation page. This table displays each upload, the number of calculations processed, and provides an option to download the results.The results are provided in CSV format. Your original submitted data remains intact, with a few additional headings added to the results file:
    estimate_id
    The unique identifier for the emission estimate.
    dashboard_url
    The URL to the specific emission calculation page in the Lune dashboard. This page allows you to review your estimate, understand how the emissions were calculated, and offset emissions.
    total_mass_tco2
    The total emission estimate for the shipment, measured in tCO₂e.
    legx_total_tco2
    Prefixed with the relevant leg (legx_). The emission estimate for the shipment leg, measured in tCO₂e.
    For a full list of possible additional headings in the results CSV, go to the CSV Reference.Success! You’ve successfully calculated emissions for your shipment. This brings you one step closer to climate compliance!

    What to do next...

    Now that you have your estimate, there are several actions you can take!