<jupyter_start><jupyter_text>The data for this project was obtained from *OpenSantions* from the url: https://www.opensanctions.org/This source is "a global database of persons and companies of political, criminal, or economic interest. It combines the most important sanctions lists, databases of politically exposed persons, and other public information into a single, easy-to-access dataset." The following dataset shows top twenty **nationalities** (by country code) of the sanctioned persons, with Great Britain being the high outlier:<jupyter_code>df2 = pd.read_csv('C:\Inna\'s files\data\Sanctions\inna2.csv')
#print(df2)
new_df = df2.loc[lambda df: df2['frequency'] > 139, :]
print(new_df)

plt.scatter(x=new_df['country'], y = new_df['frequency'], color='green')
plt.xticks(rotation=45)
plt.title('Frequency by Nationality')<jupyter_output>country  frequency
0       GB       6023
1       IQ        752
2       TN        666
3       AF        421
4       KP        391
5       ID        353
6       DZ        280
7       PK        264
8       SY        236
9       SA        218
10      YE        216
11      DE        189
12      FR        188
13      EG        175
14      CD        172
15      SO        172
16      IE        170
17      IN        167
18      PH        153
19      ML        152
20      RU        141<jupyter_text>The next dataset shows top twenty **birthplaces** of the sanctioned persons. The most interesting finding from this dataset is that Great Britain, which is by far the most common nationality of the santioned persons, does not make it top twenty birthplaces. The high outlier and the most frequent birthplace is Afghanistan. Great Britain appears to be the top destination for persons who end up on the sanctions lists.<jupyter_code>df3 = pd.read_csv('C:\Inna\'s files\data\Sanctions\inna3.csv')
new_df1 = df3.loc[lambda df: df2['frequency'] > 140, :]
print(new_df1)

plt.scatter(x=new_df1['country'], y=new_df1['frequency'], color='purple')
plt.xticks(rotation=45)
plt.title('Frequency by Birthplace')<jupyter_output>country  frequency
0       AF       1287
1       IQ        593
2       SY        440
3       ID        292
4       UG        277
5       TN        274
6       PK        208
7       IR        197
8       LY        191
9       SA        190
10      RU        189
11      EG        174
12      DZ        165
13      CD        165
14      PH        127
15      ML        118
16      RW        109
17      YE        106
18      IN         91
19      KW         87
20      UA         83<jupyter_text>The following visualizations compare side by side the nationalities and birthplaces of the sanctioned persons. While the overlap is clear, the high outliers vary significantly. Additionally, Russia makes it top 20 **birthplaces** and only top 10 **nationalities** of the sanctioned persons.<jupyter_code>plt.figure(figsize=(10, 5))

plt.subplot(1, 2, 1)
plt.scatter(x=new_df['country'], y = new_df['frequency'], color='green')
plt.xticks(rotation=45)
plt.title('Frequency by Nationality')

plt.subplot(1, 2, 2)
plt.scatter(x=new_df1['country'], y=new_df1['frequency'], color='purple')
plt.xticks(rotation=45)
plt.title('Frequency by Birthplace')     

plt.tight_layout()
plt.show()

plt.figure(figsize=(10, 5))

plt.subplot(1, 2, 1)
plt.boxplot(new_df['frequency'])
plt.title('Nationalities')


plt.subplot(1, 2, 2)
plt.boxplot(new_df1['frequency'])
plt.title('Birthplaces')

plt.tight_layout()
plt.show()<jupyter_output><empty_output><jupyter_text>The next dataset presents the most frequent names of the sanctioned persons.<jupyter_code>names = pd.read_csv('C:\Inna\'s files\data\Sanctions\entities.csv')
common_names = names.loc[:, 'first_name'].value_counts()
#print(common_names)

#common_names.to_csv('C:\Inna\'s files\data\Sanctions\inna4.csv')
common_names1 = pd.read_csv('C:\Inna\'s files\data\Sanctions\inna4.csv')
most_common = common_names1.loc[lambda df: common_names1['frequency'] > 60, :]
print(most_common)

plt.bar(most_common['name'], most_common['frequency'])
plt.xticks(rotation=75)
plt.show()<jupyter_output>name  frequency
0         David        195
1          John        177
2      Mohammed        163
3       Michael        160
4          Paul        156
5      Mohammad        147
6          Mark        138
7           Ali        133
8        Andrew        123
9       Stephen        121
10        Peter        100
11        James        100
12       Robert         94
13      Richard         90
14  Christopher         86
15     Muhammad         83
16      Mohamed         79
17      Anthony         70
18        Ahmad         69
19          Ian         68
20        Simon         67
21       Daniel         65
22       Martin         61
{'fraction_non_alphanumeric': 0.08603517694426785, 'fraction_numerical': 0.07289680016952745, 'mean_word_length': 2.2664359861591694, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 17, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '318323', 'license': 'MIT', 'n_tokens_mistral': 1671, 'n_tokens_neox': 1415, 'n_words': 477, 'path': 'Challenge.ipynb', 'repo_name': 'innawendell/Describing-Data-', 'size': '4719'}