Giter Site home page Giter Site logo

chicago-crimes-dashboard's Introduction

🚨 Chicago Crimes Dashboard

forthebadge made-with-python Python 3.9 Docker Open Source? Yes!

Screenshot from 2022-10-18 17-14-06


Contents


The project's purpose

This project is a visual interface for a BigQuery public dataset of Chicago's crimes. You can filter the dataset based on Crime type and Date, and check the exact location of the crimes on Chicago's map. The whole project is written in Python. So, let's enjoy it!


What used to make this project

Technology πŸ”—
Chicago Crime Dataset [Google Cloud Link] [Kaggle Link]
Fastapi [Github Link]
Python-BigQuery [Github Link]
aioredis [Github Link]
httpx [Github Link]
Pytest [Github Link]
Streamlit [Github Link]
Docker [Github Link]
Docker-Compose [Github Link]
GitHub [Github Link]

Before you begin

  1. You need JSON Credentials for using BigQuery API. If you don't have it, click here to go to Google instructions.
  2. Where to put that JSON file? you can put it in backend directory project or anywhere you want, BUT you should add that path in backend/.env variable bellow.
    ⚠️ In project, both Backend & Frontend folders has a .env.sample file, which you should rename it to .env and setup your variables.
GOOGLE_APPLICATION_CREDENTIALS=./GoogleCredentials.json
  1. If you need to check the installed packages, they are in requirements folder under Backend or Frontend folder and splited to base.pip & dev.pip .

How to run project

There is a docker-compose.dev.yml in root folder, which can help to run the project easily. I'll show you how to use it.
⚠️ Both Backend & Frontend folders has their own Dockerfile.

docker-compose -f docker-compose.dev.yml up -d --build

And to access the dashboard, just open below link in your browser.

http://localhost:8501/

How to run tests

Both Backend & Frontend folders have the tests folder, in which you can run pytest command to run the tests separately.
And, what about Test Coverage?

pytest

coverage run -m pytest
coverage report
# Name                            Stmts   Miss  Cover
# -----------------------------------------------------
# Backend  Test Coverage TOTAL     185      5    97%
# Frontend Test Coverage TOTAL      56      0   100%

Final step

Be Happy Even if Things Aren’t Perfect Now. πŸŽ‰πŸŽ‰πŸŽ‰

chicago-crimes-dashboard's People

Contributors

ko-sangari avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.