Live data from Hacker News

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

boydgreenfield.com

1–10 of 31 posts

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

#2
This looks beautiful, but it doesn't release my mouse click on Chrome; i.e. when I click on the globe to click & drag, the rotation of the globe keeps following my mouse, and I can't click the "play" button.

Nice project though, as a geo guy who's been meaning to play with D3, it's inspiring.

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

#3
post #2

This looks beautiful, but it doesn't release my mouse click on Chrome; i.e. when I click on the globe to click & drag, the rotation of the globe keeps following my mouse, and I can't click the "play" button. Nice project though, as a geo guy who's been meaning to play with D3, it's inspiring.

Yeah... that's a bug that I haven't been able to squash yet.

Particularly with high latency, it will sometimes fail to load the JSONP from the USGS. Because JSONP is a and I'm not properly catching the thrown error that causes D3 to bug out. I'm trying to get USGS to let me use CORS with the JSON files so I don't have to deal with the callback function of JSONP.

Oh - and refreshing the page should fix that! Thanks, and glad you like it.

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

#4
post #2

This looks beautiful, but it doesn't release my mouse click on Chrome; i.e. when I click on the globe to click & drag, the rotation of the globe keeps following my mouse, and I can't click the "play" button. Nice project though, as a geo guy who's been meaning to play with D3, it's inspiring.

And -- what kind of geo work do you do?

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

#5
post #3
post #2

This looks beautiful, but it doesn't release my mouse click on Chrome; i.e. when I click on the globe to click & drag, the rotation of the globe keeps following my mouse, and I can't click the "play" button. Nice project though, as a geo guy who's been meaning to play with D3, it's inspiring.

Yeah... that's a bug that I haven't been able to squash yet. Particularly with high latency, it will sometimes fail to load the JSONP from the USGS. Because JSONP is a and I'm not properly catching the thrown error that causes D3 to bug out. I'm trying to get USGS to let me use CORS with the JSON files so I don't have to deal with the callback function of JSONP. Oh - and refreshing the page should fix that! Thanks, a…

Also if you flip it upside down (drag over a pole) the side to side turns backwards.

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

#6
post #5
post #3

Earlier quoted context omitted.

Yeah... that's a bug that I haven't been able to squash yet. Particularly with high latency, it will sometimes fail to load the JSONP from the USGS. Because JSONP is a and I'm not properly catching the thrown error that causes D3 to bug out. I'm trying to get USGS to let me use CORS with the JSON files so I don't have to deal with the callback function of JSONP. Oh - and refreshing the page should fix that! Thanks, a…

Also if you flip it upside down (drag over a pole) the side to side turns backwards.

Indeed. It's actually updating the origin of the map projection with the animation, so it will always be spinning eastwards. That's why the globe will rotate clockwise if you center over the North Pole.

All of this can be changed in the JS parameters easily enough, however.

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

#7
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 them start as a line and transform into a circle (going through an ellipse). That might make it look a little cleaner on entry/exit.

Great work!

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

#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).

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

#10

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…

So... that should be fixed by making only a single JSONP request. The downside is that it now may miss a few quakes that are over the 5.5 threshold but USGS has not rated as significant (e.g., some offshore quakes I believe).

Let me know -- and I'd love to hear if anybody has suggestions for better catching JSONP callback-related errors.

Post reply on HN