-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion for pulling data on renewable energy from the Marktstammdatenregister #29
Comments
Very cool. Exciting to see that others are working on this. Thanks. I myself are taking this week of to recharge after the sprint to make the release. @Ultramarin95 do you want to have a look? |
Witzigerweise habe ich genau den Export aus dem Marktstammdaten Register grade diese Woche geschrieben. ( Siehe GermanZero-de/localzero-generator-core#200 ) Ich werde mal die beiden "2018.csv" Versionen vergleichen und mir das Tool etwas genauer anschauen @curiousleo. |
@bgrundmann said:
Same here! Thanks for your work on LocalZero! |
@Ultramarin95 said:
Nice. Ich habe entsprechend dem verlinkten Skript die SQL-Abfrage aktualisiert (Brutto -> Nettoleistung, Summe als "DG000000"). In dem Skript geht es viel um AGS, die auch aus einer externen Quelle geholt werden -- den Teil verstehe ich nicht ganz, deshalb habe ich, was das angeht, erstmal nichts an der vorgeschlagenen SQL-Abfrage geändert. |
An der Stelle sollte https://github.com/OpenEnergyPlatform/open-MaStR nicht unerwähnt bleiben. Ich habe es selbst aber noch nicht verwendet. |
The commit messages on this repo are in English, so I'm writing this issue in English as well.
Problem: renewable energy statistics
This repo contains a summary of renewable energy data organised by Gemeindeschlüssel in CSV format:
https://github.com/GermanZero-de/localzero-data-public/blob/main/renewable_energy/2018.csv
The README explains how this data was gathered:
It seems like both the initial data gathering and the summation potentially involved a lot of work and may have been time consuming. It also sounds like there is an effort underway to automate the procedure.
Context: Marktstammdatenregister.dev
I created Marktstammdatenregister.dev to make it easy to query the Marktstammdatenregister. Summary statistics of the kind used in this repo are exactly the project's raison d'être.
Here's a preview of the relevant query that presents the summary statistics in the format used in the existing CSV file.
You'll see that it is missing statistics for solar power. I removed that part because the full query times out on the low-powered machine that runs the website.
However, almost any recent computer can give the full result quickly using the underlying database file, see the next section.
Idea: use SQLite export directly
In short (using
localzero.sql
):The database file that can be queried on https://ds.markstammdatenregister.dev can also be downloaded for local use. That's what the above snippet does.
We can then run the full query, including solar power, locally. With the right command-line arguments, SQLite outputs a CSV file with the format used in the existing file
2018.csv
.To calculate the statistics for any other date, just edit the first line of
localzero.sql
, for example:Note: results change over time
Many renewable energy units are registered after they've started operating, sometimes years later -- see this query.
So even a historical query like "how much solar power was generated in Buxtehude on 2018-12-31" may give different results depending on which version of the Markstammdatenregister is used.
Conclusion
This is what I built Markstammdatenregister.dev for. I think there's a good chance that it can save you time and effort.
Feel free to try the suggestions and to have a look around the data and the examples.
If you have any questions, I'm happy to help. It is also definitely possible that I made a mistake in writing the SQL query or misunderstood something about the summary statistics needed for LocalZero -- if you spot anything that looks off, let me know!
The text was updated successfully, but these errors were encountered: