Skip to content

Commit

Permalink
Cleaned Files & added sample data
Browse files Browse the repository at this point in the history
  • Loading branch information
gamingflexer committed Jun 30, 2022
1 parent 6b23bbd commit 228efeb
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 811 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# hackManthan


Explanation:
- Criminology is an area where the scientific study of crime and criminal behavior focuses.
As part of criminology, crime analysis is tasked with exploring and discovering crime and
Expand All @@ -23,6 +22,8 @@ Version 1.0.0 - 19 June 2022

### Add Firebase creditialsby making a folder ```backend/config``` and check config.py once

#### Python 3.7

```
cd backend
```
Expand Down
1 change: 1 addition & 0 deletions backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from werkzeug.datastructures import FileStorage
from functions import pandas_profiling,predict_crime,kmeans_centers,delete_collection
from config import *
from corpus import *
import json

#constant functions
Expand Down
21 changes: 0 additions & 21 deletions backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,5 @@
graph7 = os.path.join(basepath2,"data","graphs","007_scatter_plot_peek_time_crime.json")
graph8 = os.path.join(basepath2,"data","graphs","008_no_of_cases_in_important_event_type.json")

event_type = ['Information Against Police', 'Threat In Person', 'Dispute',
'Gambling', 'Missing', 'Theft', 'Domestic Violence',
'Property Disputes', 'Illegal Mining', 'Suicide', 'Corona',
'Cyber Crimes', 'Female Sexual Harrassment',
'Unclaimed Information', 'Encroachment',
'Crime On Phone Mobile Social Media Internet', 'Animals Related',
'Unknown', 'Robbery', 'Pollution',
'Information Against Other Government Departments', 'Medium Fire',
'Child Crime(Sexual Abuse)', 'Found Deadbody',
'Suspicious Object Information',
'Threat On Phone Email Social Media', 'Dacoity',
'Attempted Murder', 'Suspicious Person Information', 'Forgery',
'Female Harrassment', 'Kidnap', 'Excise Act Offenses', 'Accident',
'Ndps Act Offenses', 'Police Help Required By 108',
'Escort For Safety', 'Traffic Jam', 'Differently Abled People',
'Sos', 'Murder', 'Assault/Riot/Commotion', 'Major Fire',
'Child Crime', 'Dowry Related Crime', 'Small Fire', 'Pick Pocket',
'Election Offences-Violation Of Model Code Of Conduct',
'Animals Smugling', 'Accident Explosive', 'Personally Threat',
'Human Trafficking', 'Police Help Required By 1090',
'Suicide Attempt']

event_type_test = ["Suspicious Object Information","Threat In Person","Attempted Murder","Domestic Violence","Female Harrassment"]
7 changes: 5 additions & 2 deletions backend/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
import csv
import pandas as pd
from upload import *
from corpus import *

#some functions where used to make custom report & others are working


def translator(text):
Expand All @@ -24,10 +27,10 @@ def translator(text):

def pandas_profiling(file_path):
data1 = pd.read_csv(file_path).head(100)
data1 = add_date_time(data1)
data2 = add_date_time(data1)
file_name = os.path.splitext(file_path)[0]
print(file_name)
profile = ProfileReport (data1, title='Report - Crime Analysis', explorative=True)
profile = ProfileReport (data2, title='Report - Crime Analysis', explorative=True)
path_of_file = basepath+"/static/"+f'{file_name}_anylasis.html'
print(path_of_file)
profile.to_widgets()
Expand Down
2 changes: 0 additions & 2 deletions backend/graphs.py

This file was deleted.

781 changes: 0 additions & 781 deletions backend/nohup.out

This file was deleted.

File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions data/a.txt

This file was deleted.

File renamed without changes.
File renamed without changes.
Binary file removed data/features.png
Binary file not shown.
4 changes: 2 additions & 2 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# hackManthan


## Completed
## Graphs

- Most Frequents Event Types - Bar
- No. of Events Updated by Date - Line
Expand All @@ -19,6 +19,6 @@
- per 15 day data - Line


## Not Completed
## K Means

- Prominent Point - Clustering
File renamed without changes.
File renamed without changes.

0 comments on commit 228efeb

Please sign in to comment.