Matt Dray is developing a package in R that runs a text-based game. Part of that game requires procedural dungeons that are different each time you play.
Category Archives: Coding
Spike maps use the height of spikes to encode data geographically. The format provides a similar effect to frequency trails where the layering looks 3-D-ish, except spikes are typically centered on an area instead of running parallel.
Anyways, like most visualization methods with a name, there is an R package for spike maps by Timothée Giraud.
Before you get into analysis and visualizing data with R, you need to know the basics. Steve Haroz wrote a guide on getting started:
This book is a short introduction to the R language. It covers the basics of R that are not covered by analysis and visualization guides like R for Data Science. Consider it a quick way to get up to speed on R before diving into the analysis and visualization aspects.
This example-focused guide assumes you are familiar with programming concepts but want to learn the R language. It offers more examples than an “R cheat sheet” without the verbosity of a language spec or an introduction to programming.
Oftentimes visuals generated through code can seem cold and mechanical when you’re after something more warm that breathes life. Introducing organized noise into the mix is one path. Varun Vachhar describes how you might use noise in the context creative coding.
For Wired, Craig Mod writes about how he uses code as a way to find order during less coherent times:
Break the problem into pieces. Put them into a to-do app (I use and love Things). This is how a creative universe is made. Each day, I’d brush aside the general collapse of society that seemed to be happening outside of the frame of my life, and dive into search work, picking off a to-do. Covid was large; my to-do list was reasonable.
The real joy of this project wasn’t just in getting the search working but the refinement, the polish, the edge bits. Getting lost for hours in a world of my own construction. Even though I couldn’t control the looming pandemic, I could control this tiny cluster of bits.
A couple of years ago, I spoke about how FlowingData is a personal journal in disguise. I find myself turning to data and charts, because those things feel familiar and can be a source of comfort.
So while reading Mod’s essay, it was easy to substitute in data and nod my head in agreement.
Thomas Lin Pedersen announced the ragg package, which makes font usage in R more straightforward:
I’m extremely pleased to present the culmination of several years of work spanning the systemfonts, textshaping, and ragg packages. These releases complete our efforts to create a high-quality, performant raster graphics device that works the same way on every operating system.
This blog post presents our improvements to ragg’s font rendering so that it now “just works” regardless of what you throw at it. This includes:
- Support for non-Latin scripts including Right-to-Left (RtL) scripts
- Support for OpenType features such as ligatures, glyph substitutions, etc.
- Support for color fonts
- Support for font fallback
All of the above comes in addition to the fact that ragg is able to use all of your installed fonts.
If you’ve tried to make publication-level graphics completely in R, you’re probably familiar with the challenge of using non-default fonts. The correct steps depend on your system and the words you want to add. It’s one of the reasons I bring R output into Adobe Illustrator, so now there’s one less extra step. Nice.
Thomas Mock explains how to extract and parse data tables in image files via ImageMagick and R:
There are many times where someone shares data as an image, whether intentionally due to software constraints (ie Twitter) or as a result of not understanding the implications (image inside a PDF or in a Word Doc). xkcd.com jokingly refers to this as .norm or as the Normal File Format. While it’s far from ideal or a real file format, it’s all too common to see data as images in the “wild”. I’ll be using some examples from Twitter images and extracting the raw data from these. There are multiple levels of difficulty, namely that screenshots on Twitter are not uniform, often of relatively low quality (ie DPI), and contain additional “decoration” like colors or grid-lines. We’ll do our best to make it work!
You can never have too many tools to grab data from various, inconvenient file formats.