Python library to plot wind roses.
You can install directly from this repository:
pip install git+https://github.com/marcia-marques/wind-rose.git
import windroses.windroses as wr
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
df = pd.read_csv('data/pinheiros.txt')
sns.set_style('darkgrid')
plt.figure(figsize=(6,6))
wr.wind_rose(df, 'wd', yaxis=67.5)
plt.figure(figsize=(9,9))
wr.wind_rose_season(df, 'wd', yaxis=67.5, yticks=[100, 300, 500, 700])
plt.figure(figsize=(6, 6))
yticks = [1.4, 2.8, 4.3, 5.7, 7.1 ]
wr.wind_rose_scatter(df, 'ws', 'wd', yaxis=67.5, yticks=yticks)
plt.figure(figsize=(9, 9))
yticks = [1.4, 2.8, 4.3, 5.7, 7.1 ]
wr.wind_rose_scatter_season(df, 'ws', 'wd', yaxis=67.5, size=0.75, yticks=yticks)
plt.figure(figsize=(6,6))
wr.wind_rose_speed(df, 'ws', 'wd', yaxis=67.5)
plt.figure(figsize=(9,9))
yticks = [200, 400, 600, 800]
lims = [0., 1.42, 2.84, 4.26, 5.68, 7.1 ]
wr.wind_rose_speed_season(df, 'ws', 'wd', yticks=yticks, lims=lims, yaxis=67.5)
plt.figure(figsize=(7, 7))
wr.wind_rose_pollution(df, 'co', 'ws', 'wd', var_label='CO (ppm)', yaxis=245)
plt.figure(figsize=(10, 10))
lims = [0., 1.42, 2.84, 4.26, 5.68]
wr.wind_rose_pollution_season(df, 'co', 'ws', 'wd', var_label='CO (ppm)', lims=lims, yaxis=245)
Air quality data provided by CETESB.
The source code is released under the BSD-3-Clause License.