Live data from Hacker News

HTML5 Map of the the World Migrations using SVG, Raphael.js and offline storage

migrationsmap.net

1–10 of 67 posts

Re: HTML5 Map of the the World Migrations using SVG, Raphael.js and offline storage

#6

Very nice. I was wondering how difficult it would be to capture a particular state of the map (say UK departures) as a PNG for embedding or generating a PDF. Could you do that on the server side?

The site is currently javascript only, the server is only serving static files, and the svg tags are generated in the browser using Raphael.js.

That said, I have already been pondering about this for a previous projects: http://populationpyramid.net and there are solutions : either export the svg tags through an ajax query to a server that would then render it as PNG, or create a script that would create the svg files directly from the data. I did not take time to implement this, though (I have to sleep sometimes...)

Re: HTML5 Map of the the World Migrations using SVG, Raphael.js and offline storage

#7
Nice and interesting, well done! I also like the offline caching feature.

The only tiny imperfection I see it's in the lines connecting two countries, I'd like to see an arrow so I know if I'm looking at arrivals or departures.

Is there a way to filter the GMO database to see only the current migration flow (say, last 5 years)?

Re: HTML5 Map of the the World Migrations using SVG, Raphael.js and offline storage

#8
post #7

Nice and interesting, well done! I also like the offline caching feature. The only tiny imperfection I see it's in the lines connecting two countries, I'd like to see an arrow so I know if I'm looking at arrivals or departures. Is there a way to filter the GMO database to see only the current migration flow (say, last 5 years)?

I have tried to add arrows at some point, but it cluttered the visualization too much (especially for countries where migrations are quite local : limited to border-sharing countries).

That said, there may be a solution I did not think about.

Re: HTML5 Map of the the World Migrations using SVG, Raphael.js and offline storage

#9
This is really informative, and very well done to boot. Great work!

The colour scheme struck me as a little odd, though. It goes from darker (more migration) to lighter (less migration) but then abruptly to dark grey (no migration), making it harder to interpret at first glance. It would be nice if it were somewhat monotonic: bright colour = more migration, darker/duller colour = less migration, dark grey = no migration.

Re: HTML5 Map of the the World Migrations using SVG, Raphael.js and offline storage

#10
post #8
post #7

Nice and interesting, well done! I also like the offline caching feature. The only tiny imperfection I see it's in the lines connecting two countries, I'd like to see an arrow so I know if I'm looking at arrivals or departures. Is there a way to filter the GMO database to see only the current migration flow (say, last 5 years)?

I have tried to add arrows at some point, but it cluttered the visualization too much (especially for countries where migrations are quite local : limited to border-sharing countries). That said, there may be a solution I did not think about.

You could over impose three dotted lines with a different color/dot-spacing to each connecting line, then set a timeout and alternate their visibility accordingly, so you can get a "dots flowing inside the line" effect. Not sure if this can work with canvas though.
Post reply on HN