File:IPhO-2016 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: 77 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 47. International Physics Olympiad 2016 in Zurich, Switzerland. Only the 50 best performing teams out of 84 are shown. The cutoff marks were 39.8 for gold, 30.7 for silver, 22.7 for bronze and 17.5 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
from scipy import array, interpolate

# Average score of students at the IPhO 2016 by country, out of 50 points maximum
averages = [
['China', 46.26], ['South Korea', 45.16], ['Taiwan', 42.32], ['Russia', 41.56], ['USA', 39.48],
['India', 39.04], ['Singapore', 39.], ['Thailand', 38.7], ['Japan', 38.14], ['Romania', 37.88],
['Indonesia', 36.48], ['Hong Kong', 35.5], ['Vietnam', 35.48], ['Iran', 34.6], ['Hungary', 34.28],
['Ukraine', 33.72], ['Germany', 33.5], ['Serbia', 31.74], ['Israel', 30.8], ['Slovakia', 30.48],
['Brazil', 30.26], ['Australia', 29.7], ['Turkey', 29.4], ['Finland', 29.14], ['Armenia', 29.1],
['United Kingdom', 28.72], ['France', 28.48], ['Belarus', 28.34], ['Kazakhstan', 28.28], ['Canada', 26.56],
['Lithuania', 25.9], ['Bulgaria', 25.84], ['Poland', 24.9], ['Austria', 24.8], ['Estonia', 24.6],
['Saudi Arabia', 24.52], ['Czech Republic', 24.42], ['Italy', 24.16], ['Slovenia', 24.06], ['Mongolia', 23.5],
['Netherlands', 23.26], ['Spain', 22.82], ['Macao', 22.8], ['Bosnia and Herzegovina', 22.5], ['Croatia', 21.76],
['Switzerland', 21.44], ['Sweden', 21], ['Latvia', 20.5], ['Moldova', 19.7], ['Azerbaijan', 18.6]
# ranks 51 to 84 not listed.
]

colors = array([(1,1,1), (.4,.6,1), (.87,.54,.25), (.7,.7,.7), (1,.8,0)])
cutoffs = array([0, 17.5, 22.7, 30.7, 39.8])
colorfun = 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()
    ytext = 5
    if i == 0: ytext = -7
    elif i == 1: ytext = -33
    ax.annotate(averages[i][0],
                xy=(bar.get_x() + bar.get_width() * 0.65, height),
                xytext=(0, ytext),
                textcoords="offset points",
                ha='center', va='bottom', rotation='vertical')

plt.xlim(0.3, 50.7)
plt.ylim(0, 50)
plt.xticks([1] + list(range(5, 51, 5)))
plt.xlabel('country')
plt.ylabel('student average score')
plt.title('47. IPhO 2016 results by country')
plt.tight_layout()
plt.savefig('IPhO-2016_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
current21:27, 31 July 2019Thumbnail for version as of 21:27, 31 July 2019720 × 480 (77 KB)Geek1337 (talk | contribs)User created page with UploadWizard

There are no pages that use this file.

Metadata