Coding

31 posts
R graphics get modern text support, with ragg package

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...

0 0
Small JavaScript library for density plots

Twitter released a small JavaScript library to make density plots — for when you have a lot of overlapping points and could use some granular binning. Feed a method an array of thousands of x-y coordinates, and the library takes care of the rest. Tags: JavaScript, Twitter

0 0
Parsing a table from an image

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...

0 0
Tour of the D3 ecosystem

D3.js, a flexible JavaScript library useful for visualization, can feel intimidating at first. It does a lot. So Ian Johnson gave a talk on what the library provides, along with a tour of the essentials. Tags: d3js, Ian Johnson, tour

0 0
Making map art in R

If you can make maps in your software and customize the aesthetics, you can make map art. Esteban Moro outlined how he made a personalized map in R: For my map art, I wanted to create something more personal: a combination of those beautiful street maps with personal mobility. That is, the city and how we navigate it. In this tutorial, you’ll learn how to create those street maps for...

0 0
Layer Cake, a graphics framework for more flexible web graphics

Michael Keller released a new version of Layer Cake: Layer Cake is a graphics framework built on top of Svelte. It measures your target div and your data and creates scales that stay synced on layout changes. Use these scales to organize multiple, mostly-reusable Svelte components, whether they be SVG, HTML, Canvas or WebGL. Since they all share the same coordinate space, you can build your graphic one layer at...

0 0
Teaching R to 7th graders

Joshua Rosenberg describes his one-day experience teaching R to 7th graders: [T]he activity worked albeit, as a very gradual introduction to using R. In combination with starting with modest goals, having the right tools (R Studio Cloud, R Markdown, and a suitable data set), I think, helped to make this work. 7th-graders can (start to) use R. The goal that Alex and I have is for students to be able...

0 0
xkcd-style charts in JavaScript

For xkcd fans, here’s a JavaScript library by Tim Qian that lets you style your charts like xkcd. There’s something about sketchy, comic-style charts that makes the data feel more approachable. Maybe just because it’s different or looks more casual? I mean, I would use the style sparingly and maybe not in your next business meeting, but it’s kind of fun to mess with. You can also do this in...

0 0
Animating a lot of dots with WebGL and REGL.js

A couple of weeks ago, The Washington Post visualized 13,000 school districts using moving bubbles. Post graphics reporter Armand Emamdjomeh describes how they did it. Saving this for later. Tags: JavaScript, REGL, WebGL

0 0
Bird’s-eye view of D3.js

D3.js can do a lot of things, which provides valuable flexibility to construct the visualization that you want. However, that flexibility can also intimidate newcomers. Amelia Wattenberger provides a bird’s-eye view of the library to help make it easier to get started and gain a better understanding of what the library can do. Even if you’re already familiar with D3.js, it can serve as a useful reference. Tags: Amelia Wattenberger,...

0 0