# Load the data
receiving_country_grants_df = records[['COUNTRYCODEOFHOSTINSTITUTION', 'COUNTRYCODEOFHOMEINSTITUTION', 'STUDYGRANT', 'LENGTHSTUDYPERIOD']].copy()
receiving_country_grants_df['MONTHLY_GRANT'] = receiving_country_grants_df['STUDYGRANT'] / receiving_country_grants_df['LENGTHSTUDYPERIOD']

fig, ax = plt.subplots(figsize=figsize)

# Plot the average and variance for each receiving country
sns.boxplot(x='COUNTRYCODEOFHOSTINSTITUTION', y='MONTHLY_GRANT', data=receiving_country_grants_df, width=0.5, ax=ax).set_title('Grant for each receiving country')

# Plot the average and variance for each sending country
sns.boxplot(x='COUNTRYCODEOFHOMEINSTITUTION', y='MONTHLY_GRANT', data=receiving_country_grants_df, width=0.5, ax=ax).set_title('Grant for each sending country')