Application Design

Crime Analysis Map & User Application

Application Overview

Following the 2020 pandemic, San Francisco has seen a steady rise in crime throughout the city. Using data on SF incident reports provided by SFPD and compiled from the department's Crime Data Warehouse, we analyzed crime patterns within downtown San Francisco neighborhoods, prior to, and following the pandemic. Supporting visualizations help demonstrate the crime type(s) most prevalent, specific areas where crime occurs, common times of day for crime, and the overall change in crime rate from 2018 - present day.

*This code can be altered and used to reproduce similar results from other city data.

Project Presentation - Slide Deck

GitHub Repository - SF Crime Application

Flask App Design

Web application for visualizing and serving data end points for the crime data analysis. Each rendered HTML landing page features a 'Back to Main Map' button, returning the user back to the homepage.

Available Application Routes:

@app.route("/")
def home():
    app.logger.debug("Serving index.html")
    return send_from_directory(app.static_folder + '/template', 'index.html')

@app.route("/about")
def about():
    app.logger.debug("Serving about.html")
    return send_from_directory(app.static_folder + '/template', 'about.html')

@app.route("/page3")
def page3():
    app.logger.debug("Serving page3.html")
    return send_from_directory(app.static_folder + '/template', 'page3.html')

@app.route("/page4")
def page4():
    app.logger.debug("Serving page4.html")
    return send_from_directory(app.static_folder + '/template', 'page4.html')

@app.route("/page6")
def page6():
    app.logger.debug("Serving page6.html")
    return send_from_directory(app.static_folder + '/template', 'page6.html')

Main Map View

Navigation header

About Page - API Endpoints

Featured on the 'about' page is a list of API endpoints generated to reproduce data for each visualization

Data Visualizations

Interactive Bar Chart

Allows user to sort through crime categories, select and visualize historical data for each specific crime type

Heat Map

Allows user to visualize the time of day when crime activity is considered 'extreme'

Bubble Chart

Provides animation to further visualize historical change for the selected crime category

Interactive Crime Map

Displays markers of incidents reported throughout the city of SF, with an included control for toggling through data filtered by crime category. Hovering over marker clusters will reveal the neighborhood's boundary outline. Once clicked, the marker will display details on that specific incident report.

GitHub Repository

DIGITAL
PORTFOLIO