Skip to content

marcia-marques/wind-rose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wind-rose

Python library to plot wind roses.

Installation

You can install directly from this repository:

pip install git+https://github.com/marcia-marques/wind-rose.git

Example of use

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)

image

plt.figure(figsize=(9,9))
wr.wind_rose_season(df, 'wd', yaxis=67.5, yticks=[100, 300, 500, 700])

image

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)

image

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)

image

plt.figure(figsize=(6,6))
wr.wind_rose_speed(df, 'ws', 'wd', yaxis=67.5)

image

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)

image

plt.figure(figsize=(7, 7))
wr.wind_rose_pollution(df, 'co', 'ws', 'wd', var_label='CO (ppm)', yaxis=245)

image

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)

image

Acknowledgments

Air quality data provided by CETESB.

License

The source code is released under the BSD-3-Clause License.

About

Python library to plot wind roses

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages