Skip to content

akunna1/Durham-Fire-Stations-Mapping

Repository files navigation

Durham Fire Stations Mapping

This project visualizes Durham Fire Stations by battalion on a map using R. The map is generated from a CSV file containing station names, battalion numbers, and physical addresses. Each station is geocoded to latitude and longitude, and battalion areas are highlighted with convex hulls for clarity.


πŸ“‚ Project Structure


Durham-Fire-Stations/
β”‚
β”œβ”€ addresses_to_geocode.csv       # CSV file with station names, battalion, and addresses
β”œβ”€ Durham_Fire_Stations_Map.png   # Output map generated by the R script
β”œβ”€ Fire_Stations_Geocoded.csv     # Output geocoded station addresses
β”œβ”€ Data_Cleaning.R                # Main R script
└─ README.md                      # Project documentation


πŸ› οΈ Requirements

  • R (β‰₯ 4.5.0)
  • Install the following R packages:
install.packages(c("tidygeocoder", "dplyr", "sf", "ggplot2", "tigris", "ggrepel"))

πŸ“ CSV Format

The CSV file addresses_to_geocode.csv should include the following columns:

Station Battalion Physical Location
Station 1 1 139 E. Morgan Street Durham, NC 27701
Station 2 1 1001 9th Street Durham, NC 27705
... ... ...

🎨 Map Features

  • County Boundary: Displays Durham County.
  • Fire Stations: Points colored by battalion for quick identification.
  • Battalion Areas: Highlighted using convex hulls to delineate coverage areas.
  • Station Labels: Short form (S1, S2…) for a clean visual.

⚑ Notes

  • Geocoding is performed using OpenStreetMap via tidygeocoder; optionally, method = "arcgis" can be used.

About

Mapping each station in Durham, NC into their Battalions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages