Where are different languages spoken?

13

As you travel around the world, do you know where English, French, Spanish, and Arabic are spoken? This blog will help you quickly answer that question, with some cool SAS maps!

But first, here's a picture of my friend Joy posing beside an interesting sign during one of her international trips. Do you know what languages are used on this sign? Can you translate the message/warning? And for bonus points, if you can understand both languages, do they both say the same thing? :)

sign_language

And now, on to the SAS maps!

I recently saw a map animation on dadaviz.com, that cycled through 4 maps showing which countries English, French, Spanish, and Arabic are 'official languages' in. I liked the way the maps looked, but the animation aspect of it perplexed me - I would have much rather been able to study each map separately, and had hover-text over each country so I could see the country names.

So I set about creating my own version of the maps using SAS software. First I tracked down the lists of countries where each language is spoken (see the Wikipedia pages for English, French, Spanish, and Arabic), and read the lists into a SAS dataset. I then wrote a short macro that lets me pass in a language name and the color to use, and produces a beautiful map similar to Jishai's dadaviz map.

%macro do_map(language,color,outline);
 
ods html anchor="&language";
 
proc sql noprint;
select unique count(*) into :count separated by ' '
from my_data where upcase(language)=upcase("&language");
quit; run;
 
goptions gunit=pct htitle=15 htext=3.6 ftitle="albany amt/bold" 
 ftext="albany amt/bold" ctext=gray77;
 
pattern1 v=s c=&color repeat=500;
 
title1 ls=1.5 color=&color "&language";
title2 "is an official language in these &count countries...";
 
proc gmap data=my_data (where=(upcase(language)=upcase("&language"))) 
 map=my_map all;
id idname;
choro idname / nolegend 
coutline=&outline cdefault=grayf5 
cempty=grayf5 html=my_html
des='' name="&name._&language";
run;
 
%mend;

And then it was a simple matter of calling the macro 4 times - once for each language:

%do_map(ENGLISH,cx1976d2,cx4e9ce6);
%do_map(FRENCH,cxe91e63,cxf672a0);
%do_map(SPANISH,cxff5722,cxf9beac);
%do_map(ARABIC,cx009688,cx39d8c7);

Below are static images of the SAS maps - click them to see the full-size interactive versions with html hover-text that show the country names. Note that each map also has a count of the number of countries speaking that language. I think this is a much easier way to make sense of the data, than the animation.

official_language_by_country_english

official_language_by_country_french

official_language_by_country_spanish

official_language_by_country_arabic

 

And I'll leave you with an ironic picture that my friend Jennifer took, of an Arabic sign :)

sign_no_photo

 

Share

About Author

Robert Allison

The Graph Guy!

Robert has worked at SAS for over 20 years, and is perhaps the foremost expert in creating custom graphs using SAS/GRAPH. His educational background is in Computer Science, and he holds a BS, MS, and PhD from NC State University. He is the author of several conference papers, has won a few graphic competitions, and has written a book (SAS/GRAPH: Beyond the Basics).

13 Comments

  1. Barbara Malta on

    I think I could single out Haiti on the French language graph, but not Malta on the English graph.

    Malta has two official languages: Maltese and English. Maltese is also the national language. Until 1934 Italian was also an official language in Malta.

    Having been governed by many different countries in the past, the Maltese population carry linguistic imprints from many places. According to the Eurobarometer poll, 98% of Maltese people can speak Maltese, 88% can speak English, 66% can speak Italian, and more than 17% speak French.[1] This shows a recent increase in the fluency of languages, since in 1995, only 98% of the population spoke Maltese, 76% English, 36% Italian, and 10% French. Surprisingly, it also shows an increase in Italian fluency compared to when Italian was an official language of Malta.[2]

  2. Rob,
    I googled some of the color codes you used for your maps (cx1976d2, cx4e9ce6, etc.) and it brought back precisely one link: this webpage. Where do these codes come from?

    Thanks,

    • Robert Allison
      Robert Allison on

      I wanted to match the colors used in the original graph, so I used 'Pixeur' which runs on my PC and lets me click on a color in an image I'm viewing, and it then tells me the RRGGBB values. Pixeur also lets you modify the color, and gives you the RRGGBB of the new/modified color. I use Pixeur a lot, and I think it's a really handy tool for anyone creating graphs!

  3. Interesting. I was just having a convo with my brother and sister-in-law as to what non-English language is more popular. Can't really tell by these graphs though since I don't see population included. Can you please augment to include for population so we know what language to tell my nephew to study? :-) Thanks!

    • Robert Allison
      Robert Allison on

      Hmm ... if you're looking for the non-English language spoken by the most people, I think you might want to go with Chinese! :)

  4. It looks like Canada is on both the English and French maps. Is Canada like Maltese with two official languages?

Leave A Reply

Back to Top