File:IPhO-2018 average scores by country.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 720 × 480 pixels, file size: 81 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description
English: Unofficial bar diagram of average student marks by country at the 49. International Physics Olympiad 2018 in Lisbon, Portugal. Only the 50 best performing teams out of 86 are shown. The cutoff marks were 35 for gold, 27.2 for silver, 17.8 for bronze and 14.05 for a honourable mention (out of 50).
Date
Source Own work
Author Geek1337
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with Matplotlib.
Source code
InfoField

Python code

# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import scipy as sc

# Average score of students at the IPhO 2018 by country, out of 50 points maximum
averages = [
['China', 41.83], ['South Korea', 39.08], ['Russia', 38.11], ['India', 37.93], ['Singapore', 35.47],
['USA', 35.32], ['Taiwan', 34.59], ['Vietnam', 33.14], ['Thailand', 33.01], ['Israel', 32.7],
['Turkey', 32.21], ['Japan', 31.94], ['Romania', 30.17], ['Serbia', 30.08], ['Hong Kong', 29.31],
['France', 29.17], ['Indonesia', 28.56], ['Ukraine', 28.226], ['Iran', 28.09], ['Phillipines', 26.8],
['Brazil', 26.1], ['United Kingdom', 25.92], ['Hungary', 23.95], ['Germany', 23.25], ['Estonia', 23.05],
['Australia', 22.62], ['Italy', 22.6], ['Belarus', 22.12], ['Bulgaria', 22.1], ['Armenia', 21.6],
['Kazakhstan', 21.34], ['Czech Republic', 20.58], ['Canada', 20.19], ['Denmark', 20.1], ['Spain', 19.8],
['Saudi Arabia', 19.5], ['Mexico', 19.04], ['Bangladesh', 19], ['Tajikistan', 18.8], ['Lithuania', 18.75],
['Mongolia', 18.71], ['Croatia', 18.5], ['Slovakia', 18.5], ['Argentina', 18.4], ['Kyrgyzstan', 18.3],
['Malaysia', 18.1], ['El Salvador', 17.8], ['Slovenia', 17.7], ['Finland', 17.3], ['Latvia', 17.2]
# ranks 51 to 86 not listed.
]

colors = sc.array([(1,1,1), (.4,.6,1), (.87,.54,.25), (.7,.7,.7), (1,.8,0)])
cutoffs = sc.array([0, 14.05, 17.8, 27.2, 35.0])
colorfun = sc.interpolate.interp1d(cutoffs, colors.T,
    bounds_error=False, fill_value=tuple(colors[[0,-1]]))
bcolors = [colorfun(d[1]) for d in averages]

fig = plt.figure(figsize=(720 / 90.0, 480 / 90.0), dpi=72)
ax = plt.gca()

bars = plt.bar(range(1, len(averages)+1), [d[1] for d in averages],
               edgecolor='k', color=bcolors)

for i, bar in enumerate(bars):
    height = bar.get_height()
    ax.annotate(averages[i][0],
                xy=(bar.get_x() + bar.get_width() * 0.7, height),
                xytext=(0, 5),
                textcoords="offset points",
                ha='center', va='bottom', rotation='vertical')

plt.xlim(0.3, 50.7)
plt.ylim(0, 50)
plt.xticks([1] + range(5, 51, 5))
plt.xlabel('country')
plt.ylabel('student average score')
plt.title('49. IPhO 2018 results by country')
plt.tight_layout()
plt.savefig('IPhO-2018_average_scores_by_country.svg')

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current20:01, 31 July 2019Thumbnail for version as of 20:01, 31 July 2019720 × 480 (81 KB)Geek1337 (talk | contribs)User created page with UploadWizard

There are no pages that use this file.

Metadata