Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

22 May 2013

Drawing a Timeline with jquery.

In 2008, I wrote a XUL-based interface displaying a timeline (http://...freebase-and-history-of-sciences.html).
History of Sciences / Freebase
Here I've played with jquery to display another timeline:

html

There is no json data: everyting is stored in the HTML. The years are surrounded by a <span/> element having a css class "start/end".


javascript

We use jquery to sort and layout each event.

CSS

A basic CSS for my timeline

Result


It's far from being perfect. I don't know how to handle the images overflowing the "div".

That's it,

Pierre


29 October 2010

Revisions=f(time): and the winner is Charles Darwin

I've been playing with the mediawiki API to draw a timeline of popular scientists through the last centuries using the number of revisions in wikipedia as the Y-axis. The java code generating this timeline is available here:WikipediaBioEdits.java. This code:

  • loops over the articles having a Template:infobox scientist
  • gets the categories of an article and retrieves the birth/death dates threw the categories 'Births_by_year' and 'Deaths_by_year'
  • gets one picture in an article an resizes it to 64px
  • counts the number of revisions for an article


At the end, the generated timeline looks like this: (best viewed with firefox):
1192196227323502427250425812658273528122152515791633168717411795184919031957

That's it

Pierre