Skip to content

Instantly share code, notes, and snippets.

@MilesCranmer
Last active June 18, 2017 11:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MilesCranmer/5384da02ef23b7f5fbdcf3c8286c56e8 to your computer and use it in GitHub Desktop.
Save MilesCranmer/5384da02ef23b7f5fbdcf3c8286c56e8 to your computer and use it in GitHub Desktop.
Nobel prizes by country, per capita and per scientist, post-1985 and post-1970

Rankings

First, let's look at just physics.

Since this is a lot less data to work with, we'll take prizes from 1970 onwards.

Country Nobels in Physics 2016 population (millions) Nobels per million
Denmark 2 5.7 0.350877193
Switzerland 2 8.29 0.241254524
Netherlands 4 16.9 0.236686391
US 64 321.4 0.199128811
UK 10 65.1 0.153609831
Germany 10 81.4 0.122850123
Canada 3 35.9 0.08356546
France 5 66.8 0.074850299
Japan 7 127 0.05511811
Russia 3 144 0.020833333
China 2 1371 0.001458789

Now, let's weight them so that 1970 is 0.5, and 2016 is 1,

with a linear gradient in between, so that we can still favour recent Nobels.

Country Weighted Nobels in Physics 2016 population (millions) Weighted Nobels per million
Denmark 1.108695652 5.7 0.194508009
Netherlands 3.217391304 16.9 0.190378184
Switzerland 1.358695652 8.29 0.163895736
US 48.66304348 321.4 0.151409594
UK 7.608695652 65.1 0.116877045
Germany 7.652173913 81.4 0.094007051
Belgium 0.967391304 11.29 0.085685678
Canada 2.467391304 35.9 0.068729563
France 4.119565217 66.8 0.061670138
Japan 6.152173913 127 0.048442314
Australia 0.945652174 23.8 0.039733285
Russia 2.27173913 144 0.015775966
China 1.72826087 1371 0.001260584

Now, without the statistically-insignificant numbers, this is

Country Weighted Nobels in Physics 2016 population (millions) Weighted Nobels per million
Netherlands 3.217391304 16.9 0.190378184
US 48.66304348 321.4 0.151409594
UK 7.608695652 65.1 0.116877045
Germany 7.652173913 81.4 0.094007051
Canada 2.467391304 35.9 0.068729563
France 4.119565217 66.8 0.061670138
Japan 6.152173913 127 0.048442314
Russia 2.27173913 144 0.015775966

Now, for all nobels in physics, chemistry, and economics post-1985. I distribute points by the country where the winner resided when they received it, not the birth country.

I also cut out all countries with < 2 nobels (statistically insignificant)

(code at the bottom)

Here is a list, sorted by Nobels per capita:

Country Nobels in Physics, Chemistry, or Economics (1985-) 2016 population (millions) Nobels per million people
Israel 8 8.4 0.952380952
Switzerland 4 8.3 0.481927711
United States 128 321 0.398753894
Norway 2 5.2 0.384615385
Hungary 3 9.8 0.306122449
Netherlands 5 16.9 0.295857988
United Kingdom 14 65.1 0.215053763
Germany 16 81.4 0.196560197
Canada 7 35.9 0.194986072
France 10 66.8 0.149700599
Japan 12 127 0.094488189
Australia 2 23.8 0.084033613
Russia and Soviet Union 2 144 0.013888889
China 3 1371 0.002188184

Here is another list, sorted by nobels per researcher:

Country Nobels in Physics, Chemistry, or Economics (1985-) Estimated number of researchers Nobels per thousand researchers
Hungary 3 16983 0.176647235
Switzerland 4 28518 0.14026229
Israel 8 82068 0.097480138
Netherlands 5 52204 0.095778101
United States 128 1496823 0.085514453
Norway 2 28433 0.070340801
Germany 16 287504 0.0556514
United Kingdom 14 277911 0.05037584
Canada 7 152934 0.045771379
France 10 233532 0.042820684
Australia 2 100531 0.019894361
Japan 12 707771 0.016954636
Russia and Soviet Union 2 459504 0.004352519
China 3 1468341 0.002043122

Scrape and Reduction

Data

The initial data was taken from "List of Nobel laureates by country". I manually parsed it into just category/year pairs by country in vim, then removed every row with an asterix (indicates birth country), then loaded this into python as one string.

Initial parsing in vim/ex:

(remove starting spaces)

VG100<<

Remove names and other comments (just want the year and category):

:%g/[0-9]\{4}/norm $F,F,d0

Remove leftover commas at front of pairs:

:%s/^, //gc

Remove peace, medicine, literature prizes (yes I realize now I could have just ran ...Peace/d):

:%g/Peace/norm dd
:%g/Medicine/norm dd
:%g/Literature/norm dd

Remove blank lines:

:%g/^\s*$/norm dd

Now it's ready for import.

Reduction in IPython

I ran the following in python:

countries = {}
lines = scraped_string.split('\n')

for line in lines:
    if 'edit' in line: # signal of a new country category
        curr_countr = line[:-4]
        countries[line[:-4]] = []
    else:
        try:
            countries[curr_countr].append(int(line[-5:-1]))
        except:
            pass #Some random text on the wiki page

Now each country is a key in the countries dict with the value being a list of years.

scores = {}
cutoff = 1985

for country in countries.keys():
    scores[country] = len([year for year in countries[country] if year>cutoff])

# Convert to list
scores = [[country, score] for country,score in scores.iteritems()]

scores.sort(key=lambda x:x[1])

Done. Now we have a list of (country, score).

Other Data

The total number of researchers was taken from here, and the populations are from a Google search on each country (Google displays the value).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment