Live data from Hacker News

Show HN: Weekend project, D3.js Globe of Recent Earthquakes

boydgreenfield.com

11–20 of 31 posts

Re: Show HN: Weekend project, D3.js Globe of Recent Earthquakes

#12
post #11

nice, but what's the arc for down the right hand side of the globe?

Aesthetics?

ah, well, i guess that's valid. i was thinking it must be something to do with sunrise or time or something... (you can tell how appreciative i am of aesthetics, in that i prefered the previous usgs site to the recent update)

[edit, since i can't reply directly, and probably shouldn't string out a long thread anyway: i do agree with your choice, it looks good as it is. i just assumed it meant something. not sure how you avoid that.]

Re: Show HN: Weekend project, D3.js Globe of Recent Earthquakes

#13
post #8

Really nice. It doesn't always auto play, and clicking play/pause doesn't make it work (happened twice to me in five refreshes on Chrome). When it said "Highlight an earthquake..." I was nervous I would have to follow those little circles with my mouse while trying to read the information, but it works well! The earth quake zones just popping into view looks a little goofy. Is there any way to fade them in, or have t…

Thanks! Yeah... I'm trying to fix that bug (related again to JSONP), but wanted to post it here in the meantime. And planning to move from circles -> svg:paths with the next D3.js release (they've rewritten / fixed the geographic clipping functions).

just clipping the circles with the outer ring might help. when i did this - http://www.acooke.org/arms.html - i tried to make the ellipses the correct shape, but it's non-trivial for extended ellipses on a curved surface (although yours are small so perhaps that's not an issue). anyway, the big breakthrough in making it look natural was to simply clip at the edge of the globe.

Re: Show HN: Weekend project, D3.js Globe of Recent Earthquakes

#14
post #11

Earlier quoted context omitted.

Aesthetics?

ah, well, i guess that's valid. i was thinking it must be something to do with sunrise or time or something... (you can tell how appreciative i am of aesthetics, in that i prefered the previous usgs site to the recent update) [edit, since i can't reply directly, and probably shouldn't string out a long thread anyway: i do agree with your choice, it looks good as it is. i just assumed it meant something. not sure how…

Yeah, I go back and forth on it. It just looks visually unbalanced without some kind of weight in the globe IMO.

Re: Show HN: Weekend project, D3.js Globe of Recent Earthquakes

#17
It's really cool. Care to explain why do you have http://mbostock.github.com/d3/d3.v2.min.js in header that has only one line - links to actual d3 at http://d3js.org/d3.v2.min.js? Am I missing some reasoning behind this? It doesn't seem very reasonable. Adds two unnecesary hops to two different domains? If you dont want to host d3 why not just reference it directly in header from d3js.org?

Edit: Oh, and how you distort svg to make it look spherical while dragging? This is very cool.

Re: Show HN: Weekend project, D3.js Globe of Recent Earthquakes

#18

Looks great, well done. One nitpick I have is that earthquakes are no longer measured on the Richter scale, but rather the Momentum magnitude scale. See http://www.usgs.gov/faq/index.php?sid=54684&lang=en&...

Thanks for pointing that out. Updated.

Re: Show HN: Weekend project, D3.js Globe of Recent Earthquakes

#19
post #16

I know it's based off D3.js but is the rest of the code open source? I'd like to use it for a project and credit you. The most advanced I've found open so far is just a base rotating D3.js globe ( http://bl.ocks.org/d/1246403/ ).

It can / will be. I just have a really messy commit log as I was editing files from Github manually from another machine (not a good strategy...).

Email me at boyd.greenfield at gmail and I'll get you the source if you'd like to chat about it. Otherwise I'll get to opening it up and adding an (open) license shortly.

Re: Show HN: Weekend project, D3.js Globe of Recent Earthquakes

#20
post #17

It's really cool. Care to explain why do you have http://mbostock.github.com/d3/d3.v2.min.js in header that has only one line - links to actual d3 at http://d3js.org/d3.v2.min.js ? Am I missing some reasoning behind this? It doesn't seem very reasonable. Adds two unnecesary hops to two different domains? If you dont want to host d3 why not just reference it directly in header from d3js.org? Edit: Oh, and how you dist…

I hadn't noticed that re-direct. Thanks and fixed.

All of the SVG magic is D3.js and simply modified from this sweet example by Mike Bostock: http://mbostock.github.com/d3/talk/20111018/azimuthal.html

Edit: Oddly, I'm noticing that the title of Mike's page is "Afghanistan", which is the one country in the GEOJSON I'm using that doesn't render properly... (it shows empty like a 2nd Caspian Sea)

Post reply on HN