Skip to content

Instantly share code, notes, and snippets.

@BastinRobin
Created May 5, 2021 08:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BastinRobin/2ce642fa06bc9dae7dc76da69037a7c7 to your computer and use it in GitHub Desktop.
Save BastinRobin/2ce642fa06bc9dae7dc76da69037a7c7 to your computer and use it in GitHub Desktop.
Implementation Of K-Mean To Analyse Crime in US

# K-Means Clustering - U.S. Crime Data

We'll use k-means to discover clusters in a data set using unsupervised learning. The original data can be found here
https://ufile.io/39bbkph1

From the Unified Crime Reporting Statistics and under the collaboration of the U.S. Department of Justice and the Federal Bureau of Investigation information crime statistics are available for public review. The following data set has information on the crime rates and totals for states across the United States for a wide range of years. The crime reports are divided into two main categories: property and violent crime. Property crime refers to burglary, larceny, and motor related crime while violent crime refers to assault, murder, rape, and robbery. These reports go from 1960 to 2012.

The analysis consists of the following steps.

  • I. Importing necessary libraries and downloading the data
  • II. Viewing the data statewise from different angles
  • III. Finding out the optimal number of clusters for the data
  • IV. Presenting findings and drawing conclusions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment