Crime

This project has been developed exclusively for academic purposes as part of the requirements for the mid-term coursework assignment in the CM3035 Advanced Web Development module at the University of London. The dataset utilized in this project is sourced from a publicly accessible collection on Kaggle. The data was originally contributed by the Data Analysis Unit of the Denver Police Department.

To see the structure of the API using Swagger, click on the link below:
Swagger

To see the application on Elastic Beanstalk, click on the link below:
Swagger

API Endpoint One
POSThttp://127.0.0.1:8000/api1

Log a new crime with POST with Django forms and nested serializers.

Click here
API Endpoint Two
GEThttp://127.0.0.1:8000/api2/17

Get a hotspot for a particular category of offense.

API Endpoint Three
GEThttp://127.0.0.1:8000/api3

List the locations with the fastest response when a motor vehicle is stolen.

Click here
API Endpoint Four
GETPOSThttp://127.0.0.1:8000/api4

List the type of White Collar offenses that are committed on the weekends.

Click here
API Endpoint Five
GEThttp://127.0.0.1:8000/api5

List the neighbourhoods where either drugs and aggravated assault is prevelant.

Click here
API Endpoint Six
GEThttp://127.0.0.1:8000/api6

List the 5 closest geolocation to the first murder that took place.

Click here
Neighbourhood Detail View
GET PUT DELETE http://127.0.0.1:8000/neighbourhood/75

Get a specific neighbourhood so we can delete or update it.


Offense Type List View
GETPOSThttp://127.0.0.1:8000/offense-type/

List the first five offense types, or create a new offense type.

Click here
Geolocation Detail View
GET PUT DELETE http://127.0.0.1:8000/neighbourhood/75

Get a specific neighbourhood so we can delete or update it.


Crime List View
GET POST http://127.0.0.1:8000/crime

Get a list of crime, or create a new crime record with REST framework. (Functionally similar to API1)

Click here
Additional Details
I developed the application on VS Code with a Python virtual environment with Python version 3.12.7 and Django 4.2.17. My device is running on MacOS 14.5 (23F79).

Admin site credentials:

  • admin@example.com
  • password123
Admin site

Packages
asgiref==3.8.1
attrs==24.3.0
beautifulsoup4==4.12.3
Django==4.2.17
django-bootstrap-v5==1.0.11
django-bootstrap5==24.3
djangorestframework==3.15.2
drf-spectacular==0.28.0
factory_boy==3.3.1
Faker==33.1.0
gunicorn==23.0.0
inflection==0.5.1
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
packaging==24.2
python-dateutil==2.9.0.post0
PyYAML==6.0.2
referencing==0.35.1
rpds-py==0.22.3
six==1.17.0
soupsieve==2.6
sqlparse==0.5.3
typing_extensions==4.12.2
asgiref==3.8.1
uritemplate==4.1.1