/erasmus_home_vs_host_country.py Secret
Created
January 31, 2021 13:43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a cross table and normalize it | |
home_host_countries = pd.crosstab(records['COUNTRYCODEOFHOMEINSTITUTION'], records['COUNTRYCODEOFHOSTINSTITUTION'], normalize='index') | |
# Plot home vs. destination country | |
f, ax = plt.subplots(figsize=(14, 12)) | |
sns.heatmap(home_host_countries, ax=ax, linewidths=.5, cmap='Paired') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment