For Thanksgiving, because making a turkey was not trouble enough, I decided to build D3 apps using ChatGPT as a crutch. Over the summer, I had dedicated significant energy to mastering plotly. While there are many advantage to using plotly, D3 visualizations are silky smooth and load from the browser. While in the past I have gotten interactive D3 applications to work, there was always way too much effort involved. This in part because web development is something that I have learned by force of circumstance. But D3 is also just complicated because the extent of low-level control provided to the user. The beauty of D3 and, especially, its customizability, give it a permanent place on my to-do list.
Rebuilding the 2020 Presidential Electoral Map
I have always loved maps. For a short bit when I was younger, I had begun working on ARCGIS with the intention of specializing in map-making. This love for maps lives on. Every election, I enjoy visiting the different major media outlets to survey their electoral maps. Each year I find myself more impressed by the interactive maps and the extent of their integration into navigation of the results pages. I presume that many of these are made using D3.
On Thanksgiving, I had a hunch that I could swiftly develop an electoral map of my own in D3. My intuition was correct that, with careful description and a bit of knowledge concerning how D3 functions, I could get a better than decent electoral map up and running. The result is at the bottom of the post. In the process, I learned a few things about the power of LLMs.
1. Coding is not dead.
"Coding is dead" is a mantra that seems to be repeated by CEOs that dream of reducing costs with no-code environments. The problem with this view is that a fair amount of programming is debugging. Probably the majority of work is debugging. You get a result that supports the idea that a product can be developed. The next step is to integrate details that will force you to revisit assumptions that you had initially made for your prototype. To make outputs from LLMs work in a particular environment requires a significant amount of background knowledge and active theorizing about the relationship between the application and the environment. This is knowledge that is won through many seasons of persistence.
2. The future belongs to the persistent and imaginative.
LLMs have leveled the playing field. The efficiency of production at all levels can be greatly enhanced when an LLM is built into your workflow. If you restrict yourself to mundane, familiar tasks, you may not draw this conclusion. But if you need to prototype a new kind of output in hours or days, this is well within reason. This application took about one hour to build. The problem is not whether something can be built, but whether one is capable of imagining useful outputs on a regular basis. If you are a creative, you need to develop a workflow that allows you to leverage that creativity.
3. Learning by doing.
Becoming more comfortable with D3 has been on my to-do list for three years. But the cost of learning has been exceedingly high. As demonstrated here, the cost of producing output is much lower. In the process, one can choose to learn about the tool that they are using to generate an output. Growing familiarity with LLMs has been paying increasing returns for me in the last few months. Now, add to this list of tangible outcomes, a modestly better sense of the inner workings of D3. This allows me to imagine how I might prepare other data for a similar purpose. With iteration, I could learn the nuances of D3 applications build functions that allow me to efficiently build similar applications without relying on an LLM to recreate the product. And I will be looking for these opportunities as my research develops in the next few months.
4. Joy swamps fear.
Working on projects that are inherently interesting is much more fruitful than working on something that you would rather put off. This makes learning easier. And learning new skills will improve the quality and efficiency of development in future projects. If you are imagining building something, you probably should build it. And it might just make easier those projects that you don't enjoy.