Decimal comma or decimal point? A googleVis visualization

June 9, 2014
By

(This article was first published on DataCamp Blog » R, and kindly contributed to R-bloggers)

As you all know, the decimal mark is a symbol used to separate the integer part from the fractional part of a number written in decimal form. Since I am born and raised in Continental Europe I am quite found of using the comma sign to indicate a decimal point. I’ve been growing up with it all my life, encountered this comma in both my literary and numerical escapades, and still shudder when thinking of its dual role in long divisions.

However, using the comma sign as a decimal mark has two consequences:

  • Since the comma “,” sign is already taken to mark the radix point, I’m obligated to use the dot “.” sign to separate the thousands.
  • As the comma “,” sign is only used by 24% of the world’s population, 76% of the people in the world are creating documents, writing texts, typing in working in spreadsheets, etc. that contain numbers with a fractional part that looks different from mine.

While the first consequence is the inevitable sacrifice one must make for having the privilege to use the comma for fractional numbers, the second is a much harder obstacle to deal with in the real world of professional number crunchers. More than necessary, I find myself struggling with sheets and documents that use the dot “.” sign to mark the radix point instead of my beloved comma. Why that often? Based on Wikipedia, roughly 60% of the world’s populations uses the dot “.” sign to mark the radix point. And when looking for these numbers, I learnt there are even more dissidents. In the Arab world they use the Arabic decimal separator for Eastern Arabic numerals, in Persian the decimal mark is called momayyez, and in English Braille the decimal mark even has its own sign…

Since politely asking these people to change their disrupting behavior will most likely be hopeless, and finger pointing is only a prerogative of the majority, I was forced to make myself a little tool to guide me through of what at the beginning looked like an insurmountable problem. Using the data I found on Wikipedia, I created with the help of the googleVis package a world map indicating the decimal separator used in each country. That way, depending on the origin of the sheet I receive, I always know what decimal mark to expect.

The map (full-size) is not yet complete (mainly in Africa there are some blank spots left). So for those that are aware of the prevailing decimal mark culture in these regions, just let me know in the comment section and I’ll make sure to update them in case of a comma, or to proselytize them otherwise ;-). You can find the original code here.

To leave a comment for the author, please follow the link and comment on his blog: DataCamp Blog » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.