Skip to content
This repository was archived by the owner on Mar 28, 2025. It is now read-only.

JSON Files and How to Edit them

echang97 edited this page Jul 18, 2019 · 16 revisions

The .json files are located under the config folder.

Use any text editor of your choice. I use Atom

A .json file might look something like this:

{
    "header": [
        "Month",
        "Calendar Year",
        "Land Class",
        "Land Category",
        "Commodity",
        "Volume"
    ],
    "unit_dict": {
        "Gas Prod Vol": [
            "mcf"
        ],
        "Oil Prod Vol": [
            "bbl"
        ],
        "Coal Prod Vol": [
            "ton"
        ],
        "Geothermal - Electrical Generation": [
            "Kilowatt Hours",
            "Other",
            "Thousands of Pounds"
        ]
    },
    "field_dict": {
        "Land Class": [
            "Native American",
            "Federal"
        ],
        "Land Category": [
            "Onshore",
            "Offshore"
        ]
    },
    "replace_dict": {
        "Mining-Unspecified": "Humate"
    },
    "na_check": [
        "Calendar Year",
        "Corperate Name",
        "Ficsal Year",
        "Mineral Lease Type",
        "Month",
        "Onshore/Offshore",
        "Volume"
    ],
    "threshold": {
        "Coal Prod Vol (ton)": [
            -31596802.14262197,
            66350921.44337984
        ],
        "Gas Prod Vol (mcf)": [
            -194287369.27883062,
            502825436.1639794
        ],
        "Oil Prod Vol (bbl)": [
            -35782517.023709275,
            77050385.9023059
        ]
    }
}

Notes:

  • Separate each entry by a comma
  • Words are always in quotes

header -- Put Field Names you want it to check for. Order matters

unit_dict -- Name of Item first, then a list of units enclosed in square brackets

"Item": ["unit_1", "unit_2", ... , "unit_n"]

field_dict -- Name of the field and any acceptable entries enclosed in square brackets

"Field_Name" : ["value_1", "value_2"]

replace_dict -- (Commodity Only) The Item you want to replace followed by the entry to replace it with

["Item_to_replace": "Replacement_Value"]

na_check -- Put columns you want to check for NaN

threshold -- "Item": [ min_acceptable_value, max_acceptable_value ]

Clone this wiki locally