Reading and writing vector data with GeoPandas
It's time for some hands-on exercises. We'll start with reading and writing some vector data in the form of GeoJSON using the GeoPandas library, which is the application used to demonstrate all examples is Jupyter Notebook, which comes preinstalled with Anaconda3. If you've installed all geospatial Python libraries from Chapter 2, Introduction to Geospatial Code Libraries, you're good to go. If not, do this first. You might decide to create virtual environments for different combinations of Python libraries because of different dependencies and versioning. Open up a new Jupyter Notebook and a browser window and head over to http://www.naturalearthdata.com/downloads/ and download the Natural Earth quick start kit at a convenient location. We'll examine some of that data for the rest of this chapter, along with some other geographical data files.
First, type the following code in a Jupyter Notebook with access to the GeoPandas library and run the...