Suggestion on algorithm to visualize the safeness of an area I am actually developing an app that notify users about "Safety Index" of the surrounding in a range of 1 Kilometer radius. I have did some research on how to calculating crime index which uses the algorithm below.
(Number of Crimes / Population) x 100,000 = Crime Rate Per 100,000
But i felt that it is not suitable for my app use case so I decided to come out with a more proper idea/algorithm.
My initial idea is to categorize the safeness of the surrounding by number of crime. For example.
- 0 ~ 30 - Safe
 - 31 ~ 80  - Moderate
 - 81 and above - Not safe 
*The range of each category is just an assumption.  
My question is are they any possible statistical algorithm to apply for the use case? I have very little background in statistics and I am not sure whether am I on the right direction. 
 A: There are many approaches you could take if you want to assign labels to different levels of crime rate. What you are probably looking for is some sort of clustering algorithm. The exact approach you choose will depend on the nature of your data. Clustering is an exploratory method, so there is no real "correct" solution. You have to use common sense when choosing which solution best suits your needs.
Lets take some real crime data in England from the Office of National Statistics (you can find it here: https://www.justiceinspectorates.gov.uk/hmic/crime-and-policing-comparator/). The plot of the crime rates can be seen below:

If you want to divide these into say 4 categories, the first thing we could do is take the quartiles and arrive at the following categorization (green represents very safe, blue safe, orange unsafe, red very unsafe):

We could leave it at that. However, the categories probably don't capture the differences in safety that you would want to describe. The problem is that there are unequal numbers of counties that are similar with respect to the number of crimes. So you want to see what "groups" (clusters) are formed based on this criterion. To do this let's try a clustering approach (ward hierarchical clustering). We choose four clusters and get the following cluster solution.

Visually it makes a lot more sense. You can also have more variables on the base of which you categorize your crime ratings. I would recommend that you read a bit about the various clustering methods (hierarchical and $k$-means are probably the most common) and choose one that best suits your data and your needs. There are many other clustering algorithms and it is a active field of study, but usually those two were sufficient for my purposes.
