What is interessant in the format of this visualization is earth at the center that stresses the fact that we are talking about world wide statistics.
We can also notice how internet growth in China is presented as a subset of the first graph.
eric.mariacher@gmail.com
1 import static ch.lambdaj.Lambda.*;
2 import ch.lambdaj.group.*;
3 import java.util.List;
4 import java.util.Arrays;
5 import java.util.Set;
6
7
8 public class Europeans1 {
9
10 static List<People> l_europeans = Arrays.asList(
11 new People("Eric", "France"),
12 new People("Martine", "France"),
13 new People("John", "Great-Britain"),
14 new People("Martha", "Great-Britain"),
15 new People("Carine", "France"),
16 new People("Gerd", "Deutschland"),
17 new People("Giuseppe", "Italia"),
18 new People("Martha", "Deutschland"));
19
20 public static void main(String[] args) {
21 System.out.println("European people: "+l_europeans);
22 Group<People> g_countries = Groups.group(l_europeans,
23 Groups.by(on(People.class).getNationality()));
24 Set<String> set_countries = g_countries.keySet();
25 System.out.println("European countries: "+set_countries);
26 for(String s_country:set_countries) {
27 print_inhabitants(s_country);
28 }
29 }
30
31 static void print_inhabitants(String s_country) {
32 System.out.print("People from "+s_country+": ");
33 List<People> l_inhabitants = select(l_europeans,
34 having(on(People.class).getNationality(),
35 org.hamcrest.Matchers.equalTo(s_country)));
36 forEach(l_inhabitants).printFirstName();
37 System.out.println("");
38 }
39 }