- DSCI-522 Group 23
- Alias: Project Avalon
Our team, in alphabetical order:
- Orix Au Yeung
- Ben Chen
- Mo Norouzi
- Yiwei Zhang
Welcome to the repository for Project Avalon, a part of the DSCI-522 course by Group 23 in the MDS-V Cohort 8 at UBC.
Project Website: https://ubc-mds.github.io/project-avalon/
This project aims to perform statistical analyses on the crimes committed in the City of Vancouver and develop a forecasting algorithm to forecast the number of crimes given a set of lagged values.
We created a model to estimate the frequency of vehicle break-ins each month in Vancouver. It uses historical data to inform its predictions, applying methods that consider both recent occurrences and long-established trends. The chosen approach has an average deviation of about 27 incidents per month from the actual numbers, which is notable given the substantial month-to-month variation in the incident counts. The model's current accuracy demonstrates its potential, and we anticipate that incorporating additional factors, such as weather patterns or significant city events, could enhance its predictive capabilities.
Crime Data Download, the Vancouver Police Department
All required dependencies are listed in this conda environment file.
For this method, you will need to ensure either Docker Dekstop or Docker Engine is installed and running in your system.
Important Notes:
- (For Docker Desktop users) The created container will require more than 4GB of RAM to run the analysis notebook. Please ensure the settings in Docker Desktop enables provisioning at least 8GB of RAM to the container.
- (For Apple Silicon users) Please enable the feature "Use Rosetta for x86/amd64 emulation on Apple Silicon" inside the setting menu. Otherwise, the kernel will not be properly run.
Go to the project's root folder and run:
docker compose --profile make-report pull && \
docker compose --profile make-report up
- The above script generates the report using GNU Make and Jupyter Book.
- The final report will be placed under
docs/
.
Go to the project's root folder and run:
docker compose --profile interactive pull && \
docker compose --profile interactive up
- This is best for users who are interested in tinkering with the data, models and report.
- Use browser to visit http://localhost:8888 and supply the generate token.
- Create a new conda environment based on the provided YAML file.
- Run
conda env create --name avalon --file=environment.yaml
- Then switch to
avalon
env by clicking the drop-down, and selectavalon
- Note:
- If you need the
avalon
env locally, runconda activate avalon
- If you added a new package in your local
environment.yaml
, you need to runconda env update --name avalon --file=environment.yaml
to update your local env. - In case that jupyter does not recognize the new conda environment, Install ipykernel's kernel spec thru the following command:
- If you need the
conda activate avalon
python -m ipykernel install --user --name avalon --display-name "Python (avalon)"
- Ensure all dependencies are installed.
- Open Jupyter Notebook or JupyterLab to run the analysis notebook
To run tests, execute the following command in the project root directory:
python3 tests/run_all_tests.py
Here are some handy links for quick access:
- Course Releases: DSCI_522 Course Releases
- Course Notes: Reproducible and Trustworthy Workflows for Data Science
- Slack Channel: 522_dsci-workflows on Slack
- Our GitHub Project: Project Kaban
All reports contained herein are licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License. See the license file for more information.
If re-using/re-mixing please provide attribution and link to this webpage.
The software code contained within this repository is licensed under the MIT license. See the license file for more information.