From the course: Geospatial Data Analytics Essential Training

The basics of GeoPandas

- The second chapter of this course is dedicated for developing your core vocabulary in Python-based geospatial analytics. We are going to learn about the two most essential libraries GeoPandas and Shapely, and learn how to turn geographical information into actual data points, programmable and usable in any Python-based data pipeline. This chapter is essential for you to connect the geospatial component to data science. In this section, we'll gain insights into one of the most widely used geospatial libraries in Python, GeoPandas. GeoPandas is an open source Python library that makes working with geospatial data in Python easier. It builds on the popular data analytics library Pandas. In fact, GeoPandas extends the data types and possible data operations of Pandas to allow spatial operations. Additionally, GeoPandas has the capability to integrate geometry types providing a high level interface for geospatial data analysis. To illustrate Pandas, first, let's revisit a sample data table from Video 0101 which contains several geospatial data records. For instance, temperature, traffic, and local time. In this current format, the table can be stored in Pandas where all columns have numeric and textual data. Once we extend this table by a geometric column containing the exact details of every location in geometry format, we'll arrive at a data structure natural to GeoPandas. This data structure has numeric, textual, and geometric features as well. GeoPandas has several key features worth overviewing. First, GeoPandas has two natural spatial data structures. The first one is called GeoSeries, which is an extended version of Panda series for geometric data. In the previous example, the geometric column was a good example for a GeoSeries. The other data structure used in GeoPandas is called GeoDataFrame. A GeoDataFrame is an extended version of a Pandas data frame extended by a GeoSeries column. It is value illustrated by the previous table, including the geometric, numeric, and any other data columns. GeoPandas does also supports a wide range of spatial operations, such as intersections and distance computation. In the later videos, we will explore these in more detail. Finally, GeoPandas does also supports reading and writing various geospatial file formats such as Shape Files and GeoJSONs. To conclude this video, we learned about GeoPandas an open source Python library designed for spatial analysis. It builds on the popular data analytics library Pandas by essentially extending it through various geometric functionalities.

Contents