Call Windows Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Saturday, 8 June 2013

interaction with d3

Posted on 14:35 by Unknown
My explorations of the d3 data visualisation library for JavaScript continue.  Last weekend I dipped my toe in the water, and drew some simple rainfall charts.  The code was clunky, and the data was hardwired, but the charts were pretty enough to convince me to continue.

And so this weekend I've explored some more.  I've modified the code to read in the data from a csv file, and then refactored like mad to make it more elegant.  The result of half a day's work was a web page indistinguishable (on the surface) from before: but now the charts, and the headings, are generated from the csv file data, so I can add more data each month, and the page will update without any code having to change.  So, a success.

Then I decided to add a little bit of interaction: changing the colour of a bar or spot on mouse-over, and showing the actual data value.  The d3 library is powerful enough that it was very easy to do.

in May 2007 we had 76mm of rain

in July 2009 we had 63mm of rain
So that's some tasks completed off my to-do list.  I've still got a long way to go.  But, as when I was learning Python, I'm finding StackOverflow an invaluable resource.

The actual web page is here, but it may change over time as I add more functionality.
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in graphics, statistics, weather, web | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • hyperbolic hyperbole
    What's with hyperbolic discounting? It's everywhere ! I first consciously noticed the term at a workshop about six weeks ago, and n...
  • better use seaweed
    As Neils Bohr is alleged to have said , “prediction is very difficult, especially about the future”. My smartphone has a weather app on it t...
  • "Windows support" -- not
    Just had another scam phone call -- someone with a strong Indian accent claiming to be calling from "Windows Technical Support" (o...
  • national stereotypes
    I've just got back from a very productive three day meeting in Paris. Just around the corner from where I was working, there was a marv...
  • retrospective holiday diary day 1: travelling north
    We went to the Lake District last “summer” ; this “summer” it was time for touring the other side of the country: Northumbria. The holiday s...
  • retrospective holiday diary day 5: trains
    Monday 24 September, and the long-threatened rain finally arrived. So this was the ideal day for the planned Carlisle-Settle rail trip . Bu...
  • oh dear
    We have a garden pond to help encourage frogs and other amphibians. Hedgehogs may suffer, however. :-(
  • funfair mirror trees
    One of the trees in our garden has died.  It died last summer in the drought, but we gave it a year to prove to us it really was dead.  It i...
  • retrospective holiday diary day 3: Lindisfarne
    Saturday 22 September, and the weather was still fine, sunny holiday weather so we decided to take advantage of the sunshine, and do Lindisf...
  • more scammers
    So not long after the scam phone call , the phone rings again. It's British Gas -- they get to call me because I'm actually a custo...

Categories

  • 3D printer
  • algorithm
  • astronomy
  • birds
  • Bonnie Tyler
  • books
  • cognition
  • computer
  • conference
  • Doctor Who
  • driving
  • ducks
  • duodecimal
  • education
  • electricity
  • estimation
  • Evernote
  • evolution
  • font
  • food
  • fractals
  • game
  • garden
  • graphics
  • grimoire
  • history
  • holiday
  • humour
  • language
  • LaTeX
  • lego
  • lol
  • mathematics
  • medicine
  • money
  • music
  • obituary
  • pedantry
  • politics
  • probability
  • psychology
  • publishing
  • python
  • quotations
  • research
  • robots
  • science
  • science fiction
  • space flight
  • statistics
  • TPS
  • trains
  • tree
  • TV
  • weather
  • web

Blog Archive

  • ▼  2013 (119)
    • ►  December (1)
    • ►  November (17)
    • ►  October (12)
    • ►  September (10)
    • ►  August (9)
    • ►  July (8)
    • ▼  June (10)
      • Unconventional Computation with Evernote
      • boxes, whiskers, and violins
      • book review statistics in d3
      • sequestering carbon, several books at a time V
      • Iain M. Banks, 1954-2013
      • rainfall statistics in d3
      • interaction with d3
      • sequestering carbon, several books at a time IV
      • my first d3
      • all the Doctors
    • ►  May (19)
    • ►  April (10)
    • ►  March (9)
    • ►  February (4)
    • ►  January (10)
  • ►  2012 (103)
    • ►  December (16)
    • ►  November (8)
    • ►  October (14)
    • ►  September (6)
    • ►  August (13)
    • ►  July (8)
    • ►  June (6)
    • ►  May (9)
    • ►  April (10)
    • ►  March (7)
    • ►  February (5)
    • ►  January (1)
  • ►  2011 (79)
    • ►  December (7)
    • ►  November (5)
    • ►  October (10)
    • ►  September (7)
    • ►  August (6)
    • ►  July (5)
    • ►  June (6)
    • ►  May (6)
    • ►  April (9)
    • ►  March (9)
    • ►  February (3)
    • ►  January (6)
Powered by Blogger.

About Me

Unknown
View my complete profile