You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.
In #10 I discussed making scatter plots and one of the downsides is the extreme overplotting if entire datasets are used. ggpointdensity provides an alternative that is between a scatter plot and a density plot. However, the current methods it uses for calculating bandwidth and the density kernel fail with large zero-inflated datasets.
I've figured out working alternative methods for both of these, using bw.nrd0() for bandwidth estimation instead of bw.nrd() and using KernSmooth::bkde2D() for density kernel estimation instead of MASS::kde2d(). I understand ggpointdensity well enough to make a PR to introduce this method, I think, but the package author has been unresponsive to similar PRs (LKremer/ggpointdensity#23) introducing improved methods. I'd probably end up having to install from my fork or just replicate much of what ggpointdensity does in a script (i.e. rather than creating a new geom_, just do the calculations and plot data with geom_point(aes(color = density))).
It's too bad this is so tough because this is a perfect application for a point density plot.
The text was updated successfully, but these errors were encountered:
Hi @Aariq , I was pretty busy in the past few months, but now I have some time to revisit ggpointdensity. I'd be happy to merge a pull request that implements your proposed density estimation method. Ideally this would be an option to the geom_pointdensity function, used via e.g. geom_pointdensity(method='bkde2D') (or whatever you want to call it). If this method turns out to be superior to the current default method, I will think about making it the default in future version.
In #10 I discussed making scatter plots and one of the downsides is the extreme overplotting if entire datasets are used.
ggpointdensity
provides an alternative that is between a scatter plot and a density plot. However, the current methods it uses for calculating bandwidth and the density kernel fail with large zero-inflated datasets.I've figured out working alternative methods for both of these, using
bw.nrd0()
for bandwidth estimation instead ofbw.nrd()
and usingKernSmooth::bkde2D()
for density kernel estimation instead ofMASS::kde2d()
. I understandggpointdensity
well enough to make a PR to introduce this method, I think, but the package author has been unresponsive to similar PRs (LKremer/ggpointdensity#23) introducing improved methods. I'd probably end up having to install from my fork or just replicate much of whatggpointdensity
does in a script (i.e. rather than creating a newgeom_
, just do the calculations and plot data with geom_point(aes(color = density))).It's too bad this is so tough because this is a perfect application for a point density plot.
The text was updated successfully, but these errors were encountered: