Forum Discussion
WIndrose plot in power BI
i want to create wind rose diagram/plot however i cannot find any help. I have tried aster plot/radar plot/R visual and charticulator. However i cannot make one. Please help
8 Replies
- lbendlinSuper User
- mmvohraHelper II
This is a simple radial plot, but how do I make windrose out of it? Can you please guide? The image below shown is the outcome that i desire.
- lbendlinSuper User
I don't think so. That image is from an old 2018 post.
- mmvohraHelper II
I want to create windrose, can you please help in this regard?
- lbendlinSuper User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- AnonymousNot applicable
Hi mmvohra
Thanks for the reply from lbendlin , please allow me to provide another insight:
Power BI supports Python scripts, which can be used to create a wide range of custom visualizations, including wind rose diagrams. You'll need to have Python installed on your machine along with the necessary libraries.
Ensure your dataset includes columns for wind direction (in degrees from 0 to 360) and wind speed. The data should be clean and ready for visualization.
Add a Python visual to your report and add the necessary fields to the Values section.
Use the following sample Python script, adjusting it to fit your dataset's column names:
Here for your reference:
import matplotlib.pyplot as plt from windrose import WindroseAxes # Sample data direction = dataset['Direction'] # Replace 'Direction' with your column name for wind direction speed = dataset['Speed'] # Replace 'Speed' with your column name for wind speed # Create wind rose plot ax = WindroseAxes.from_ax() ax.bar(direction, speed, normed=True, opening=0.8, edgecolor='white') ax.set_legend() plt.show()You can adjust the script to customize the appearance of your wind rose diagram. The library offers several options for customization, including changing the color, the number of direction bins, and more.
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- mmvohraHelper II
Thanks for code it is working.However, there is one issue that it is not dynamic.Can you help in this regard?
- SaaaraJNew Member
Good day,
Thanks. I was able to get the windrose built in the power bi desktop but that particually visual cannot displayed after I published the report to a workspace, with runtime error. see message detail here. can you please advice what should be done in order to let the visual display in a published report? Thanks
Script Runtime Error
[S-9263c0fe-64c3-422d-b386-7d82544a7cd8][S-9263c0fe-64c3-422d-b386-7d82544a7cd8]ModuleNotFoundError: No module named 'windrose'
Please try again later or contact support. If you contact support, please provide these details.