Los Angeles Crime Exploratory Analysis (2020 - 2023)

Los Angeles is a central and populous city of California, USA. In this notebook, I analyze the crime data from Jan 2020 to March 2023 released by the police department of the city (LAPD). The dataset and its explanation can be found on https://data.lacity.org/Public-Safety/Crime-Data-from-2020-to-Present/2nrs-mtv8.

Quote from the website, last update March 01 2023:

This dataset reflects incidents of crime in the City of Los Angeles dating back to 2020. This data is transcribed from original crime reports that are typed on paper and therefore there may be some inaccuracies within the data. Some location fields with missing data are noted as (0°, 0°). Address fields are only provided to the nearest hundred block in order to maintain privacy. This data is as accurate as the data in the database.

Crime Data Analysis

Insights from this analysis can point out the most prevalent problems and the most vulnerable groups needing protection.

Here is the outline of my analysis:

  1. The Dataset: Load, clean, and convert to appropriate formats.
  2. Exploratory Data Analysis: Visualize and infer meaningful insights from the data by answering the following topics.
  • Most problematic crimes: What are the main crimes?
  • Temporal trends in criminal activities: When do crime occur?
  • Crime Location: Where do crimes happen?
  • Victim's Characteristics: Who are the most vulnerable victims?
  1. Conclusion & Future Ideas: Summarize the findings and suggest follow-up work.
  2. Reference

Before analyzing, I install some libraries (besides the default ones) used in this notebook.

# !pip install  --upgrade --quiet
!pip install opendatasets folium plotly wordcloud --upgrade --quiet
# !pip install  --upgrade --quiet
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.3/15.3 MB 53.0 MB/s eta 0:00:00

The Dataset