Location of people#

This page shows the location (by continent or country) of the Open Seeds people given their different roles

import geopandas
import matplotlib.pyplot as plt
import pandas as pd
path = geopandas.datasets.get_path('naturalearth_lowres')
world_df = geopandas.read_file(path)
baseurl = "https://raw.githubusercontent.com/open-life-science/open-life-science.github.io/main/_data/artifacts/openseeds/"
cohort_nb = 9
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[2], line 1
----> 1 path = geopandas.datasets.get_path('naturalearth_lowres')
      2 world_df = geopandas.read_file(path)
      3 baseurl = "https://raw.githubusercontent.com/open-life-science/open-life-science.github.io/main/_data/artifacts/openseeds/"

File /usr/share/miniconda/envs/ols-stats/lib/python3.12/site-packages/geopandas/datasets/__init__.py:18, in get_path(dataset)
     12 error_msg = (
     13     "The geopandas.dataset has been deprecated and was removed in GeoPandas "
     14     f"1.0. You can get the original '{dataset}' data from "
     15     f"{ne_message if 'natural' in dataset else nybb_message}"
     16 )
     17 if dataset in _prev_available:
---> 18     raise AttributeError(error_msg)
     19 else:
     20     error_msg = (
     21         "The geopandas.dataset has been deprecated and "
     22         "was removed in GeoPandas 1.0. New sample datasets are now available "
     23         "in the geodatasets package (https://geodatasets.readthedocs.io/en/latest/)"
     24     )

AttributeError: The geopandas.dataset has been deprecated and was removed in GeoPandas 1.0. You can get the original 'naturalearth_lowres' data from https://www.naturalearthdata.com/downloads/110m-cultural-vectors/.
people_df = pd.read_csv(f"{baseurl}people.csv", index_col=0)
roles_df = {}
roles = []
for r in ["role", "participant", "mentor", "expert", "speaker", "facilitator", "organizer"]:
    role = r.capitalize()
    roles.append(role)
    roles_df[role] = pd.read_csv(f"{baseurl}/roles/{r}.csv", index_col=0)

Continents#

Proportion of people without continent information

people_df.continent.isna().sum() / len(people_df.continent)
0.07705479452054795
def plot_role_percentage(data, title, ylab):
    '''
    Generate role percentage plots
    
    :param data: data to plot
    :param title: title for plots
    :param ylab: ylab
    '''
    fig, ax = plt.subplots()
    fig.set_dpi(300)
    (data
         .drop(columns=['TOTAL'])
         .transpose()
         .plot(ax=ax, colormap='tab20c'))
    plt.title(title)
    plt.xlabel('Cohorts')
    plt.ylabel(ylab)
    ax.legend(
        loc='center left',
        bbox_to_anchor=(1, 0.5),
        frameon=False,
        fontsize='x-small')
    
    fig, ax = plt.subplots()
    fig.set_dpi(300)
    (data
         .drop(columns=['TOTAL'])
         .transpose()
         .plot.bar(stacked=True, ax=ax, colormap='tab20c'))
    plt.title(title)
    plt.xlabel('Cohorts')
    plt.ylabel(ylab)
    ax.legend(
        loc='center left',
        bbox_to_anchor=(1, 0.5),
        frameon=False,
        fontsize='x-small')

All roles#

continents_df = {}
continents_perc_df = {}
all_roles_continent = {}
for r in roles:
    continents_df[r] = (roles_df[r].groupby(['continent']).count()
        .rename(columns = {'country_3': 'total'})
        .drop(columns = ['city','first-name','last-name','pronouns','country','longitude','latitude']))
    continents_df[r].columns = [x.upper() for x in continents_df[r].columns]
    all_roles_continent[r] = continents_df[r].sum(axis=1)
    continents_perc_df[r] = 100 * continents_df[r] / continents_df[r].sum(axis = 0)
