background preloader


Facebook Twitter

D3 and React - the future of charting components? - Binary Consulting. Data-Driven Documents (D3.js) is currently my favoured charting library for producing interactive SVG visualisations.

D3 and React - the future of charting components? - Binary Consulting

Typically, I chose to use it in combination with NVD3. It provides a higher level library of re-usable charts and chart components for D3. Another JavaScript library that has taken my interest recently is React by Facebook. It aims to be just the View, or V in MVC, for building rich web application user interfaces. Why React? Two reasons that I find it of interest are firstly due to the implementation of a virtual DOM allowing very efficient and high performance browser DOM manipulation. The example taken from React's homepage illustrates this point, with the <HelloMessage /> component being appended to a DOM node. The JSX compiler converts the XML syntax to vanilla JavaScript function calls. Reusable charts with React components.

Sarah Mei » Why You Should Never Use MongoDB. Cut Two Pieces: Inkscape. Do you use Inkscape?

Cut Two Pieces: Inkscape

Did you know there is a built in feature to create calendars? If you don’t have Inkscape but would like to make a calendar go here and download the program (it is free). To create a calendar is very easy. To start open Extensions>Render>Calendar. Now you will see a new window with some more options. Gephi - The Open Graph Viz Platform. How Selections Work.

Any sufficiently advanced technology is indistinguishable from magic.

How Selections Work

–Arthur C. Clarke In the past I have presented simplified descriptions of D3’s selections, providing only enough detail to get started. This article takes a more comprehensive approach; rather than saying how to use selections, I will explain how selections are implemented. This may take longer to read, but it should dispel any magic and help you master data-driven documents. The structure of this article may at first seem arbitrary. D3 is a visualization library, so this article incorporates visual explanations to accompany the text. Var array = [42]; Wherever possible, the code that generates the given selection appears immediately above the diagram. Let’s begin. #A Subclass of Array You were probably told that selections are arrays of DOM elements. #Grouping Elements. Hierarchy for D3.js.


Tutorials. Getting Started with D3: Safari Books Online. Learning D3 Part 1: Selections, Properties, Data. Update: I’m releasing a series of screencast tutorials on D3 at

Learning D3 Part 1: Selections, Properties, Data

Check it out and let me know what you think! I thought I’d take a stab at learning D3, the JavaScript data visualization library. To start, I picked through some of the examples and tried the code running in my own browser. Once I played around with some of the code and saw a sine wave drawn on the screen, modified some values and saw the change, I thought “awesome!”. Then I went back to the website and the info started to actually click. LondonJS: 11 Things You Didn't Know About D3' LondonJS, 21/10/13 I'm a freelance web developer Anna Powell-Smith 11 THINGS I DIDN"T KNOW ABOUT d3... ...until I sat down and read the entire API docs Photo by river2sea on Flickr JavaScript library for data visualisation One JavaScript file, 145KB minified, BSD licensed Launched late 2010, now the 6th most-starred library on GitHub Used in production by New York Times, GitHub, Square...

LondonJS: 11 Things You Didn't Know About D3'

Source: Mike Bostock (click to start) D3.js Playground. Sorting a selection in d3.js disturbs the data-join. API Reference · mbostock/d3 Wiki. Wiki ▸ API Reference.

API Reference · mbostock/d3 Wiki


Chained Transitions. Selections. Arrays. Interactive Data Visualization for the Web. Contrary to what the name implies, D3 layouts do not, in fact, lay anything out for you on the screen.

Interactive Data Visualization for the Web

The layout methods have no direct visual output. Rather, D3 layouts take data that you provide and remap or otherwise transform it, thereby generating new data that is more convenient for a specific visual task. It’s still up to you to take that new data and generate visuals from it. Here is a complete list of all D3 layouts: Bundle Chord Cluster Force Histogram Pack Partition Pie Stack Tree Treemap In this chapter, I introduce three of the most common: pie, stack, and force. If you are curious about any of the other D3 layouts, check out the many examples on the D3 website, and be sure to reference the official API documentation on layouts. D3. <div id="js_warning"><strong>JavaScript is turned off, so this page won&rsquo;t be very interactive.


</strong> Switch JavaScript back on in your web browser for the full experience. </div> These tutorials have been expanded into a book, Interactive Data Visualization for the Web, published by O’Reilly in March 2013. Purchase the ebook and print editions from O’Reilly.


Stacked Bar. Animations and transitions. That post originally appeared on, I’m reproducing it here for clarity and ease of retrieval In interactive visualisation, there is the word reactive.

animations and transitions

Well, maybe not literally, but close enough. The fact is that reactivity, or the propension of a visualisation to respond to user actions, can really help engage the user in a visualisation, and help them understand its results. Both of which are usually good things. And how can this reactivity be achieved? So I’ll go ahead and state that animation, if done right, can make any interactive data visualization better.. When coupled with interaction, it’s a very useful way to give feedback to the user. That’s said, animation can definitely ruin your visualization, too. Path Tween. Smooth Slider. D3, Conceptually - Lesson 0: Preface. If you don't know what D3 is, the short answer is "a Javascript library people use to make cool charts".

D3, Conceptually - Lesson 0: Preface

d3: scales, and color. In protovis, scales were super-useful in just about everything. That much hasn’t changed in d3, even though d3.scale is a bit different from pv.Scale. (do note that d3.scale is in lowercase for starters). Scales: the main idea Simply put: scales transform a number in a certain interval (called the domain) into a number in another interval (called the range). For instance, let’s suppose you know your data is always over 20 and always below 80. But what if you suddenly have more or less space? El Patrón de los Números Primos: Prime Number Patterns. By Jason Davies. For each natural number n, we draw a periodic curve starting from the origin, intersecting the x-axis at n and its multiples. The prime numbers are those that have been intersected by only two curves: the prime number itself and one.

Below the currently highlighted number, we also show its sum of divisors σ(n), and its aliquot sum s(n) = σ(n) - n, which indicate whether the number is prime, deficient, perfect or abundant. Brush Handles. Orthographic Shading. Lab and HCL Color Spaces. D3 supports CIELAB (Lab) and CIELCH (HCL) color spaces, which are designed for humans rather than computers. Lab and HCL color spaces are special in that the perceived difference between two colors is proportional to their Euclidean distance in color space. This special property, called perceptual uniformity, makes them ideal for accurate visual encoding of data. In contrast, the more familiar RGB and HSL color spaces distort data when used for visualization. Vis.