This is a companion repository to us-elex-2024-bx, which mapped unofficial 2024 election night results in the Bronx, at election district level.
For a more thorough insight on how Bronxites vote, I looked at data from the 2016 and 2020 elections. While this repository filters data for the presidential race and specifically in the Bronx, the lines of code may be adjusted to cater to other positions and coverage areas.
Resulting analysis will be used for a reporting assignment for the Mott Haven Herald and Hunts Point Express.
This is part of our class requirement for Craft of Journalism (South Bronx) at the Craig Newmark Graduate School of Journalism at CUNY, under the instruction of Eileen Markey and Ben Fractenberg and the editorship of Joe Hirsch.
- Vote counts per election district from New York City Board of Elections
- Election district coordinates from NYC Department of City Planning (H/T toddwschneider)
- Parks shapefiles from NYC Open Data
Notes:
- Boundaries of election districts vary due to redistricting.
- Shapefiles were processed into JSON through Mapshaper and QGIS.
├── analysis.ipnyb # main notebook used to filter datasets and process vote counts for visualization
├── csv # holds processed datasets for visualization
├── images # holds image files for webpage
├── data # holds raw datasets, downloaded from the NYC BOE website
├── json # holds shapefiles and JSON files for visualization
├── refactored-json # holds geojson files (merged json and csv data); used for Mapbox
├── LICENSE
└── README.md
Maps were processed through a mix of Datawrapper, QGIS, Mapbox, and Adobe Illustrator and Photoshop.
Why did I have to use so many tools? Initially, the assignment was only to map 2024 election night results — hence, this companion repository — for which I tried to simplify my workflow. I ran the json
and csv
through Datawrapper, then refined the graph via Illustrator.
Then... Our reporting instructors thought to compare 2024 data with those of 2016 and 2020. I redid the same process. For the first attempt, I used total vote counts. But, we realized we needed a "fixed" measure of vote differentials for the choropleth map. I decided to re-calculate and plot percentage points instead.
We also wanted overlays of roads and parks; hence, QGIS and Illustrator. (Quick shoutout to Hannah Dormido for the guidance!)
The first prototype page for the visualization utilized drop-down menus and a JavaScript event listener
that would show static images of the maps.
However, our instructors thought it best to add tooltips and annotations to show more details per election district per year — which would honestly be too much work for one person (me!) to do on a tight timeline. (I also admittedly don't have the expertise to do this on my own yet.)
So, I explored Mapbox as an option. json
and csv
files were refactored via QGIS, then uploaded as tilesets on Mapbox. (As a last resort, I was told to use Datawrapper's iframe
to replace static images on the first version of our prototype page.)
This is, quite obviously, a living repository for now. We'll see what happens next.