Skip to content

End-to-end data pipeline of san francisco police department incident reports

Notifications You must be signed in to change notification settings

monometa/SFPD-incidents-data-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

San Francisco Police Department incidents

Table of Contents

Project Overview

Project Overview

In this project, we first extract by downloading CSVs using SODA API. We then consume and put them into a data lake (Google Cloud Storage). After that we schedule a data pipeline (Airflow) to run monthly to load to a data warehouse (Google BigQuery). Later on, we transform the data in the warehouse using dbt. Finally, once the data is cleaned and transformed, we can monitor and analyze the data on a dashboard (Tableau).

The visualization results are two dashboards. On the first of them, you can see the ratio of the number of crimes to the previous year with the possibility of choosing a district. The second is a map crime with additional information regarding the dynamics of the most committed crimes.

Dataset

Police Department Incident Reports Historical (2003 - 2017)

Police Department Incident Reports (2018 to Present)

Technologies

Vizzes

SFPD Police data

image

Instruction on Running the Project

Follow below steps to set up the project. I've tried to explain steps where I can. Feel free to make improvements/changes.

NOTE: This was developed using a Google VM instance. If you're on Windows or Linux, you may need to amend certain components if issues are encountered.

As Google offers a free trial for 3 months, this shouldn't cost you anything with proper settings (which will be mentioned later). However, please check Google Free Trial and Free Tier limits, as this may change.

  1. Prerequisites
  2. Google Cloud setup
  3. Infrastructure & Terraform
  4. Airflow
  5. dbt
  6. Dashboard
  7. Improvements

About

End-to-end data pipeline of san francisco police department incident reports

Topics

Resources

Stars

Watchers

Forks