# Essential Python Geospatial Libraries ## Geospatial Data * [geopandas][] - Working with spatial data is fun again! * [shapely][] - For geometry handling * [rtree][] - For efficiently querying spatial data * [geographiclib][] - For solving geodesic problems * [pyshp][] - For reading and writing shapefiles (in _pure_ Python) * [pyproj][] - For conversions between projections * [rasterio][] - A Pythonic way to work with geospatial rasters * [fiona][] - For making it _easy_ to read/write geospatial data formats * [ogr/gdal][] - For reading, writing, and transforming geospatial data formats * [pyqgis][] - For anything and everything GIS * [geopy][] - For geolocating and things like that * [geojsonio.py][] - For shooting data to the web * [geog][] - For a numpy interface to solve geodesic problems * [h5py][] - Your pythonic gateway to hdf5 files * [pyModis][] - Download and preprocess MODIS data * [pyspatial](https://github.com/granularag/pyspatial) - projection aware querying of vector/raster data ## Data Analysis * [scipy][] - General scientific computing library. Has a spatial module. * [scikit-image][] - Algorithms for (satellite) image processing * [scikit-learn][] - Machine learning for python * [statsmodels][] - For models and stats in Python * [pysal][] - Spatial econometrics, exploratory spatial and spatio-temporal data analysis, spatial clustering (and more) * [networkx][] - For working with networks (duh!) * [rasterstats][] - For analyzing rasters based on vector geometries (zonal statistics) ## Plotting/Mapping * [matplotlib][] - For all my plotting needs * [cartopy][] - For plotting spatial data on projections and more * [folium][] - Python Data. Leaflet.js Maps. * [nodebox-opengl][] - For playing around with animations * [descartes][] - For plotting geometries in matplotlib * [basemap][] - For plotting geospatial data on projections * [mplleaflet][] - For creating web-maps ## General Python * [pandas][] - For data handling and munging * [numpy][] - For pretty much anything that involves arrays * [ipython][] - For a wondering interactive environment in which to play ## Other * [pelican][] - For blogging about all this stuff... [mplleaflet]: https://github.com/jwass/mplleaflet [geojsonio.py]: https://github.com/jwass/geojsonio.py [basemap]: https://github.com/matplotlib/basemap [rasterio]: https://github.com/mapbox/rasterio [pandas]: http://pandas.pydata.org/ [geopandas]: https://github.com/kjordahl/geopandas [shapely]: https://pypi.python.org/pypi/Shapely [cartopy]: http://scitools.org.uk/cartopy/ [rtree]: http://toblerity.github.io/rtree/ [nodebox-opengl]: http://www.cityinabottle.org/nodebox/ [statsmodels]: http://statsmodels.sourceforge.net/ [numpy]: http://www.numpy.org/ [geopy]: https://code.google.com/p/geopy/ [ipython]: http://ipython.org/ [freetype-py]: https://code.google.com/p/freetype-py/ [ogr/gdal]: https://pypi.python.org/pypi/GDAL/ [matplotlib]: http://matplotlib.org/ [fiona]: http://toblerity.github.io/fiona/ [folium]: https://github.com/python-visualization/folium [networkx]: http://networkx.github.io/ [pelican]: http://docs.getpelican.com/en/3.2/ [pyqgis]: http://www.qgis.org/pyqgis-cookbook/ [pysal]: http://pysal.org [geographiclib]: http://geographiclib.sourceforge.net/ [pyproj]: https://code.google.com/p/pyproj/ [pyshp]: https://code.google.com/p/pyshp/ [descartes]: https://pypi.python.org/pypi/descartes [rasterstats]: https://github.com/perrygeo/python-raster-stats [geog]: https://github.com/jwass/geog [scipy]: https://github.com/scipy/scipy [scikit-image]: http://scikit-image.org/ [scikit-learn]: https://github.com/scikit-learn/scikit-learn [h5py]: https://github.com/h5py/h5py [pyModis]: https://pypi.python.org/pypi/pyModis