Skip to content

Commit

Permalink
patch: work around issue #8 by limiting lat/lon
Browse files Browse the repository at this point in the history
  • Loading branch information
hbruch committed Apr 22, 2024
1 parent 186b75b commit c606654
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 03_download_mastr.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def download_page(url, page, file_name):
df["KwkAnlageRegistrierungsdatum"] = to_iso_date(df, "KwkAnlageRegistrierungsdatum")


# Patch LatLon errors (see https://github.com/wattbewerb/wattbewerb-mastr-db/issues/8)
df['Laengengrad'].where(df['Laengengrad'] > 180, 180, inplace=True)
df['Breitengrad'].where(df['Breitengrad'] > 90, 90, inplace=True)

# Render IDs as ints
for col in ['BundeslandId','HauptbrennstoffId','AnlagenbetreiberId','AnlagenbetreiberPersonenArt','IsNBPruefungAbgeschlossen',
'LokationId','Batterietechnologie','LageEinheit','Leistungsbegrenzung','Regelzone','VollTeilEinspeisung',
Expand Down

0 comments on commit c606654

Please sign in to comment.