1

Sorry if I sound like I don't understand, but I've been reading around trying to figure out how to do geospatial plotting in Python. I keep running into errors despite the examples I've seen appearing rather within reach.

Currently I have some San Francisco data, where each row is an observation that also contains long/lat data. I would like to do a heatmap of the frequency of the observations. I've come across people using various packages, and I believe some things that are required are shapefiles.

However, for some reason I can't seem to decipher the precise order from which I do things. Does it work like so:

  1. Find a shapefile for San Francisco (with neighborhood polygons)
  2. Plot the shapefile
  3. Overlay a heatmap of the long/lat data

Is this correct? I'm looking for some guidance for a simple way where I can do this using Python 3.x. I've tried packages like Fiona, basemap, GeoPandas, etc., but I'm getting frustrated by not being able to find a simple solution that works in my notebook.

closed as off-topic by ahmadhanb, PolyGeo Nov 28 '18 at 1:00

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – ahmadhanb, PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    You can plot using geopandas and matplotlib. Post your code attempt and you will get help. – BERA Nov 28 '18 at 6:01