Mapping All the Things with Python

Awesome Python geo packages

--

Last week I attended the GeoPython conference in Basel, Switzerland, where a group of enthusiastic people shared their work on geodata and Python.

Geodata as points, polygons or a regular grid. I skipped the hexagons.

Points, polygons and grids…

Geodata is information about geographic locations that is stored in a format that can be used with a geographic information system (GIS). Geodata can be stored in a database, geodatabase, shapefile, coverage, raster image, or even a dbf table or Microsoft Excel spreadsheet. — Esri

Depending on your data you can choose to represent it with points, lines, polygons or a regular grid.

… and hexagons

But a few talks showed hexagon maps as well. Jez Nicholson showed a hexagon election maps of cities in the UK and a running app where the goal is to protect and extend your empire by running around in all your hexagons. As with a square grid the size of the cells is not the same everywhere. Because of the curvature of the earth, Finns will have to run a lot more than someone closer to the equator to control their empire. Clinton Dow presented a solution to this. He showed how this can be solved with a standard grid consisting of hexagons where the size of each hexagon is always the same.

3D mapping

3D maps were also discussed. Martin Christen presented the pyRT package that renders 3D images adding shade and reflections. This looks like a great package to start learning more about 3D rendering. Stefan Blaser brought a mobile mapping backpack and showed how he created a 3D map of the conference centre by walking around through it with the backpack.

Jupyter notebooks

Most (if not all) packages will work in Jupyter notebooks, which is a great environment for exploring, because code, charts, maps and comments are all nicely kept together in one notebook that you can view in any web browser. You can install notebooks locally or try out the IBM Data Science Experience, which I used for the live demos in my talk. I showed how to create maps with only one display() command from the PixieDust package.

Another great new package for geodata is the Python ArcGIS API that was presented by Rohit Singh and Matthias Schenker. With this package you can not only display geodata, but also do extensive geodata analysis as it is a GIS inside a notebook.

A few more Python packages

All presented packages have in common that they will make it simpler to work with geodata. This could be either loading, processing, analysing or displaying the data.

Brendan Collins presented five projects that everyone should know about:

  • Conda: a package manager
  • Dask: a parallel computing library
  • PyToolz: a set of utility functions for iterators, functions, and dictionaries
  • Numba: a compiler for Python code
  • Xarray to work with multi-dimensional data in a pandas-like way

Reuben Cummings presented Meza, an alternative to pandas written in pure Python that can process more than 10 different file types.

It was amazing to see that all the projects are open-source. I am sure I have forgotten some projects and might not even be aware of the existence of others. Please add them in the comments and I will compile a more complete list of geodata python packages.

If you enjoyed this article, please ♡ it to recommend it to other Medium readers.

--

--