continents_perc_df['Role']
TOTAL OLS-1 OLS-2 OLS-3 OLS-4 OLS-5 OLS-6 OLS-7 OLS-8
continent
Africa 16.377649 8.974359 13.970588 6.428571 3.921569 13.28125 19.587629 30.0 25.185185
Asia 8.477842 7.692308 3.676471 13.571429 7.843137 10.15625 5.154639 2.0 1.481481
Europe 48.362235 51.282051 55.882353 60.714286 58.823529 48.43750 55.670103 38.0 46.666667
North America 12.909441 25.641026 18.382353 12.857143 20.588235 11.71875 9.278351 8.0 5.185185
Oceania 1.926782 1.282051 3.676471 2.857143 1.960784 0.78125 1.030928 2.0 0.740741
South America 11.946050 5.128205 4.411765 3.571429 6.862745 15.62500 9.278351 20.0 20.740741
role = 'Role'
plot_role_percentage(continents_perc_df[role], f'All {role.lower()}s', f'{role} (%)')
../_images/a9944019091bf6f09ea397abe96bcb1986a7fecc0af88c9530708009684251b5.png ../_images/7bd778e4f7bd68561358fcccf49172b8e731b87f66e6945a2b827ce89f1282dc.png
all_roles_continent_df = (pd.DataFrame.from_dict(all_roles_continent)
    .fillna(0)
    .drop(columns=['Organizer', 'Role'])
    .reindex(['Participant', 'Mentor','Speaker','Expert','Facilitator'], axis=1)
    .assign(total=lambda df: df.sum(axis = 1)))
all_roles_continent_df = 100 * all_roles_continent_df / all_roles_continent_df.sum(axis = 0)
all_roles_continent_df
Participant Mentor Speaker Expert Facilitator total
continent
Africa 20.212766 13.417722 8.810573 5.341880 46.666667 14.866980
Asia 10.771277 4.556962 4.845815 3.418803 5.333333 6.781429
Europe 43.218085 56.708861 57.709251 64.529915 32.000000 52.477830
North America 11.037234 11.392405 15.859031 17.094017 5.333333 12.936881
Oceania 0.797872 2.278481 4.845815 2.777778 0.000000 2.034429
South America 13.962766 11.645570 7.929515 6.837607 10.666667 10.902452
fig, ax = plt.subplots()
fig.set_dpi(300)
(all_roles_continent_df
     .drop(columns=['total'])
     .transpose()
     .plot.bar(stacked=True, ax=ax, colormap='tab20c'))
plt.xlabel('Roles')
ax.legend(
    loc='center left',
    bbox_to_anchor=(1, 0.5),
    frameon=False,
    fontsize='x-small')
<matplotlib.legend.Legend at 0x1374cf950>
../_images/de030a57cc3937225d888dc6c444ad750f845cfab65458699a87a17f05dc4939.png

Participants#

continents_perc_df['Participant']
TOTAL OLS-1 OLS-2 OLS-3 OLS-4 OLS-5 OLS-6 OLS-7 OLS-8
continent
Africa 19.944598 17.241379 21.153846 4.6875 6.060606 16.923077 35.483871 39.215686 25.757576
Asia 10.526316 13.793103 7.692308 28.1250 15.151515 15.384615 6.451613 0.000000 0.000000
Europe 42.936288 27.586207 48.076923 53.1250 57.575758 36.923077 48.387097 29.411765 45.454545
North America 11.357341 34.482759 19.230769 10.9375 9.090909 9.230769 0.000000 3.921569 6.060606
Oceania 0.831025 0.000000 1.923077 1.5625 0.000000 0.000000 3.225806 0.000000 0.000000
South America 14.404432 6.896552 1.923077 1.5625 12.121212 21.538462 6.451613 27.450980 22.727273
role = 'Participant'
plot_role_percentage(continents_perc_df[role], f'{role}s', f'{role} (%)')
../_images/1f9bc09dcee66269803be948623ef7236f8367628200ea387cbec90c0fa2d22a.png ../_images/f07bfc788a906d57e13d9eb0a5fa317c9b73eeab70c5d0f570fdac6c8dcbce46.png

Mentors#

continents_perc_df['Mentor']
TOTAL OLS-1 OLS-2 OLS-3 OLS-4 OLS-5 OLS-6 OLS-7 OLS-8
continent
Africa 13.970588 10.0 13.888889 8.823529 0.000 8.571429 19.354839 24.242424 18.421053
Asia 4.411765 5.0 2.777778 5.882353 3.125 8.571429 3.225806 6.060606 2.631579
Europe 52.941176 70.0 58.333333 61.764706 62.500 68.571429 67.741935 39.393939 47.368421
North America 12.500000 10.0 16.666667 11.764706 25.000 8.571429 3.225806 9.090909 2.631579
Oceania 2.941176 0.0 2.777778 5.882353 3.125 0.000000 0.000000 3.030303 0.000000
South America 13.235294 5.0 5.555556 5.882353 6.250 5.714286 6.451613 18.181818 28.947368
role = 'Mentor'
plot_role_percentage(continents_perc_df[role], f'{role}s', f'{role} (%)')
../_images/d31d3f67fb9fb0152cc6022261add394c5d7ebc47dd31e1cf92d00febabc1d04.png ../_images/d4ae8f9bf8b4d7f9368186fea9ba58b23db2432354d3c9531accc0ee5068f134.png

