Quick Data Visualization

Learn how to visualize data loaded in a GeoDataFrame.

Tabular attributes

To visualize the data loaded in a GeoDataFrame, we can use the same plot() command available in pandas. This makes it straightforward to create different types of charts such as lines, bars, histograms, etc. All of these chart types are available in GeoPandas as well.

For example, let’s take the Countries of the World dataset and plot the population of each country as a bar chart. We can use the kind argument from the plot() function to specify the type of plot we want to create.

Since pandas uses the Matplotlib library as a backend, the plot() function returns a matplotlib.Axes object and can accept virtually any Matplotlib argument, such as figsize, which specifies the width and height of the graph, as shown in the example code below:

Get hands-on with 1200+ tech skills courses.