Mainly: I wanted to get all counts for Wodehouse, but didn't want to block the page load for that. So what I did was take a small subset of the data that's needed to render the page, and have that written into the file. Then after load I fetch all the other counts.
In the tutorial I also used Bun.xxHash3, but to make sketches run on the client, I had to replace that with a library.
The actual sketch implementation that backs the demos is here: