You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def enum_to_json(enum_class):
members = []
for member in enum_class:
print(member) # Debugging line
members.append({
"area_key": member.name,
"code": member.code,
"meaning": member.meaning,
"timezone": member.tz
})
return members
Area code 10Y1001A1001A82H is used for both DE_LU and LU_BZN. It looks like only DE_LU is valid? Entsoe Areas Ref
This is leading to unexpected results in data processing.
One example is I am looping through country codes for EntsoePandasClient.query_day_ahead_prices and get a duplicate result for DE_LU and LU_BZN.
Another example is I am extracting mappings.py into JSON to build my data model and LU_BZN gets omitted:
`import json
from entsoe import mappings
area = mappings.Area
psrtype = mappings.PSRTYPE_MAPPINGS
docstatus = mappings.DOCSTATUS
bsntype = mappings.BSNTYPE
marketagreementtype = mappings.MARKETAGREEMENTTYPE
documenttype = mappings.DOCUMENTTYPE
processtype = mappings.PROCESSTYPE
neighbours = mappings.NEIGHBOURS
def enum_to_json(enum_class):
members = []
for member in enum_class:
print(member) # Debugging line
members.append({
"area_key": member.name,
"code": member.code,
"meaning": member.meaning,
"timezone": member.tz
})
return members
data = {
"areas": enum_to_json(area),
"psrtype": psrtype,
"docstatus": docstatus,
"bsntype": bsntype,
"marketingagreementtype": marketagreementtype,
"documenttype": documenttype,
"process_types": processtype,
"neighbours": neighbours
}
json_output = json.dumps(data, indent=4)
with open('entsoe_mappings.json', 'w') as file:
file.write(json_output)`
The text was updated successfully, but these errors were encountered: