Country Ranking Maps

Manipulate[Module[{co=CountryData[],polys,props,min,max},
polys=CountryData[#,{"SchematicPolygon",proj}]&/@co;
props=N[CountryData[#,p]&/@co/.Missing[_]:>0.];
min=Min[props];max=Max[props];
Style[
Column[{
Graphics[{
EdgeForm[Opacity[.5]],
Table[{
ColorData[col][1.-(props[[i]]-min)/(max-min)],
Tooltip[polys[[i]],Column[{co[[i]],props[[i]]}]]
},{i,Length[co]}]},
ImageSize->{400,200},Frame->True,FrameTicks->False,FrameStyle->LightGray,
Prolog->Raster[Table[i,{i,100},{j,100}],{Scaled[{0,0}],Scaled[{1,1}]},{1,100},ColorFunction->(Blend[{LightBlue,White},#]&)]
],
Pane[
Column[{
CountryData["US",p,"LongDescription"],
With[{mc=First@Extract[co,Position[props,max]]},
Row[{"maximum value: ",Style[max,Bold],Spacer[18],"country: ",Style[mc,Bold],Spacer[5],Show[CountryData[mc,"Flag"],ImageSize->30]}]]
}]
,{400,50},Alignment->{Center,Center}]
},Alignment->{{Center,Left}}],
10,"Label"]
],
{{p,"Population","property"},(#->CountryData["US",#,"Description"])&/@{"ArableLandFraction","BirthRateFraction","GDP","GDPPerCapita","HIVAIDSFraction","InternetUsers","MilitaryExpenditureFraction","OilConsumption","Population","PopulationGrowth","UnemploymentFraction"}},
{{proj,"Robinson","projection"},{"CylindricalEqualArea","CylindricalEquidistant","EckertIV","EckertVI","Equirectangular","LambertCylindrical","Mercator","MillerCylindrical","Mollweide","Robinson","Sinusoidal","VanDerGrinten","WinkelTripel"}},
{{col,"SolarColors","colors"},Table[g->Show[ColorData[g,"Image"]/.Raster[x__]:>Rotate[Raster[x],Pi],ImageSize->50],{g,{"SolarColors","DeepSeaColors","LakeColors","StarryNightColors","BlueGreenYellow"}}]}
,TrackedSymbols:>{p,proj,col}]

Choose a property related to countries, and see the world map colored by their ranks. Move the mouse over a country and a tooltip will show the value of the property.

Contributed by: Yu-Sung Chang