
A tour of the world in d3.js - r4vik
http://bl.ocks.org/4183330
======
bryogenic
Now all it needs is the Animaniacs to sing along with it
[<http://www.youtube.com/watch?v=IDtdQ8bTvRc>]

~~~
r4vik
it can be arranged: <http://bl.ocks.org/4185745>

~~~
cjfont
Cute, now synchronize it with the song ;)

------
maxadim
A very impressive demo. Almost equally impressive is the fact that this can be
done in less than 100 lines of (relatively readable) Javacsript.

~~~
teamonkey
Readable, yes, but also hard to understand.

~~~
pretoriusB
If you learn 5-10 basic notions of D3, like ranges, domains, interpolations,
joins, etc, it will be quite easy to understand.

------
jskopek
There's a risk of turning it into too much of a gimmick, but I'd love if
travel sites started doing things like this. Showing you a flythrough of where
you'll be going as they pull up trip prices, for example

------
elisehein
Unrelated, but does anyone have an idea why all of the countries appear in
alphabetical order but then suddenly Spain jumps up in the middle of all the
E-s? The UK follows soon after. All I could think of was Spain=Espana, but
England definitely isn't the same as the UK..

~~~
mbostock
This is the order they are defined in the source data (Natural Earth - Admin 0
countries), and it appears to be sorted by ISO 3166-1 alpha-3 code. Spain is
ESP, United Kingdom is GB1.

~~~
pav3l
Thanks for D3, learning it now and it is awesome!

------
Groxx
Is it just me, or is there something odd about the projection? I think it's a
little too flat... it feels weird.

That aside, very neat. Yet more motivation to learn d3.

~~~
r4vik
You're right, Jason has fixed it as you can see here:
<http://bl.ocks.org/4183701>

~~~
mbostock
Jason didn't change the projection; Jason used a better interpolator
(following great arcs rather than linear interpolation of angles as I was
doing). The projection looks flat because it's an orthographic projection
rather than a perspective projection.

------
neya
This is a classic example of where Flash excels over the over-hyped HTML 5.
The demo is very very sluggish and laggy on my Laptop (Chrome, WIN 8, C2D
2.2GHZ, 4mb Cache, 4Gigs RAM). If the author had designed the same thing in
Flash,

1) He could have done it with less lines of code.

2) He could have done it with smoother animations and could have added more
interactivity.

I'm not bashing the author, just suggesting a viable alternative.

Unfortunately, the unwanted HTML5 hype is just killing the platform. And the
platform (I personally believe) is in the wrong hands, because they haven't
marketed it well (IMO).

~~~
Groxx
Runs quickly here, doesn't need to be compiled, source can easily be viewed
and edited (while it's running, depending on your browser), and style-able
with CSS.

Flash does _one_ of those, and for the same reasons as HTML5 solutions, its
speed depends heavily on the code backing the drawing and how much data is
displayed. Why do I want Flash again?

~~~
neya
To make animations like these on Flash, it's just a breeze, period. I own an
Adobe creative suite in which Flash is available. The bundled Flash IDE (which
was originally popularly called as Flash) is a lot lot better than say,
writing hundreds of complex lines of mathematical lines to create just a 3d
rotation or tween.

~~~
Groxx
Did you look at the source below the globe? That entire thing is 73 very short
lines of code, plus a plain HTML wrapper and some super-simple CSS.

~~~
neya
If you consider 73 to be short, then I wonder what you would think of 10-15
lines of code. Not to exaggerate, but you can actually achieve this with 0
lines of code in Flash using just Movie clips.

~~~
danso
Uh...this is jus a basic demo. I'm betting this is far easier to work into an
interactive mash up with data than Flash's movieclips

~~~
neya
No, wrong. I assume you haven't used the Flash platform. A movie clip is like
a library that can be replicated and instances of which, as many as you want
can be created. Similar to creating a variable and calling it how many ever
times you want it. So, in an interactive mesh-up movie clips will help you
stay well organized with fewer lines of code, comparatively.

~~~
danso
Nope, I programmed in AS for awhile though I left before Flex became well
implemented.

I know about the movie clip system and don't deny what you claim. But now
you're moving the goalposts as decoupling the elements from the Flash
environment requires you to do more, well, hand coding. To do what you claim
-- implement the same features with less code -- would require more handiwork
inside the Flash authoring tool, which was never really a fun workflow even
when Flash was more ubiquitous.

In any case, lowering the code count by relying on MovieClips, which as you
say are basically libraries, hardly seems fair. I'm sure all the code in the
OP could be reduced to about five lines, three of them being calls to external
code and CSS files.

~~~
neya
Flex and Flash are two different things. Flash is a designer-friendly tool,
while flex is more programmer-oriented. From what you describe, it looks like
you've been doing more coding with the platform than _designing_.

Dude, you serious? I can build you something similar in just 5 mins with 0
lines of code with easier maintainability and no calls to external CSS or
Code.

>which was never really a fun workflow

I am surprised, because it was one of the most powerful features of flash,
just like layers were for Photoshop. Maybe it's a personal opinion, but I
loved this workflow personally.

~~~
killahpriest
5 minutes, go!

~~~
neya
Serious? You want to do a screenshare with me, mate? I can do it \m/ :D

------
tunetosuraj
I didn't know France was in Europe AND South America. Weird world tour.

~~~
2468ben
It owns French Guiana, so that's why that part of South America's highlighted.
Also some of the country names are based on what the country actually calls
itself, which is why Spain (Espana) shows up in the E section. Why the
alphabetical name and the displayed name are different? That's weird.

------
kyro
Jesus, Russia.

------
sneak
The framerate is abysmal on an iPad3.

~~~
turtlebits
Did you not know there is an iPad4? I think you need to upgrade :)

~~~
sneak
I can't order the CDMA model to where I am right now, and I won't be stateside
until next month.

I know, it bothers me too.

