Skip to main content

Bivariate polar plots in Python

Project description

Bivariate polar plots in Python

What it says on the tin. This repo provides functions for producing bivariate polar plots, a useful graphical analysis tool in air pollution research. This implementation is largely based on the R package openair and Carslaw and Beevers (2013) - these sources also provide some excellent example cases of bivariate polar plots in practice.

What bivapp does and does not provide

bivapp is intended to provide bivariate polar plots similar to the implementation in openair and as described by Carslaw and Beevers (2013). It is not intended to be a full-featured alternative to openair, as that package provides enough features that it is effectively a complete data analysis suite for air pollution studies. Many of openair's features are already available in other popular Python libraries. For example, openair provides a function for calculating Theil-Sen slopes, but scikit-learn and scipy already feature such tools.

bivapp currently also does not support producing windroses. See windrose instead. This may change in the future.

Documentation

At this early stage functions are only self-documented. Proper documentation is planned.

Existing solutions

The openair package for R provides all these features, but is obviously in R and not Python. The topic of bivariate polar plots in Python also pops up occasionally, like here, here, here, and here. Lastly, there is the existing windrose library, but it lacks bivariate polar plots.

Differences from openair

Users should be aware that the implementation of smoothed bivariate polar plots in this library differs from openair. openair uses the mgcv R package to fit a thin-plate spline GAM to smooth their bivariate polar plots. In their implementation, they bin input data by wind direction and speed, and then fit the GAM to this binned data. In bivapp there is currently only one method that fits a GAM, BivariatePlotRawGAM. This method differs from openair's in a couple ways: first, the GAM is fit to the raw measurements rather than binned measurements; second, due to differences in GAM libraries (and their documentation), we are not exactly replicating the thin-plate spline approach. Instead, bivapp fits a GAM to a tensor product of the $u$ and $v$ components of the input wind data. Thus, the GAM-smoothed bivariate polar plot in bivapp is not a perfect replication of openair's smoothed plots, but does appear to achieve the same goal of producing a reasonably smoothed plot.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bivapp-0.0.1.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bivapp-0.0.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file bivapp-0.0.1.tar.gz.

File metadata

  • Download URL: bivapp-0.0.1.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bivapp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2d8735fabb6da3c6be78f0fa897c48ffafacceb5294f69a210ce8e92e2578991
MD5 1487a3a8a43856e1034e9b80e092a4b9
BLAKE2b-256 78e682b3954cfd768d8d4367b4b0e05a8f64a9099ff3440d3e6c7ad36b4a8878

See more details on using hashes here.

Provenance

The following attestation bundles were made for bivapp-0.0.1.tar.gz:

Publisher: publish-to-pypi.yml on Zelpuz/bivapp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bivapp-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: bivapp-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bivapp-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8471e4f0e16fd922059d54b855300963f6deda9ba3ed63ca674d173b83c2dfa2
MD5 812ed6ac0afafffc197e57c37d61b263
BLAKE2b-256 9ad1e40c09148a3c7b70017649dd1a44b7f9458c79b87a259815119dc9da6147

See more details on using hashes here.

Provenance

The following attestation bundles were made for bivapp-0.0.1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on Zelpuz/bivapp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page