Since this data is based on ZIP codes, the best way to visualize it is with a choropleth. If you're unfamiliar with a choropleth, it's simply a visualization that represents the data according to a color spectrum. Let's create one now using a Python mapping library called folium at https://github.com/python-visualization/folium. If you don't have folium installed, again, it can be done with pip install on the command line.
Now we'll go ahead and create our visualization:
import folium m = folium.Map(location=[40.748817, -73.985428], zoom_start=13) m.choropleth( geo_data=open('nyc.json').read(), data=zdf_mean, columns=['zip', 'avg_rent'], key_on='feature.properties.postalCode', fill_color='YlOrRd', fill_opacity=0.7, line_opacity=0.2, ) m
There...