From the course: Geospatial Data Analytics Essential Training
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Visualizing sample data with GeoPandas - Python Tutorial
From the course: Geospatial Data Analytics Essential Training
Visualizing sample data with GeoPandas
- [Instructor] After learning the basics of visualizing GeoDataFrames using synthetic data, now it is time to switch to a more elaborate real-word example. For that, we revisit the built-in example dataset about the boroughs of New York City we saw earlier in chapter two. First, let's import the GeoPandas library and read the sample dataset. We'll store this data file in the GeoDataFrame called gdf. After displaying the gdf GeoDataFrame on the code cell output, we can confirm that it indeed contains information about five different boroughs from New York City. Next, we import the Pyplot module of the Matplotlib library and create an empty figure first with a predefined size of our liking. To complete the first visual, we use the built-in Plotly command again, specifying the axis we just defined. As for the column to be plotted, let's select the borough name column, which will color every borough differently. To specify the color palette we would like to use, set a value for the cmap…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.