Arquero, a JavaScript library to query and transform datasets

An often painful yet necessary step in visualization is to get your data in the right format. Arquero, from the University of Washington Interactive Data Lab, aims to make this part of the process easier:

Arquero is a JavaScript library for query processing and transformation of array-backed data tables. Following the relational algebra and inspired by the design of dplyr, Arquero provides a fluent API for manipulating column-oriented data frames. Arquero supports a range of data transformation tasks, including filter, sample, aggregation, window, join, and reshaping operations.

Before working with JavaScript, I almost always end up in R or Python to get the data where it needs to be. I’m curious if this’ll help streamline the process, if just by a bit.

Tags: ,

Census data downloader to reformat for humans

There is a lot of Census data. You can grab most of the recent aggregates through the American FactFinder or via FTP or some obscure Census page that hasn’t been updated in a decade. It’s, uh, not always the best experience. The Census Data Downloader from the Los Angeles Times data desk is a Python library that streamlines the download process, if just a little bit.

The main added value comes from a way to use existing definitions or make your own to download tables as CSV. That way you get readable headers instead of meaningless table codes.

Tags: , ,

Convert Adobe Illustrator files to HTML and CSS

For the folks who have to make graphics for all devices under the sun, any time that can be saved is worth saving. The Illustrator script ai2html, from New York Times graphics editor Archie Tse, converts Illustrator files to HTML and CSS.

In case you're wondering why:

Text in images and SVGs scale as you scale the image — so your text becomes unreadable pretty quickly as the artwork scales down, or looks hilariously large as it scales up. By rendering the text as html, we can scale the "graphic" up and down, but keep the text readable at the same font-size and line-height. This is important because we are trying to reduce the number of versions of the artwork that we have to create in order to accommodate viewports that range from mobile phones up to giant desktop monitors.

There are plenty of examples of the script in use by NYT.

Saving for later.

Tags: ,