Dummy Nodes in d3 Sunburst Charts

I recently started working at Stanford, and have gotten the opportunity to look at lots of interesting data.  Thanks to the awesome example at http://bl.ocks.org/mbostock/4348373, I started implementing the zoomable sunburst partition layout.  Eventually, I ran into a problem.  Very large numbers were being drawn to the total value of their children, even when that sum was a small fraction of the total (due to a large numbers of “others,” which were not included in the dataset).

I wanted all the nodes to render to their own scaled value, and allow the children to only take a portion of their parents’ sizes.  After reading about the problem at https://github.com/mbostock/d3/pull/574, I went about implementing the “dummy node” solution.  I’ll post my solution, shortly.

QuackyCharts now drawing line graphs.

A few months ago, I released a gem called quacky-charts, which could be used to draw pie charts in Rails apps.  Last night, I added a feature which allows you to draw line graphs.  The graphs are still pretty ugly, but the basic features are in place.  Improving their appearance should be pretty easy from here.  More importantly, I made a site for documentation.  Check it out at http://www.quacky-charts.com/.

StreetCred working example… kinda

After fiddling with StreetCred (a gem to handle Facebook credit integration) for a few weeks, I have a basic version available, as well as a working example at https://github.com/ragingsquirrel3/feed_the_giraffe, with some disclaimers.

Right now, the callback response is static.  The next feature I will need to add is the ability to specify product information.  For now, however, the example will stand as a proof of concept.

Revisiting streetcred

A few months ago I posted about the difficulties integrating Facebook credits with Rails applications, and suggested that a gem could potentially be used to simplify the callback action.  Right now, I am working on just that!  I’m working on this gem, which I call streetcred (at https://github.com/ragingsquirrel3/streetcred).  My goal for this project is to create a simple ‘handler’ object which can be initialized in the callback action.  This handler, out of the box, will correctly respond to multiple requests from the Facebook Credits Dialogue with simple Lorem Ipsum type content.  This content will be easily configurable.  

So far, it’s just some specs and basic gemspec stuff.  We’ll see how it goes… 

quacky-charts, one week in

Last week, I published a very basic version of quacky-charts, a gem that I’ve been working on.  The goal of quacky-charts is to give Rails developers the ability to build pie charts using client-side tools (D3, for now), and configure them using a simple, Ruby syntax.  My plan for quacky-charts is to make it work well for pie charts, and then try to add some additional chart and graph types once I’m comfortable with the pie chart builder.  In the past week, I’ve accomplished some goals, including:

  • some basic RSpec tests
  • CoffeeScript D3 initialization drawing charts from data configured in the controller
  • clean configuration syntax

Next week, I’m going to work on some additional features.  Ideally, I’d like to get some sort of client-side testing framework in place.


Introducing quacky-charts, a gem to add D3 pie charts to Rails apps

I just started a new open-source project at https://github.com/ragingsquirrel3/quacky-charts. The goal is to provide a powerful, easy-to-use (and customize) tool for Rails developers to quickly add graphs to their apps. I know, there are a lot of tools out there already. However, I’ve found that most of the best tools (D3, Rickshaw.js) are JavaScript tools. I want to abstract these tools to move the configuration to Ruby. It will be perfect for Rails developers who don’t have the time or experience to configure these tools on the client-side.

Although the basic functionality is already there, it’s still VERY much a work in progress. So far, it only draws pie charts with random data. That will change very soon. Here are some things I want to achieve as soon as possible:

  • the ability to configure data from the controller, and have the chart draw itself based on that data
  • rspec testing
  • additional graph types

Stay tuned for updates!