70 points · by geomatics99 · 7y ago · 23 comments
Hexbin example: https://seaborn.pydata.org/examples/hexbin_marginals.html
KDE example: https://seaborn.pydata.org/examples/joint_kde.html
If you are doing any exploratory analysis using scatterplots, I highly recommend that you also generate hexbin plot or heatmap. Far too often it turns out all of the points are concentrated in a small area of the plot, but that's not always apparent on a scatterplot.
[1] https://seaborn.pydata.org/generated/seaborn.jointplot.html
x_grid=np.arange(x_min-h,x_max+h,grid_size)
y_grid=np.arange(y_min-h,y_max+h,grid_size)
where h is a small constant, and the range ends are the min/max of the data. In general, this will result in rectangular pixels, which you probably don't want.In your example, even for a small geographic area, a degree of longitude will typically translate to a smaller distance than a degree of latitude, so as you say you can't treat them the same.
https://github.com/rraks/sigcatch
Open to contributions.
There is no good entrypoint into the documentation, it just starts to tell me about projection details. The documentation outline is a list of the code functions with no clear point to start or indication which places might be good to start at.
I also can't find any examples for quick demonstration and trying. (edit: I found them after clicking all the links. Well... it's in the middle of a list of details I'm not interesting in and says 'Using cartopy with matplotlib'. Oh, at the bottom there is a link with more examples which I could find neither in the index nor in the outline... urgh.)
basemap's website also has a lot of problems, but it is a lot easier to use and we are lazy.