-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
geoplot.kdeplot --> overlapping isolines #266
Comments
Can you provide a copy of the dataset, a copy of the code, and the output of |
Hello! thanks for looking into the issue-- here |
Sorry ^ above comments got cut off. please find the files attached, and thanks for looking into the issue! |
The sample data you provided is in some unknown non-CSV format: Can you reupload in CSV format please? Also, can you provide the code please? In order to look into this, I need a minimum reproducible example. |
geoplot_sample.zip thanks again for looking into this! |
Alright, I was able to repro. The underlying issue is an interesting one. Latitudes and longitudes are on a continuous Because your data straddles the longitudinal boundary (the international date line), the KDE algorithm is generating kernel density boundaries that (1) don't connect at the boundary and (2) extend past the maximum extent of the coordinate system, e.g. past 180 degrees and -180 degrees. If you remove the projection, this becomes obvious: You are using a projection, and so So that explains what's going wrong, now how to solve it? I'm not sure actually. Fixing this boundary issue would require writing a custom kernel density estimator kernel, which Now that I think about it, I think all of the other analytical plot types (specifically |
Thanks for the thorough investigation and clear explanation of the issue. |
Not sure, but maybe. |
Using the kdeplot, with only one dataset, it appears that isolines are overlapping instead of merging, producing two local maxima instead of a consistent isoline around all features.
The text was updated successfully, but these errors were encountered: