Skip to content
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

Add MVE such that MaStR data can be plotted on a map #465

Open
1 task done
El-Don-Quijote opened this issue Sep 25, 2023 · 4 comments
Open
1 task done

Add MVE such that MaStR data can be plotted on a map #465

El-Don-Quijote opened this issue Sep 25, 2023 · 4 comments
Assignees
Labels
✂️ post processing Issues about post processing

Comments

@El-Don-Quijote
Copy link

El-Don-Quijote commented Sep 25, 2023

Description of the issue

After downloading (bulk) the open-MaStR data I am looking for a minium viable example to plot some of its data on a map. I am unsure if the example jupyter notebooks shall be used, as the documentation states the post-processing features are outdated and additional packages are necessary.

Ideas of solution

To make the most of this package for new users, an additional jupyter notebook explaining basic plotting and aggregation methods would be very useful.

Workflow checklist

@chrwm
Copy link
Member

chrwm commented Sep 26, 2023

Hi El-Don-Quijote, thanks for your input. We agree with you but due to limited resources we're currently unable to realise new features. Are you interested in contributing on that matter?

@El-Don-Quijote
Copy link
Author

Dear chrwm,
I can imagine myself doing that! I probably would need some minor guidance however, as I do not have a track record in contributing to projects. Are there some code snippets / notebooks that could serve me as a starting point?

@chrwm
Copy link
Member

chrwm commented Sep 26, 2023

For the guidelines of how to contribute to the repo, see here.

We have collected post-processing relevant code here.

See this issue for a collection of post-processing features that open-mastr users and maintainer would like to implement in the future

@chrwm chrwm self-assigned this Sep 26, 2023
@chrwm chrwm added the ✂️ post processing Issues about post processing label Sep 26, 2023
@nesnoj
Copy link
Collaborator

nesnoj commented Sep 26, 2023

Hey @El-Don-Quijote, An MVE-snippet für importing a previously from open-mastr exported unit dataset and displaying via folium, e.g. in a jupy nb:

import pandas as pd
import geopandas as gpd
import folium

wind_turbines = pd.read_csv("bnetza_mastr_wind_raw.csv")

wind_turbines = gpd.GeoDataFrame(
    wind_turbines,
    geometry=gpd.points_from_xy(wind_turbines["Laengengrad"], wind_turbines["Breitengrad"], crs=4326),
    crs=4326,
).to_crs(3035)

wind_turbines = wind_turbines.loc[wind_turbines.EinheitBetriebsstatus == "In Betrieb"]

m = folium.Map(
    location=[52.51, 13.41],
    tiles="cartodbpositron",
    zoom_start=8,
    control_scale=True,
    prefer_canvas=True
)
folium.features.GeoJson(
    wind_turbines.geometry,
    name="Wind turbines",
    marker = folium.CircleMarker(
        radius = 3,
        weight = 1,
        fill_color = "#5555ff",
        color = "#3333ff",
        fill_opacity = 0.5),
).add_to(m)
folium.LayerControl(collapsed=False, position="bottomright").add_to(m)
m

m.save("wind_turbines_map.html")

@FlorianK13 FlorianK13 added 👐 help wanted Extra attention is needed and removed 👐 help wanted Extra attention is needed labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✂️ post processing Issues about post processing
Projects
None yet
Development

No branches or pull requests

4 participants