Decimal comma or decimal point? A googleVis visualizationJune 9th, 2014 in R Programming
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 was born and raised in Continental Europe, I am quite fond of using the comma sign to indicate a decimal point. I've grown up with it, 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 that 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… So it gets difficult to know whether to user a decimal comma or decimal point. 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 and with the help of the googleVis package, I created a world map that indicates the decimal separator that is used in each country. That way, depending on the origin of the sheet I receive, I always know whether to use a decimal comma or decimal point. [iframe src="http://assets.datacamp.com/blog_assets/the_map.html" width="100%" height="300"] 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.
No comments yet. Be the first to respond!