RadvancedaiAI generated

Spatial Analysis of Crime Data with sf

Build an R script that loads geocoded crime incident data, performs spatial joins with neighborhood boundary shapefiles, and produces choropleth maps of incident density. Learners practice spatial data handling with the sf package, coordinate reference systems, and map visualization.

Estimate
~9h
Steps
5
Completed by
0
Proposed by
codeseed.app

sf · ggplot2 · dplyr

Project roadmap

  1. 01

    Load spatial datasets

    ~2h

    Load a shapefile of neighborhood boundaries and a CSV of geocoded incidents with sf, ensuring matching coordinate reference systems.

  2. 02

    Perform a spatial join

    ~2h

    Join incident points to neighborhood polygons to count incidents per neighborhood.

  3. 03

    Compute density metrics

    ~1.5h

    Normalize incident counts by neighborhood area or population to compute a density metric.

  4. 04

    Build a choropleth map

    ~2h

    Visualize neighborhood-level density with a choropleth map using ggplot2's geom_sf.

  5. 05

    Highlight hotspots

    ~1.5h

    Identify and label the top-N highest-density neighborhoods directly on the map.

Resources

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~9h · 5 steps

Tech stack

sfggplot2dplyr