Speakers#

continents_perc_df['Speaker']
TOTAL OLS-1 OLS-2 OLS-3 OLS-4 OLS-5 OLS-6 OLS-7 OLS-8
continent
Africa 10.112360 5.555556 12.500000 15.0 0.000000 6.666667 0.000000 14.285714 9.090909
Asia 5.617978 0.000000 0.000000 5.0 5.882353 0.000000 10.526316 7.142857 9.090909
Europe 52.808989 66.666667 66.666667 70.0 70.588235 46.666667 57.894737 42.857143 54.545455
North America 16.853933 27.777778 8.333333 5.0 17.647059 26.666667 10.526316 14.285714 18.181818
Oceania 5.617978 0.000000 8.333333 5.0 0.000000 6.666667 0.000000 7.142857 9.090909
South America 8.988764 0.000000 4.166667 0.0 5.882353 13.333333 21.052632 14.285714 0.000000
role = 'Speaker'
plot_role_percentage(continents_perc_df[role], f'{role}s', f'{role} (%)')
../_images/fa98eb8b2422b86f2d7f5c1ca16963f57bef4c2f85430ed87ea3a2869079593f.png ../_images/f6e7ae7576f4896553e7bfb745f11afa63dfd30f2cc57aa32ed97dda7031ac12.png

Experts#

continents_perc_df['Expert']
TOTAL OLS-1 OLS-2 OLS-3 OLS-4 OLS-5 OLS-6 OLS-7 OLS-8
continent
Africa 6.547619 5.405405 4.615385 3.174603 0.000000 4.0 2.631579 0.0 22.727273
Asia 4.166667 5.405405 1.538462 3.174603 4.347826 4.0 2.631579 0.0 0.000000
Europe 62.500000 67.567568 63.076923 68.253968 58.695652 76.0 68.421053 75.0 59.090909
North America 15.476190 16.216216 18.461538 17.460317 30.434783 12.0 15.789474 25.0 4.545455
Oceania 2.976190 2.702703 6.153846 3.174603 2.173913 0.0 0.000000 0.0 0.000000
South America 8.333333 2.702703 6.153846 4.761905 4.347826 4.0 10.526316 0.0 13.636364
role = 'Expert'
plot_role_percentage(continents_perc_df[role], f'{role}s', f'{role} (%)')
../_images/7715c20d1933d3b2077545d8a7910644c253238007d0bcf9f8fc54504aa4cc89.png ../_images/8b9d03e41a68627fda676e044118689ce145f1240f89ac4c6cbc1c4b0c5cbc2f.png

Facilitators#

continents_perc_df['Facilitator']
TOTAL OLS-1 OLS-2 OLS-3 OLS-4 OLS-5 OLS-6 OLS-7 OLS-8
continent
Africa 46.666667 NaN NaN 0.0 28.571429 40.0 42.857143 40.0 66.666667
Asia 3.333333 NaN NaN 0.0 14.285714 20.0 14.285714 0.0 0.000000
Europe 30.000000 NaN NaN 100.0 42.857143 40.0 28.571429 40.0 20.000000
North America 6.666667 NaN NaN 0.0 14.285714 0.0 14.285714 0.0 0.000000
South America 13.333333 NaN NaN 0.0 0.000000 0.0 0.000000 20.0 13.333333
role = 'Facilitator'
plot_role_percentage(continents_perc_df[role], f'{role}s', f'{role} (%)')
../_images/767fcfc1a8e762c24438e0a6ead2549dbd3303ba659ef1f054e96fe4d563310d.png ../_images/2fffe2832e5a3cf1394f4a88517767278dcc02ba2fb043b1e9ef8b5619ea0789.png

Countries#

people_df.country.nunique()
60

Proportion of people without country information

people_df.country.isna().sum() / len(people_df.country)
0.06335616438356165

Country repartition

