Question: I have an SQL database I am using within a Jupyter notebook. The database is called crimes and has these fields: Index([ 'id' , 'caseno'

I have an SQL database I am using within a Jupyter notebook. The database is called "crimes" and has these fields:

Index(['id', 'caseno', 'date_of_occurrence', 'block', 'iucr', 'primary_type', 'description', 'location_description', 'arrest', 'domestic', 'beat', 'district', 'ward', 'community_area', 'fbi_cd', 'xcoordinate', 'ycoordinate', 'year', 'updated_on', 'latitude', 'longitude', 'location', 'where_is'], dtype='object') 

I am looking to execute a query that will create a table where, for each district, I select all blocks that have the highest number of gun crimes within that district

  • Locate theBlockthat has thehighest number of gun crimes. The popup on Choropleth map shall display the Block in every district along with the total number of gun crimes for that block

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!