4 ms·
Getting started with maps in Python
- jofer 11y agoNice walkthrough! However, I'm surprised they're using basemap for this. Basemap is still maintained, but it's more or less been superseded by Cartopy. (Also, Cartopy should support the Winkle Tripel projection, as Proj4 supports it.) Edit: Scratch the Winkel Tripel projection support. Proj4 doesn't define an inverse method for that projection (it's non-trivial), so it can't be used correctly by cartopy.
- makmanalp 11y agoI myself prefer Kartograph, which exports SVGs and I think yields very pretty maps: http://kartograph.org/ http://kartograph.org/
- jofer 11y agoKartograph is quite nice. I need to play around with it more. However, it's aimed at a very different audience (web-based interactive rendering of vector graphics, as opposed to desktop-based interactive rendering of scientific data). For example, as far as I know (I could be very wrong about this), there's no way to display image/raster data in kartograph. That having been said, kartograph is a very slick library, and its built-in clustering methods for point data are particularly nice.
- urschrei 11y agoI'm the author of http://sensitivecities.com/so-youd-like-to-make-a-map-using-python-EN.html http://sensitivecities.com/so-youd-like-to-make-a-map-using-... and make maps using Python all the time. I'd love to switch to Cartopy, but its documentation isn't comprehensive or well-presented. I check back every six months or so, and then forget about it again.
- maxberggren 11y agoThis one really helped me back when I needed choropleth maps. So thanks!
- julienchastang 11y agoI've been working in this area and I do generally prefer Cartopy over Basemap. Our team recently made this switch. Cartopy is more Pythonic and has a better software design. It has nice abstraction for dealing with and using different map projections. It also handles seam issues well (I cannot recall if this is a problem in Basemap or not). All that said, Basemap has features that are lacking in Cartopy (e.g., can you label lat/lon lines on non-XY projections in Cartopy? The last time I looked, this was not possible.) Also I agree that Cartopy documentation is somewhat lacking in some areas. But going forward I would probably choose Cartopy, notwithstanding Jeff's great work over the years.
- maxberggren 11y agoOP here. Cartopy is actually news to me! Thanks for the info! HN at its finest.
- tmarthal 11y ago#Edit - sorry didn't see the link in the original article. I was asking about notebooks, and you linked one already.
- darkblueb 11y agonice - here is a cartopy version .. https://gist.github.com/darkblue-b/6d9aab096ffe9bce3a52 https://gist.github.com/darkblue-b/6d9aab096ffe9bce3a52 (that dataset and more examples are freely available from OSGeo) http://live.osgeo.org http://live.osgeo.org
- aviflax 11y agoDoes the author even know Python? Because in Python maps are called dicts!
- anc84 11y agoFYI the submitted article is about cartographic maps.
- deleted 11y ago[deleted]
- ryangittins 11y agoI think (hope) it was a joke.
- sapski 11y agoI use https://github.com/andrea-cuttone/geoplotlib https://github.com/andrea-cuttone/geoplotlib in my work and highly recommend checking it out. The lib uses openstreetmaps as background, can display scatters, heatmaps, shapefiles, calculate and display voronoi tesselation, and does a ton of other things.