This is a group project that included a creation of a workflow in GitHub to collaborate on an observetional study of crime in the city of Chicago, Illinois. The purpose of the analysis and the main reaseach question was "how did COVID-19 impact crime in Chicago?" To conclude on this question, the following sub-questions were analysed:
- Did covid impact the distribution of crime in Chicago?
- Did covid impacted the crime types?
- Has covid had an impact during holiday seasons?
- Has it impacted the number of domestic crime?
- Did covid impact how prolific each type of crime is?
- Finding idea for research.
- Data Collection - APIs and CSVs.
- Data preperation, cleaning, and manipulation.
- GitHub workflow creation (workflow planning and implementation -> Methods? How to collaborate? What files should/n't be included etc.., creation of feature branches, merging the feature branches to the main branch).
- Gathering resources & maps for the research.
- Data Analysis.
- Presenting the key findings and conclusions.
Libraries:
- Pandas
- Os
- ZipFile
- holidays
- Matplotlib
- NumPy
- Seaborn
- requests
- json
- pathlib
- hvplot
- sys
- warnings
APIs:
- Geoapify
- Chicago Data Portal
- In some Police Districts crime has fallen post-covid, including districts 1, 6, 11 and 18. Whereas in others it has risen, including districts 2, 4, and 12. Thus we can conclude that the distribution of crime within Chicago has changed.
- Comparing the crime rates in Jan - June 2019 and 2023 with the locations of the police buildings, there is no visible reduction of crime rates in areas where there is a higher concentration of Police buildings (such as the CBD), and also no visible increase of crime rates in areas where there are no Police Buildings (such as South Chicago).
- While we can say with confidence that crime has been redistributed across the Police Districts of Chicago when comparing 2019 to 2023, we cannot assume any correlation between the COVID-19 pandemic and this redistribution of crime rates. We also cannot conclude that the location of Police buildings has affect where crime was redistributed to.
- Inclusive offences that didn’t end up with an arrest:
- In general, the COVID-19 period distributed more crime during the “holiday season” than before and post-COVID-19 holiday seasons.
- During COVID-19, Independence Day had the most significant amount of offences; This may as a direct result the George Floyd’s death and the protesting of “black lives matter”.
- It may also explain the crime increase during post COVID period over the Juneteenth holiday and the increase in crime on Memorial Day over the post-COVID-19 period.
- Christmas had the least offences before COVID-19 and the most significant decrease in crime incidents in all periods. The reason may be that December in Chicago is very cold and is often below freezing.
- In general, the COVID-19 period distributed more crime during the “holiday season” than before and post-COVID-19 holiday seasons.
- Offences that did end up with an arrest:
- The amount of crime incidents with arrests for during COVID-19 period and Prior to COVID-19 period almost doubled relative to the amount of crime incidents post COVID-19 period.
- Post-COVID-19, Veterans Day holiday had the least amount of crime incidents that ended with an arrest relative to before and during the COVID-19 period.
- New Year’s Day, Prior COVID-19 period, had the highest amount of crime incidents with an arrests
- Both NYT and Chicago Suntimes reported on large amount of protests of “black life’s matter” after George’s Floyd and Anthony’s Alvarez got shot by a police officer which may explain the amount highest amount of crime incidents in a “STREETs”.
- There were more crime incidents in RESIDENCE and APARTMENTs during and post-COVID-19 relative to the prior period. It may be a direct result of the ramifications of the restrictions and the new reality to be adjusted.
- The top 3 community areas that generated crime before, during and after COVID-19 were: Austin, South Shore, and Near North Side.
- According to the following articles from Chicago Business{watch visual}, Chicago Mag, and Property Club Austin and South Shore are at the top 10 of crime distribution relative to other community areas.
- The general trend of crime types over the years of holiday seasons prior to, during, and post-COVID-19 shows that:
- The amount of incidents has decreased between 2022-2023 (it might be because the year 2023 is yet to be concluded)
- In most crime types, there was a steep increase in crime incidents between 2020-2021.
- If there wasn't a steep increase, it is likely because these crime types rely on outdoor elements, which lockdown restricted.
- Stay at home and social distancing provisions, which were imposed by the state government on 21 March 2020 led to a higher percentage of domestic related offences during the Covid period, in comparison to the pre and post Covid periods Source
- Most domestic offences occur at a residence or apartment location i.e. private dwellings, and less so in public areas such as streets and sidewalks
- The rate of domestic offences for residence locations has decreased from pre-Covid to post-Covid, while an opposite trend can be observed for apartment locations. This can be attributable to Covid's detrimental impact to housing affordability in Chicago driven by job losses. Source Increasing trend in domestic offences in apartments from pre to post Covid may be linked to victims feeling more comfortable to seek help after the easing of government imposed restrictions following the pandemic, and due to build up of tensions in domestic relationships during the Covid period Source
- For narcotic related offences there was a higher percentage of narcotic crimes for the pre-Covid period, in comparison to the during and post-Covid period. This can be linked to the legalisation of cannabis in Illinois, where commencing January 1, 2020 and during the pre-Covid era, adults over the age of 21 became legally able to possess, consume and purchase cannabis. Source
- There was a spike in motor vehicle theft for the post-Covid period. This can be attributable to the virus' impact on the supply of new cars in the motor vehicle industry due to the Covid lockdowns which caused consumer demand for new cars to surpass supply and hence creating a shortage in the supply of new cars and a spike in prices. This has also had a flow on effect on the second hand market for cars, where the supply of used vehicles cannot keep up with the demand, causing prices to increase even during the post-Covid period. As such higher car prices has made both new and second-hand cars less affordable, leading to an increase in motor vehicle theft for the post-Covid period Source Source
- Other than for narcotic and motor vehicle theft offences, Covid has not had a significant impact on how prolific a type of crime is in Chicago
.
│ ├── Data source zips # This folder contain ths source datasets
│ │ ├── Datasets_1.zip
│ │ ├── Datasets_2.zip
│ ├── Resources # This folder the map boundaries of Wards, Police destricts, and community areas
│ │ ├── Chicago_Community_Areas.svg
│ │ ├── Citywide Ward Map 2022.pdf
│ │ ├── Police_Districts.pdf
│ ├── holiday_seasons # This folder include the analysis of Question 3 and the charts images
│ | ├── Images
│ | | ├── offences_and_arrests.png
│ | | ├── offences_primary_type.png
│ | | ├── Top5_locations.png
│ | | ├── top10_community_area.png
│ | | ├── crime_t_holiday_seasons.png
│ ├── Geography_Analysis # This folder include the analysis of Question 1 & 2 and the charts images
│ | ├── .ipynb_checkpoints
│ | | ├── geography_analysis_1-checkpoint.ipynb
│ | ├── Output Graphs
│ | | ├── 6-Month Period, Destrict 1.png
│ | | ├── 6-Month Period, Destrict 11.png
│ | | ├── 6-Month Period, Destrict 12.png
│ | | ├── 6-Month Period, Destrict 22.png
│ | | ├── 6-Month Period, Destrict 4.png
│ | | ├── 6-Month Period, Destrict 6.png
│ | | ├── 6-Month Period, Destrict 7.png
│ | | ├── Crime Rate, Jan - June 2019.png
│ | | ├── Crime Rate, Jan - June 2023.png
│ | ├── geography_analysis_1.ipynb
│ ├── Domestic_Prolific_Crimes # This folder contain the analysis for Question 4 & 5 as well as the charts images
│ | ├── Domestic_Prolific_Crimes.ipynb
│ | ├── Images
│ | | ├── Changes_in_Crime_Types.png
│ | | ├── Changes_in_Domestic.png
│ | | ├── Domestic_Offence_Locations.png
│ ├── filtered_1.zip # These are the two zip files to extract & append the clean dataset.
│ ├── filtered_2.zip
│ ├── .gitignore
|___README.md