countries_df = {}
countries_perc_df = {}
for r in roles: 
    countries_df[r] = (roles_df[r].groupby(['country']).count()
        .rename(columns = {'country_3': 'total'})
        .drop(columns = ['city','first-name','last-name','pronouns','continent','longitude','latitude']))
    countries_df[r].columns = [x.upper() for x in countries_df[r].columns]
    countries_perc_df[r] = 100 * countries_df[r] / countries_df[r].sum(axis = 0)
countries_perc_df['Role']
TOTAL OLS-1 OLS-2 OLS-3 OLS-4 OLS-5 OLS-6 OLS-7 OLS-8
country
Argentina 5.780347 0.000000 1.470588 1.428571 3.921569 6.766917 3.061224 7.920792 15.555556
Australia 1.926782 1.282051 3.676471 2.857143 1.960784 0.751880 1.020408 1.980198 0.740741
Austria 0.192678 0.000000 0.735294 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Bangladesh 0.192678 0.000000 0.735294 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Belgium 0.385356 0.000000 0.000000 1.428571 0.000000 0.000000 0.000000 0.000000 0.000000
Benin 0.192678 0.000000 0.000000 0.000000 0.000000 0.751880 0.000000 0.000000 0.000000
Bolivia 0.000000 0.000000 0.000000 0.000000 0.000000 3.007519 0.000000 0.000000 0.000000
Brazil 3.082852 5.128205 2.941176 1.428571 1.960784 2.255639 4.081633 3.960396 1.481481
Cameroon 2.119461 0.000000 0.000000 0.714286 0.000000 1.503759 2.040816 8.910891 2.962963
Canada 2.890173 5.128205 7.352941 2.142857 0.980392 3.007519 2.040816 1.980198 0.740741
Chile 0.385356 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1.980198 0.740741
China 0.192678 1.282051 0.735294 0.000000 0.000000 0.751880 1.020408 0.000000 0.000000
Colombia 1.156069 0.000000 0.000000 0.714286 0.980392 0.751880 2.040816 5.940594 2.222222
Czechia 0.770713 0.000000 0.735294 2.142857 0.000000 0.000000 0.000000 0.000000 0.000000
Denmark 0.385356 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.990099 0.740741
Egypt 0.192678 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.990099 0.000000
Estonia 0.385356 0.000000 0.000000 0.714286 0.000000 0.000000 0.000000 0.990099 0.740741
Eswatini 0.192678 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.740741
Ethiopia 0.192678 0.000000 0.735294 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
France 2.312139 3.846154 4.411765 3.571429 5.882353 1.503759 1.020408 2.970297 2.962963
Germany 6.743738 10.256410 8.088235 10.000000 7.843137 6.766917 5.102041 6.930693 3.703704
Ghana 0.770713 0.000000 0.735294 0.714286 0.980392 1.503759 0.000000 0.990099 0.000000
Greece 0.578035 2.564103 1.470588 1.428571 0.980392 0.751880 1.020408 0.000000 0.740741
Hong Kong 0.192678 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.740741
Hungary 0.192678 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.990099 0.000000
India 3.660886 2.564103 0.735294 5.714286 3.921569 3.007519 3.061224 0.990099 0.740741
Indonesia 0.963391 0.000000 0.735294 2.857143 0.000000 0.000000 0.000000 0.000000 0.000000
Ireland 0.963391 0.000000 0.000000 0.714286 0.000000 0.000000 2.040816 3.960396 0.740741
Italy 1.926782 1.282051 0.735294 2.857143 1.960784 0.751880 4.081633 1.980198 0.740741
Japan 0.192678 1.282051 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Kazakhstan 0.192678 0.000000 0.000000 0.000000 0.000000 0.751880 0.000000 0.000000 0.000000
Kenya 4.238921 7.692308 4.411765 1.428571 1.960784 3.007519 9.183673 7.920792 8.148148
Luxembourg 0.192678 1.282051 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Mali 0.385356 0.000000 1.470588 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Mexico 0.385356 0.000000 0.735294 1.428571 0.980392 0.751880 1.020408 0.990099 0.740741
Nepal 0.770713 1.282051 0.000000 2.142857 0.000000 0.000000 0.000000 0.000000 0.000000
Netherlands 8.477842 3.846154 4.411765 3.571429 6.862745 6.766917 7.142857 4.950495 22.222222
Nigeria 3.853565 0.000000 1.470588 1.428571 0.980392 1.503759 3.061224 8.910891 8.888889
Norway 0.578035 2.564103 0.000000 0.000000 0.980392 0.751880 0.000000 0.000000 0.000000
Peru 1.348748 0.000000 0.000000 0.000000 0.000000 5.263158 0.000000 0.000000 0.000000
Poland 0.192678 0.000000 0.000000 0.000000 0.980392 0.000000 0.000000 0.000000 0.000000
Portugal 0.385356 0.000000 0.000000 1.428571 0.000000 0.000000 0.000000 0.000000 0.000000
Romania 0.192678 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.990099 0.740741
Russian Federation 0.192678 1.282051 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Saudi Arabia 0.770713 0.000000 0.000000 1.428571 2.941176 0.751880 1.020408 0.990099 0.000000
South Africa 3.853565 1.282051 4.411765 2.142857 0.000000 4.511278 5.102041 0.990099 3.703704
South Korea 0.000000 0.000000 0.000000 0.000000 0.000000 0.751880 1.020408 0.000000 0.000000
Spain 3.082852 1.282051 2.205882 6.428571 1.960784 3.759398 1.020408 0.000000 1.481481
Sweden 0.385356 0.000000 0.735294 0.000000 0.980392 0.751880 1.020408 0.000000 0.740741
Switzerland 1.734104 1.282051 4.411765 1.428571 1.960784 0.751880 3.061224 0.990099 0.740741
Thailand 0.192678 1.282051 0.000000 0.000000 0.980392 0.000000 0.000000 0.000000 0.000000
Turkey 0.963391 0.000000 0.735294 1.428571 0.000000 3.759398 0.000000 0.000000 0.000000
Uganda 0.385356 0.000000 0.735294 0.000000 0.000000 0.000000 0.000000 0.990099 0.740741
United Kingdom 18.111753 21.794872 27.941176 25.000000 28.431373 24.060150 29.591837 11.881188 10.370370
United Kingdom / Ukraine 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.990099 0.000000
United States 9.633911 20.512821 10.294118 9.285714 18.627451 7.518797 6.122449 4.950495 3.703704
Uruguay 0.192678 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.740741
Uzbekistan 0.192678 0.000000 0.000000 0.000000 0.000000 0.751880 0.000000 0.000000 0.000000
len(countries_perc_df['Role'])
58

