glossary_intro = (
    "This is a list of the terms used in Chellow reports. The terms are often "
    "concatenated with a '-', eg site-code. Please get in touch if you have any "
    "improvements."
)

glossary_terms = {
    "creation-date": "Timstamp for when the item (report, issue etc.) was created",
    "site": "An area that supplies are attached to",
    "name": "Usually used as a suffix showing what something's called",
    "associated-site-ids": "An era is physically attached to a single site, but it "
    "can also feed other sites. The column 'associated-site-ids' are the ids of the "
    "other sites that the supply feeds.",
    "month": "A timestamp indicating the month that the row applies to",
    "metering-type": "Uses the dtc-meter-type to determine if an era is 'unmetered', "
    "'nhh', 'amr' or 'hh'.",
    "source": "The source of electricity for a supply. Can be the grid, a generator "
    "(gen) a submeter (sub) or a 3rd-party (from another electricity customer).",
    "generator-type": "If a source is a 'gen' then this column holds the type of "
    "generation: 'chp', 'pv', 'turb' or 'lm'.",
    "generated": "Electricity that's imported from a generator into the site.",
    "parasitic": "Electricity that's exported to a generator from the site.",
    "import": "Relates to electricity flowing through a supply towards the site. "
    "Often combined with other terms, eg. import-grid-kwh means electricity flowing "
    "into the site from the grid.",
    "imp": "Same as 'import'",
    "export": "Relates to electricity flowing through a supply away from the site. "
    "See 'import'.",
    "exp": "Same as 'export'",
    "displaced": "Electricity that's comes from generation and is used on site. "
    "It's calculated as displaced-kwh = imp-gen-kwh - exp-grid-kwh - exp-gen-kwh",
    "used": "The amount of electricity used on a site. The formula is used-kwh = "
    "imp-grid-kwh + imp-gen-kwh - exp-grid-kwh - exp-gen-kwh",
    "net-gbp": "The cost net of VAT.",
    "vat-gbp": "The VAT amount.",
    "gross-gbp": "The total of net + VAT",
    "billed": "An amount that comes from the actual bill from the supplier "
    "(or MOP / DC)",
    "supplier": "The retailer of electricity",
    "dc": "The appointed Data Collector responsible for metering data.",
    "mpan-core": "A sequence of 13 digits that uniquely identifies a supply. The "
    "first two digits tells you the DNO, the next 10 digits are generated by the "
    "DNO, and the final digit is a check-digit.",
    "contract": "Represents a legal contract for services for electricity supply, "
    "data collection or meter operation) that the customer has signed. The "
    "contract in Chellow contains a script that generates the virtual bill, and the "
    "contract has rate scripts attached to it which hold the rates for the "
    "contract.",
    "era": "The supply is made up of eras laid end to end together. So an era has a "
    "start date and a finish date, with the finish date possibly being 'ongoing'. "
    "An era holds the characteristics of a supply that may change over time, such "
    "as sc, imp_supplier, exp_supplier, pc, dc,  etc.",
    "msn": "Meter serial number. This changes each time there's a new meter. If you "
    "know the msn, you can look up the supply in ECOES.",
    "pc": "Profile class. Classifies the supply, where 00 means a half-hourly metered "
    "supply.",
    "energisation-status": "A supply can be energised, de-energised or disconnected. "
    "If a supply is disconnected that's represented in Chellow by giving the final "
    "era an end date, rather than 'ongoing'. If a supply is ongoing, then the "
    "energisation status can be 'D' for de-energised or 'E' for energised. A "
    "de-energised supply is physically still there and live, but out of use.",
    "gsp-group": "Grid supply point group. The physical area of the country that the "
    "supply is in.",
    "dno": "Distribution Network Operator. The organistion that operates the "
    "electricity network between the transmission system and the meter.",
    "voltage-level": "The voltage level of a supply can be LV, HV, or EHV",
    "is-substation": "Whether there's a substation on the site.",
    "llfc": "Line loss factor class. Determines the DUoS tariff.",
    "mop": "Meter operator. Responsible for installing, maintaining and removing "
    "electricity meters.",
    "settlement-status": "Can be 'settlement' or 'non-settlement'. If it's "
    "'settlement' then the supply is part of the national electricity system, but "
    "'non-settlement' means that it's local to the site (such as a generator supply "
    "or a sub-meter).",
    "comm": "The comms type",
    "cop": "Code of practice for the meter. Describes the capabilities of the meter.",
    "msp": "Meter supply point. The electricity consumption measured at the meter",
    "standing": "Tariff element that's a rolled up per-day charge",
    "availability": "The supply capacity agreed with the DNO in a connection "
    "agreement.",
    "kva": "The amount of apparent power (kVA).",
    "kw": "The amount of usable power (kW).",
    "kwh": "The amount of usable energy (kWh).",
    "kvar": "The amount of reactive power (kVAr).",
    "laf": "Loss adjustment multiplier. The losses going through the distribution "
    "network.",
    "gsp-kwh": "The amount of energy that has flowed through the grid supply point. "
    "It's calculated for each half-hour using gsp-kwh = laf x msp-kwh",
    "nbp-kwh": "Notional balancing point kwh. Aims to be the amount "
    "of electricity that has to be generated to meeting The demand at the meter, "
    "taking into account transmission and distribution losses. It's given for "
    "each half-hour by nbp-kwh = tlm * gsp-kwh.",
    "kvarh": "The amount of reactive energy (kVArh)",
    "tlm": "Transmission loss multiplier. Used to calculate the losses between the "
    "notional balancing point and the grid supply point. Depends on the half-hour and "
    "the gsp-group.",
}

glossary_elements = {
    "ccl": "Climate Change Levy.",
    "cm": "Capacity Market",
    "bsuos": "Balancing System Use of System",
    "standing": "Rolled up per-day charge",
    "duos": "Distribution Use of System. Tariff charges from the DNO.",
    "excess-availability": "This is the availability used above the agreed supply "
    "capacity.",
    "duos-fixed": "The part of DUoS that's per-day.",
    "duos-red": "The highest cost period that's charged per-kWh.",
    "duos-amber": "The medium DUoS cost period that's charged per-kwh.",
    "duos-green": "The lowest DUoS cost period that's charged per-kwh.",
    "duos-reactive": "The DUoS charge per-kvarh.",
    "aahedc": "Assistance for Areas with High Electricity Distribution Costs",
    "ro": "Renewables Obligation",
    "cfd": "Contracts for Difference",
    "triad": "NESO charge based on kW at three triad times",
    "tnuos": "Transmission costs. A per-day tariff based on bands "
    "derived from LLFCs.",
    "rab": "Regulated Asset Base. The nuclear power subsidy.",
    "duos-black": "DUoS tariff element for unmetered supplies.",
    "duos-yellow": "DUoS tariff element for unmetered supplies.",
    "obligation": "The bigger part of some tariffs, as opposed to 'operational'. "
    "Eg. cm-obligation-gbp",
    "operational": "The smaller part of some tariffs, as opposed to 'obligation'. "
    "Eg. cm-operational-gbp",
    "elexon": "For funding Elexon, charged at nbp-kwh",
}
