1. Learn
  2. /
  3. Courses
  4. /
  5. Visualizing Geospatial Data in Python

Connected

Exercise

Map Nashville neighborhoods

This time you'll read a GeoJSON file in to a GeoDataFrame to take a quick peek at where Nashville neighborhoods are.

Instructions

100 XP
  • Import geopandas and matplotlib.pyplot using the customary aliases.
  • Read in the neighborhoods GeoJSON file to a GeoDataFrame called neighborhoods and print the first few rows with .head(). The path to this file is stored in a variable called neighborhoods_path.
  • Plot neighborhoods coloring the polygons by the name column of the GeoDataFrame and using the Dark2 color map. This time, don't include a legend.
  • Show the plot.