Maps#

def plot_map(data, column, title, legend, label=""):
    """
    Plot colored map by data
    
    :param data: data to plot
    :param column: column to plot
    :param title: title for plots
    :param legend: boolean to plot legend or not
    :param label: label for legend
    """
    
    fig, ax = plt.subplots(figsize=(15, 10))
    fig.set_dpi(300)
    
    data.plot(
        column=column,
        ax=ax,
        legend=legend,
        legend_kwds={'label': label, 'orientation': "horizontal"},
        cmap='YlGn')
    plt.title(title)
    ax.set_axis_off()

Presence/absence#

country_code_df = (roles_df["Role"].groupby(['country_3']).count()
    .rename(columns = {'country': 'total'})
    .drop(columns = ['city','first-name','last-name','pronouns','continent','longitude','latitude'])
)
country_code_df[country_code_df != 0] = 1
country_code_df = (country_code_df
    .rename_axis("iso_a3")
    .reset_index()
)
country_world_df = pd.merge(world_df, country_code_df, on='iso_a3', how='outer')
country_world_df['total'].fillna(0, inplace=True)
for i in range(1, cohort_nb):
    country_world_df[f'ols-{i}'].fillna(0, inplace=True)
country_world_df.head()
pop_est continent name iso_a3 gdp_md_est geometry total ols-1 ols-2 ols-3 ols-4 ols-5 ols-6 ols-7 ols-8
0 889953.0 Oceania Fiji FJI 5496.0 MULTIPOLYGON (((180.00000 -16.06713, 180.00000... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
1 58005463.0 Africa Tanzania TZA 63177.0 POLYGON ((33.90371 -0.95000, 34.07262 -1.05982... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
2 603253.0 Africa W. Sahara ESH 907.0 POLYGON ((-8.66559 27.65643, -8.66512 27.58948... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
3 37589262.0 North America Canada CAN 1736425.0 MULTIPOLYGON (((-122.84000 49.00000, -122.9742... 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
4 328239523.0 North America United States of America USA 21433226.0 MULTIPOLYGON (((-122.84000 49.00000, -120.0000... 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
country_code_df
iso_a3 total ols-1 ols-2 ols-3 ols-4 ols-5 ols-6 ols-7 ols-8
0 ARG 1 0 1 1 1 1 1 1 1
1 AUS 1 1 1 1 1 1 1 1 1
2 AUT 1 0 1 0 0 0 0 0 0
3 BEL 1 0 0 1 0 0 0 0 0
4 BEN 1 0 0 0 0 1 0 0 0
5 BGD 1 0 1 0 0 0 0 0 0
6 BRA 1 1 1 1 1 1 1 1 1
7 CAN 1 1 1 1 1 1 1 1 1
8 CHE 1 1 1 1 1 1 1 1 1
9 CHL 1 0 0 0 0 0 0 1 1
10 CHN 1 1 1 0 0 1 1 0 0
11 CMR 1 0 0 1 0 1 1 1 1
12 COL 1 0 0 1 1 1 1 1 1
13 CZE 1 0 1 1 0 0 0 0 0
14 DEU 1 1 1 1 1 1 1 1 1
15 DNK 1 0 0 0 0 0 0 1 1
16 EGY 1 0 0 0 0 0 0 1 0
17 ESP 1 1 1 1 1 1 1 0 1
18 EST 1 0 0 1 0 0 0 1 1
19 ETH 1 0 1 0 0 0 0 0 0
20 FRA 1 1 1 1 1 1 1 1 1
21 GBR 1 1 1 1 1 1 1 1 1
22 GHA 1 0 1 1 1 1 0 1 0
23 GRC 1 1 1 1 1 1 1 0 1
24 HKG 1 0 0 0 0 0 0 0 1
25 HUN 1 0 0 0 0 0 0 1 0
26 IDN 1 0 1 1 0 0 0 0 0
27 IND 1 1 1 1 1 1 1 1 1
28 IRL 1 0 0 1 0 0 1 1 1
29 ITA 1 1 1 1 1 1 1 1 1
30 JPN 1 1 0 0 0 0 0 0 0
31 KAZ 1 0 0 0 0 1 0 0 0
32 KEN 1 1 1 1 1 1 1 1 1
33 LUX 1 1 0 0 0 0 0 0 0
34 MEX 1 0 1 1 1 1 1 1 1
35 MLI 1 0 1 0 0 0 0 0 0
36 NGA 1 0 1 1 1 1 1 1 1
37 NLD 1 1 1 1 1 1 1 1 1
38 NOR 1 1 0 0 1 1 0 0 0
39 NPL 1 1 0 1 0 0 0 0 0
40 PER 1 0 0 0 0 1 0 0 0
41 POL 1 0 0 0 1 0 0 0 0
42 PRT 1 0 0 1 0 0 0 0 0
43 ROU 1 0 0 0 0 0 0 1 1
44 RUS 1 1 0 0 0 0 0 0 0
45 SAU 1 0 0 1 1 1 1 1 0
46 SWE 1 0 1 0 1 1 1 0 1
47 SWZ 1 0 0 0 0 0 0 0 1
48 THA 1 1 0 0 1 0 0 0 0
49 TUR 1 0 1 1 0 1 0 0 0
50 UGA 1 0 1 0 0 0 0 1 1
51 URY 1 0 0 0 0 0 0 0 1
52 USA 1 1 1 1 1 1 1 1 1
53 UZB 1 0 0 0 0 1 0 0 0
54 ZAF 1 1 1 1 0 1 1 1 1
plot_map(country_world_df, 'total', f'All cohorts / All roles', False, "Presence/absence by Country")
plt.savefig(f'../results/openseeds/location/all-roles-all-cohorts.png', bbox_inches='tight')
../_images/c5ab772771ed63f762a0ebd6bf2d1a5723619dec8529a0a6eff732bc0b57685d.png
for i in range(1,cohort_nb):
    plot_map(country_world_df, f'ols-{i}', f'OLS-{i} / All roles', False)
../_images/be1b92e19d80e737ddd767bff2dcc45f97a02645b9da2b1403bf2de1adb2df72.png ../_images/f9f83f576620f35a894f7c88152d95dd72ce4fd11b4848dd8ab77cf91716cd44.png ../_images/382b79ef4077889088f9df9f7eb1d036ef9d6be0a44c4407706c9c3114b85ad5.png ../_images/df95f32e4cdc02c3f5933593584cfae65e6ee4cc71264bf29a34e40fda4974bd.png ../_images/1c5e57b8861cc053955a754535b648f888248ebfded8556d3bc60275bda50c64.png ../_images/69d1c081654760761851d3fb9b5fedf714e2b114ba718639116da4306028b15a.png ../_images/d4bdb141d590e31fcac15109fd3636bd61bf494c54339688682e926146b12b07.png ../_images/3b1cc64480f2be27984ca96b76afb82b6fa2afe6ee15f01e52d74b16b327ccac.png

Density by number#

country_code_df = {}
country_world_df = {}
for r in roles: 
    country_code_df[r] = (roles_df[r].groupby(['country_3']).count()
        .rename(columns = {'country': 'total'})
        .drop(columns = ['city','first-name','last-name','pronouns','continent','longitude','latitude'])
        )
    country_code_df[r] = 100 * country_code_df[r] / country_code_df[r].sum(axis = 0)
    country_code_df[r] = (country_code_df[r]
        .rename_axis("iso_a3")
        .reset_index())
    
    country_world_df[r] = pd.merge(world_df, country_code_df[r], on='iso_a3', how='outer')
    country_world_df[r]['total'].fillna(0, inplace=True)
    for i in range(1, cohort_nb):
        country_world_df[r][f'ols-{i}'].fillna(0, inplace=True)
    country_world_df[r].head()
def plot_role_map(data, role):
    '''
    Generate role percentage plots
    
    :param data: data to plot
    :param title: title for plots
    '''
    plot_map(data, 'total', f'All cohorts / All {role}s', True, "Percentage by Country")
        
    #plt.savefig(f'../../results/openseeds/location/{role}-all-cohorts.png', bbox_inches='tight')
    
    for i in range(1,cohort_nb):
        plot_map(data, f'ols-{i}', f'OLS-{i} / All {role}s', True, "Percentage by Country")

All roles#

role = 'Role'
plot_role_map(country_world_df[role], role.lower())
../_images/9da12450af513c32aa239d3bd7ec2b4a328ff77961f44d2d7b89c56f07c60a2f.png ../_images/6231ffdd4bcff4304b90f48e3bfa7efc982b37db2fb25b3780321aa0f2c8017b.png ../_images/4bfaf07d7aa85f9d5c5d142f6a3bd739b10e195ba3e1368ef2e5aaf00f5d8cec.png ../_images/2e650228f5b9821478a7225671202019eee51ba4c238400c4bcb6c87418f82f2.png ../_images/fc132695d38d5b238ad4946d478854ae1ecebb2bf57ab2563804f7c34422b9c8.png ../_images/1f4a045bd05a94cdca1b6c8161a76e1aff272c7070d566a0f625b76f1fea488d.png ../_images/7c2398312a42126d3d6dc4a3c813d1c89cf73b79447d0902885590055736d85d.png ../_images/6ef2da54a1e7624c0a4e894ed00569d3f86de6cbeff46fa22ce9a12e1c01caf7.png ../_images/257996309f476e423c6bde68895e67aa71098cc17a220dc30ae75d4d3449506c.png

Participants#

role = 'Participant'

Number of countries

len(country_code_df[role])
49
plot_role_map(country_world_df[role], role.lower())
../_images/f6282398a77e5bc10aef61805d149c52942d0d487f2e6d7d2d26fa9233642e0a.png ../_images/a50abbed6043cbd726e25633b78fd4a45a43b91b8a8449b15e0b388479dda1ec.png ../_images/c1e89f52842b09163a815c87b7a89babd4732b19a33ba7611c0795de62535b14.png ../_images/9c249afe006ce613164e06250976d3b7aed2909e1d2605e6454dac60efba9d28.png ../_images/4be39275358ec6a1ea2298a2da43064f4ff494c1a1654d4caead0b0ce93776c4.png ../_images/121bb768721576d76ccfd116617ac7faf934ce3b3f44f6dbe11363736bf73da9.png ../_images/54ab346b3e230839eae86340cd0751c576ee51f5e529d90594152382bec0434a.png ../_images/67ddef1dee752f15f01875ed433e854a3f842bed2ab5f1221fa080f34d70909b.png ../_images/f5f222dc712e3fbe89249b7848ccda86017c69a092b35e0646d1f1a6635f24e3.png

Mentors#

role = 'Mentor'
plot_role_map(country_world_df[role], role.lower())
../_images/3c5e9290c84396f385154ac6f2f059348d236ed5fc36aadae129673e3aa2ac3c.png ../_images/16a72784329e2945e482bf9d4ea5c82979b380ebe31cf5488cc969fbf50e8649.png ../_images/bc36d1788874cee6edc4071f3e0b551c5cf5e3b525972fa919ee9443a87fa51d.png ../_images/f00b64adfc44aec7c2ed84d652f4ae1f4f0f4ccf280650c10ac31d68a7882ffd.png ../_images/3870ff03731e9aa24e235ecaf4a247c0e9ff1d82e3c23739a296b7c013af4eb3.png ../_images/b511184a8b45e99e64c10383f525c9997aacf9ceb3a7e9201165fb54287b0168.png ../_images/5ada42280d65ef3a53d7d5bd1524fb3dab8014644d004485d8d9751d4613fa2c.png ../_images/65473faef2d84cad961a636b28cb7a69ebffe70ac60d9a0166136304c4a96004.png ../_images/bd45448b0e834dcf8198c45b67a2c4750a833357f0143bedd159d9be9b1c8560.png

Speakers#

role = 'Speaker'
plot_role_map(country_world_df[role], role.lower())
../_images/7cc473fe8364a1f6bb57c5ac85604ca4326321d56c88213d894197949bf227bd.png ../_images/0500ff80d933c4f1d5b743ac21958bf4b93a574a1c38a048b9bbd803f9590f45.png ../_images/2e5fffa7899673aa8a4acf8c8f51d29949ac9fc9326310f8a1f47a6727ed6327.png ../_images/69ae7518aa0328d81b8c67351ff570094adbba737ea447956f0151e8e6bad458.png ../_images/2c0b166e3d8f38956b672fdfa27cbf3af1fd1b09d594e90f149770a4abacf660.png ../_images/6c376bd74b795ca83ab28b2c473359e2f76c39dda9554d0c2509ad5923eca562.png ../_images/625e2934b558de4a025ec208fbf8e3117bc7414fcdbc710ca1f4cb4c3388e6c0.png ../_images/4dde37915a875557ce20e01dd5b9bcb4db9cdce1a3ef0cfedf43665b15083e1d.png ../_images/79901e7c8a1afe5143d99707751877cdeefb5fea5f47ee555ba38cf58c7c3653.png

Experts#

role = 'Expert'
plot_role_map(country_world_df[role], role.lower())
../_images/540f922ac5fb5b144f5ea700a71f430ddeda1339f39a286e262c28d2af3fd0ee.png ../_images/a587ff7fa2a0d162c961b88f63cc1b48bfc408fe9fcfae4ebc559fdaef2a9531.png ../_images/bb421fe7337ec72025cc7751396a64e5c3af764adb4e3261b90a30908bb04b8b.png ../_images/0b8a9cca78e5fe00af8d68599f0fd3d29b766a544c00478a87082db01fdfe268.png ../_images/0d4ef88b43e91e8e2dfd36caaf573ac05047ff0a90100264170865502d2cc27f.png ../_images/b24973e7e0f6c6481acbe1bc9658414cab163da647ab0cf8bab4aba5b2e096be.png ../_images/a5f4b008ea517ac128d323db7215dbe74dedd9ae5b35df569aa81103777a40ea.png ../_images/d4ff7c673c715bc0c887f3eae93fa9353acc99a3cbaa509a20fcffc373d73233.png ../_images/0ab2df59e3a4a31c13fd0f8bd869e4b5cf2d0389d156f95df7b4736616b00ba9.png

Facilitators#

role = 'Facilitator'
plot_role_map(country_world_df[role], role.lower())
../_images/7739a56350180363b93c46936c82b16129809ddb85a5ae0f6a7d559712cea294.png ../_images/e6e59350fbc359ad5da8baa31c85b3abe214838d7a310197fb24a6799de772bc.png ../_images/6799c6160d3e82065867c8a099869bb47a2e37621eabd9c181e5d8a0b4140b81.png ../_images/8175f1eab6cb65e6c32e51cbcf51d5fa983917d2386d3ccad5227714504d1e37.png ../_images/1d63a167f4942d8982fa8c35e3e868f79512bc6ad95388c3072272800c70242b.png ../_images/4e4a100f3b2a7b2e7c1be2e41198c9a8379515dadd27fb6d40c17b92a40aa2b0.png ../_images/9cd3209498e9e3f03e0df1d9d34cce2a8cbeb690e721975fd8a66c533e8af888.png ../_images/b7734faf6a3948dc240432b022310e2cf7549210842cc9811630f99c85f2fef6.png ../_images/c28fff13313921d324ca52a562e7c52457effc069bf3153723a8f22890678bae.png