Drop #262 (2023-05-16): May `23 Quick Links Week Day #2
the html review; is it vega-lite or ggplot2? Cody
Managed to crank out a bit more commentary than expected for today!
the html review
The HTML Reeview is an annual web-based literary journal that publishes literature on the web. It features poetry, fiction, non-fiction, graphic storytelling, and experiments that highlight the web as a medium. They are open to a wide range of literary works, including:
digital journeys
word cities, cellular automatas
linguistic instruments
gif operas
gamelike things
literary games
games that aren’t games but are games but aren’t games
typewriter art
concrete poetry
ASCII lyricism
CSS still lifes
hyperlinked fantasies
I came across it thanks to a piece by Alexander Miller dubbed Grid World. I won't ruin the story by telling you who Alexander is or anything further about the piece; save for the fact that it connected me back to a piece of computing history and put a smile on this curmudgeonly mug.
is it vega-lite or ggplot2?
Experience R folks know that it can take alot of time and effort to both learn how to make stunning ggplot2 visualizations and then make each one.
(These next four ❡ are in the README that I link to further down.)
<snip>
[Much like ggplot2,] Vega and Vega-Lite are open-source data visualization tools that enable you to create and share interactive visualizations. Vega and Vega-Lite are known as declarative visualization grammars as they provide a declarative syntax to describe the visual appearance and interactive behavior of a visualization. Similar in spirit to how SQL provides a declarative language for expressing database queries, Vega and Vega-Lite provide declarative languages for describing visualizations in a JSON (JavaScript Object Notation) format. These descriptions are defined as Vega/Vega-Lite specifications.
Vega-Lite is built on top of Vega and provides a more concise visualization grammar to build a wide range of visualizations quickly while offering control to override defaults and customize various parts of a visualization. As Vega-Lite can compile its specifications to Vega specifications, users may use Vega-Lite as the primary visualization tool and transition to using the lower-level language, Vega, for advanced use cases if needed.
Vega-Lite specifications represent a high-level description of what you want the visualization to include, in terms of data, graphical marks (point, bar, line, etc.), and visual encoding channels (x-axis, y-axis, color, size, etc.). The key idea is that you declare links between data fields and encoding channels. The rest of the plot details are handled automatically. Axes, legends, and scales are all automatically generated by the Vega-Lite compiler based on a set of carefully designed rules. This approach is what makes Vega-Lite specifications to be concise and suitable for quick visualization authoring.
Vega-Lite supports data analysis, data transformations (e.g., aggregation, binning), visual transformations (e.g., stacking, faceting), flexible combinations of charts, and interactions (e.g., zooming, selection).
</snip>
Most Vega[-Lite] examples you have likely seen are like most ggplot2 examples you have likely seen: basic, unadorned, and limited in styling. Not so with this wonderful gallery. It’s a great reminder that you make things amazing, not the tool.
It's worth digging into, especially if you intend to play around with WebR.
Cody
The battle for dominance in the AI-assisted code crunching space is super hot right now. Enter Cody by Sourcegraph.
So far, I've found it to be better (for my needs) than all the others, and it is free for personal use. It is especially good at documenting functions/methods in your code base. If you use VS Code Insiders (like I do) you’ll need to copy the launch URL (you’ll see what I mean) and ensure you add `-insiders
` to the host field. Hit me up if that needs more ‘splainin.
I'll do a more in-depth review once we get past “travel week”.
FIN
It's been over a decade since I drove into D.C. and I rather hope I never have to again. It really felt like The Hunger Games on the Beltway, especially having gotten stuck closer in and then slowly crawling past a recent driver-human (jogging) hit-and-run scene. Let’s be careful out there! ☮