Generic Import Script
The generic import script can be used to import emissions using a generic file format (similar to Bridger data) for any data provider.
CSV Format
The following headers must be present in the CSV file, even though some of them can be blank:
| 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 |
Notes:
- Owner column is not required, but if it is present, any company found in the file must exist in the platform, or the import script will fail.
- Any additional fields will be stored as extra data object.
Script Arguments
In addition to the common arguments (environment, api_key, data_path), the generic script requires:
--data_provider- The exact name of the data provider existing in the platform--data_source- Source of the data:SELF_REPORTED,THIRD_PARTY, orEPA--contains_no_detects- Whether the data contains non-detects:1or0
Example
Example of calling the generic script on prod-testing environment to import EDF MethaneAir data:
bash
python -m importers.emissions.generic --environment staging --api_key {API_KEY_VALUE} --data_path {PATH_TO_FOLDER} --data_provider "EDF MethaneAir" --contains_no_detects 1 --data_source SELF_REPORTEDAnother example with a different provider:
bash
python -m importers.emissions.generic --environment staging --api_key {API_KEY_VALUE} --data_path {PATH_TO_FOLDER} --data_provider "Existing Data Provider" --contains_no_detects 1 --data_source SELF_REPORTED