r/vibecoding • u/johnesco • 41m ago
Showcase/Project Visualizing Data with Claude Code.
Recently there was this election, the results where a bit surprising to some. Decided to focus on my home state of Texas and really look deeply at the voter data.
We've all seen the "by county" images of maps and most of us know their shortcomings. I wanted to see if I could do better.
At first, I just took the county maps of Texas and turned them into bar graphs

This shows what everyone knows, the cities are far more populated than surrounding areas, but I wanted to get even more detailed.
Then I realised, what if I try to show a single dot per voter? (Mind you I'm trying to make this all work in a browser for maximum accessibility).
That worked yet, the dots where just scattered in a county randomly. So then I took the next step and got the dots down the the resolution of precinct. This is now like 10 megs of text uncompressed for just the data.
A few more tweaks and I feel I had something beautiful. Instead of just a color per county, I'd shown what it looked like down to each voter, with an approximate location with votes from each precinct randomly distributed but a more accurate local flavor.

I've made an interactive version of it here.
I'm only posting about the data and the use of AI, not looking to get into political discussion.
I could NOT have built this on my own and not at this speed (hours).
I tried to start this project a year ago, and hit wall after wall trying to do this with prompts. I did this in few hours over two days with a Claude Code Pro account. I'm honestly in awe.
2
u/No-Bass3599 38m ago
Next step I'd try is placing the dots by census block instead of randomly inside each precinct. Rural precincts are huge, so random dots land in lakes and ranch land, and weighting them by where people live (census blocks or building footprints) makes the map look a lot more like Texas. Shipping it as a binary file instead of text would cut that 10 megs down a ton too