Data visualization for San Francisco Crime classification problem


#1

I am trying to plot a geographical map using basemap for a problem on kaggle using python, I am trying to plot it using the following code :
m=Basemap(projection='mill',llcrnrlat=-90,urcrnrlat=90,llcrnrlon=-180,urcrnrlon=180,resolution='c') m.drawcoastlines() m.drawmapboundary() m.fillcontinents() m.drawcountries() m.drawstates() x,y=m(list(train.X),list(train.Y)) m.plot(x,y,'r.',markersize=2,alpha=.5) plt.show()
I want to plot the location of different crimes with different colors. Please help me to modify the above code or any other alternative.


#2

Hi @syed.danish, if you plot everything on the same map, it would be difficult to understand. Instead, you could make multiple maps for different crimes. See this script (written in python)