Skip to content

Commit 656d7ed

Browse files
authored
Update README.md
1 parent fe3fef3 commit 656d7ed

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,9 @@ fig.set_figheight(4.5)
4343
The [`openair`](https://github.com/openair-project/openair/tree/master) 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](https://stackoverflow.com/questions/61940629/bivariate-polar-plots-in-python), [here](https://stackoverflow.com/questions/61702585/pollution-rose-plot-gridded), [here](https://stackoverflow.com/questions/9071084/how-to-create-a-polar-contour-plot), and [here](https://blog.rtwilson.com/producing-polar-contour-plots-with-matplotlib/). Lastly, there is the existing [`windrose`](https://github.com/python-windrose/windrose) library, but it lacks bivariate polar plots.
4444

4545
## Differences from `openair`
46-
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.
46+
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, split this data into wind vector components, and then fit the GAM to this binned-then-split data. In `bivapp` there is currently only one method that fits a GAM, `BivariatePlotGAM`. This method differs from `openair`'s in a few ways:
47+
1. The GAM can be fit to either raw measurements or binned data;
48+
2. If fitting to binned data, the binning is applied after splitting the wind data into vector components rather than before. In other words, where `openair` bins then splits, we split then bin.
49+
3. Due to differences in GAM libraries (and their documentation), this package does not exactly replicate the thin-plate spline approach. Instead, `bivapp` uses the [`pygam`](https://github.com/dswah/pyGAM) package to fit 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.
50+
51+
Even with these differences, both packages can produce similar-looking plots that should permit comparable qualitative analyses. In both this package and `openair`, fitting a GAM serves to smooth the data, allowing for identification of potential emissions sources from noisy data.

0 commit comments

Comments
 (0)