Creating a Shapefile from point data stored in Microsoft Excel

Excel files are so common these days that often an analyst or developer receives an Excel file that needs to be mapped out. Sure, we could save these to a .csv file and then use the great Python standard csv module but this involves an extra manual step. We will take a look at how to read a very simple Excel file that contains a list of Europe's highest mountains. This data set is derived from http://www.geonames.org.

Getting ready

We are going to need one new Python library to read a Microsoft Excel file and this library is xlrd (http://www.python-excel.org).

Note

This library can only READ an Excel file; if you are looking to write out to an Excel file, download and install xlwt.

First, ...

Get Python Geospatial Analysis Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.