TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN:Scraping NY Times election data and displaying it on a flipdigit display

2 pointsby worldmerge6 months ago

1 comment

worldmerge6 months ago
Hi,<p>For the US 2024 Presidential election, I made a scraper that pulled the NY Times electoral college data and displayed it on my AlfaZeta flip-digit display. (Code [0])<p>It&#x27;s very hard to get free electoral college data live, but at Syracuse&#x27;s Open Data Day I learned the NY Times election data is just JSON files the whole site is powered by ~5 JSON files. So I got to work making a scraper for 2020&#x27;s data and formatting for my display. I built a websocket serial server that runs on a Raspberry Pi so I could work on my laptop and test it. [1]<p>At 6 pm (eastern) the new data dropped and that resulted in a URL for the JSON and a new data structure. I spent the next 20 minutes parsing it out and then let it ran for the whole night. I took a timelapse of the night (linked in the website)[2] and added back the click-clack sounds I heard that night.<p>[0] - <a href="https:&#x2F;&#x2F;github.com&#x2F;EdwardDeaver&#x2F;2024_Presidential_Election_Scraping">https:&#x2F;&#x2F;github.com&#x2F;EdwardDeaver&#x2F;2024_Presidential_Election_S...</a><p>[1] - <a href="https:&#x2F;&#x2F;github.com&#x2F;EdwardDeaver&#x2F;WeatherToMechanical">https:&#x2F;&#x2F;github.com&#x2F;EdwardDeaver&#x2F;WeatherToMechanical</a><p>[2] - <a href="https:&#x2F;&#x2F;vimeo.com&#x2F;1027074047" rel="nofollow">https:&#x2F;&#x2F;vimeo.com&#x2F;1027074047</a>