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 header | Transformed Header | Data Transform | Help |
|---|---|---|---|
| Flux | Detected Rate | YES | kg/h → g/h, NA → Empty string |
| Flux SD | Detected Rate Uncertainty | YES | kg/h → g/h, NA → Empty string |
| X | Longitude | NO | |
| Y | Latitude | NO | |
| ID | Record ID | NO | |
| YYYYMMDD | Detection Timestamp | YES | YYYYMMHH → 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:
| Header | Type | Blank | Help |
|---|---|---|---|
| Plume image | String | YES | Each file referenced in this column must exist in the --data_path folder |
| Emission detected | Boolean | NO | (Yes/No) or (True, False) |
| Longitude | Number | NO | |
| Latitude | Number | NO | |
| Detection timestamp | Date | NO | ISO format |
| Detected rate | Decimal | YES | g/hr |
| Detected rate uncertainty | Decimal | YES | g/hr |
| Detection limit | PositiveInteger | NO | g/hr |
| Secondary Data Source | String | NO |
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 to1if you want to use the CSV file directly (already conforms to Aerscape data import format). Default is0.
Example
Example of calling the EDF MethaneAir import script on prod-testing environment:
python -m importers.emissions.edfmethaneair --environment staging --api_key {API_KEY_VALUE} --data_path {PATH_TO_FOLDER}With skip-transform option:
python -m importers.emissions.edfmethaneair --environment staging --api_key {API_KEY_VALUE} --data_path {PATH_TO_FOLDER} --skip-transform 1