{"id":2321,"date":"2008-09-05T11:13:49","date_gmt":"2008-09-05T16:13:49","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2008\/09\/05\/olympic-medals\/"},"modified":"2016-05-18T17:06:52","modified_gmt":"2016-05-18T21:06:52","slug":"olympic-medals","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2008\/09\/05\/olympic-medals\/","title":{"rendered":"Olympic medals"},"content":{"rendered":"<div class=\"content\">\r\n\r\nBob's pick this week is <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=21117 (link no longer works)\">Summer Olympic Medals 1896-present<\/a> by Bill McKeeman.\r\n\r\n&nbsp;\r\n\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/chinarussiaus.jpg\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n\r\nThe data source is Wikipedia, which Bill references. I find his plots much more interesting than staring at tabular data.\r\nHis approach to coding this example underscores how many ways there can be to solve a problem. I know my own approaches have varied widely\r\nover the years, usually dictated by time spent and knowledge level at the time.\r\n\r\n<b>Comments?<\/b>\r\n\r\nHow do you approach analysis problems like this? Tell us about it <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2321#respond\">here<\/a>.\r\n\r\n<script>\/\/ <![CDATA[\r\nfunction grabCode_7b09366bb88b4721b934ecaffbed3a3e() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='7b09366bb88b4721b934ecaffbed3a3e ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 7b09366bb88b4721b934ecaffbed3a3e';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Robert Bemis';\r\n        copyright = 'Copyright 2008 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('\r\n\r\n\r\n\r\n<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\r\n\r\n\r\n\r\n\r\n\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }\r\n\/\/ ]]><\/script>\r\n<p style=\"text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;\"><a><span style=\"font-size: x-small; font-style: italic;\">Get\r\nthe MATLAB code\r\n<noscript>(requires JavaScript)<\/noscript><\/span><\/a><\/p>\r\nPublished with MATLAB\u00ae 7.7\r\n\r\n<\/div>\r\n<!--\r\n7b09366bb88b4721b934ecaffbed3a3e ##### SOURCE BEGIN #####\r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadAuthor.do?objectId=969735&objectType=author % Bob>'s pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=21117 Summer Olympic Medals 1896-present>\r\n% by Bill McKeeman.\r\n%%\r\n% <<..\/images\/pick\/chinarussiaus.jpg>>\r\n%%\r\n% The data source is Wikipedia, which Bill references. I find his plots much\r\n% more interesting than staring at tabular data. His\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/files\/21117\/content\/olympics\/html\/OlympicDemo.html approach>\r\n% to coding this example underscores how many ways there can be to solve a\r\n% problem. I know my own approaches have varied widely over the years,\r\n% usually dictated by time spent and knowledge level at the time.\r\n%%\r\n% *Comments?*\r\n%%\r\n% How do you approach analysis problems like this? Tell us about it\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2321#respond here>.\r\n\r\n##### SOURCE END ##### 7b09366bb88b4721b934ecaffbed3a3e\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n\r\nBob's pick this week is Summer Olympic Medals 1896-present by Bill McKeeman.\r\n\r\n&nbsp;\r\n\r\n\r\n\r\nThe data source is Wikipedia, which Bill references. I find his plots much more interesting than... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2008\/09\/05\/olympic-medals\/\">read more >><\/a><\/p>","protected":false},"author":46,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2321"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2321"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2321\/revisions"}],"predecessor-version":[{"id":7411,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2321\/revisions\/7411"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}