My Fat Senator
I *am* starting to get a little concerned that ‘My Fat Senator’ is fatphobic. It would be inappropriate to poll visibly overweight people on the street to ask whether they felt targeted by the title and likewise unhelpful to ask the slim, scrawny, and shredded. I may change it to some tedious untitle like “Visual Congress” or “Representing Democracy” at rollout but for now please bear with me.
Let me tell you about a new website I’m starting work on. I’m concerned about how structurally undemocratic the United States Congress is. By 2040, 70% of the population is expected to live in 15 states. That means 70% of the US population will be represented by 30 Senators. That’s not enough to filibuster, much less pass a bill. Now there’s still a question of how those states will align politically—are California and Texas ever going to be on the same side of a fight?—but I think it’s worth being able to see how votes in congress actually reflect the population of the country. The purpose of this site is to make it visually obvious when a bill fails despite the clear will of the people.
Using [ProPublica’s Congress API](https://projects.propublica.org/api-docs/congress-api/), I’m going to construct a dashboard that shows the senators that voted for and against a bill scaled by the percentage of the population represented (I’m debating whether senators should be directly or inversely weighted to population or if it should be toggleable). So a Senator from Wyoming (population 580,000) will be much smaller than a Senator from Texas (population 30,000,000). Stick a senator’s face on a circle, scale it by the appropriate factor, then drop them all into the Yea and Nay columns like gumballs into a vending machine.
There’s room for a few more options like a Stack Your Vote mode where users can create custom vote counts so that they can visualize different groupings capable of securing a majority vote and how those reflect the population at large. It’d be trivial to spit out some basic data tables illustrating how the backing data is generated but I want to avoid recreating the entire congressional API since there are already websites that do that.
Limitations
It’s a neat idea and I think it’s informative but we can only meaningfully track votes that make it to the floor of the Senate. Senate rules effectively restrict the ability to call a vote on a bill to a handful of the senior leadership of the majority party and they only vote when they’re confident they can win (or they want to grandstand). This means that the controlling party can avoid going on the record voting down a popular measure by the simple expedient of not allowing a vote on the bill to begin with. It’s also worth noting that these rules are not required by the constitution and one might ask what benefit they provide.
Additionally, some initial data modeling show there will be some issues with the data that need to be cleaned up or hedged. For example, senators will have slightly different scales applied before and after redistricting and the available data doesn’t quite support that. I’d planned to write a job to pull the data I need into the database but I’ll have to make a strategic decision about the level of fidelity of the simulation.
Technical Dross and Front-End Nonsense
So I’m also using this project as a springboard to build something in [React](react.dev) and I have to complain a bit about the ecosystem. We use Angular on a number of projects at work which is notorious for its complexity and learning curve and I’ve heard for years that React is so much more lightweight since it’s *just* a view templating engine. I figured I’d walk through the React Hello World tutorial, drop it into the front-end of an Express or DotNet app and start cranking out views. Then I get to the part of the official docs where React recommends people use React as part of a meta-framework that supports all of the other things you’d want a SPA to do. And there’s not just one but three recommended frameworks which each have their own tooling and approach.
I will give you a moment to imagine the screaming fit I had at that point. Glass shattering, a flock of birds taking off from the roof of the building, the view shuddering outward from house to city to state.
And moving on.
Of the recommended frameworks, [Remix](remix.run) sounds the most compelling. The creator wrote a blog post where he emphasized the importance of directly exposing and using browser APIs instead of the next.js approach of wrapping them, and I think that’s got to be the correct approach. Browser API’s are increasingly well-developed and support many features that used to be the domain of third-party libraries; we should avoid pointless abstractions over them and the frameworks we use should support the acquisition of transferrable skills wherever possible. That said, I’m still a little torn between using one the remix stacks with an express back-end or ignoring the docs and sticking with a dotnet core backend with React as a templating engine.
Dotnet is the tried and true back-end solution. C# is easy to work with, has a solid ecosystem (and a better package manager), and does a good job of staying out of the way. On the flipside, the front-end would necessarily be less sophisticated than one using Remix and will require rigging up more infrastructure than would be the case with the Remix stack.
Remix has some neat functionality with the way it handles the boundaries between front- and back-end, supports progressive enhancement, and data synchronization. The file-based routing system is interesting—I understand it pre-exists Remix—though I don’t know that it’s suitable to a larger application. Granting that, the sheer number of new libraries in its stacks would add a lot of time to reach the level of fluency I prefer to have with systems I work on. I suppose I could take the speed-run option and only learn what’s immediately necessary for my use case but it’s always a little unsatisfying to have a part of the map labeled “Here be lions”.
As with all such decisions, the only way to resolve it is with [quantum physics](https://apps.apple.com/us/app/universe-splitter/id329233299).