Skip to content

EDF MethaneAir (early access)

This import script is used to import emissions via CSV provided for early release of EDF MethaneAir data.

The script has a built-in transformer that will rename the headers provided in the file to conform to our data import process. It will also add fields missing from the provided CSV file.

To skip CSV transform step, call the script with --skip-transform 1

Original CSV Transform

The following table shows how the original CSV headers are transformed:

Original headerTransformed HeaderData TransformHelp
FluxDetected RateYESkg/h → g/h, NA → Empty string
Flux SDDetected Rate UncertaintyYESkg/h → g/h, NA → Empty string
XLongitudeNO
YLatitudeNO
IDRecord IDNO
YYYYMMDDDetection TimestampYESYYYYMMHH → YYYY-MM-DD
Note-Disclaimer for extra data
Detection Limit-Set to 10000
Secondary Data Source-Early Release MethaneAIR
Emission Detected-Yes if Flux is not NA. No otherwise
Plume Image-Filename of a plume image in the import folder based on record id, empty string if not found

CSV Format

The following headers must be present in the CSV file, even though some of them can be blank. Entry point to this script will generally be an EDF provided CSV file that will be transformed into this format.

Use this table for reference if calling this import script with the --skip-transform option:

HeaderTypeBlankHelp
Plume imageStringYESEach file referenced in this column must exist in the --data_path folder
Emission detectedBooleanNO(Yes/No) or (True, False)
LongitudeNumberNO
LatitudeNumberNO
Detection timestampDateNOISO format
Detected rateDecimalYESg/hr
Detected rate uncertaintyDecimalYESg/hr
Detection limitPositiveIntegerNOg/hr
Secondary Data SourceStringNO

Note: Any additional fields will be stored as extra data object.

Script Arguments

In addition to the common arguments (environment, api_key, data_path), the EDF MethaneAir script accepts:

  • --skip-transform - Set to 1 if you want to use the CSV file directly (already conforms to Aerscape data import format). Default is 0.

Example

Example of calling the EDF MethaneAir import script on prod-testing environment:

bash
python -m importers.emissions.edfmethaneair --environment staging --api_key {API_KEY_VALUE} --data_path {PATH_TO_FOLDER}

With skip-transform option:

bash
python -m importers.emissions.edfmethaneair --environment staging --api_key {API_KEY_VALUE} --data_path {PATH_TO_FOLDER} --skip-transform 1