<jupyter_start><jupyter_text>**1. Read clcean data**<jupyter_code>fn = '../data/data_preprocessed.pickle'
data = read_from_pickle(fn)
df = data['df_original']
data.keys()<jupyter_output>Read data from "../data/data_preprocessed.pickle"<jupyter_text>**2. Here are some of my papers**<jupyter_code># my paper! proud of these!!!
df[(df['first_author']=='<NAME>') & (df['last_author']=='<NAME>')]<jupyter_output><empty_output><jupyter_text>**3. Yearly counts of publications**<jupyter_code>year = range(1991, 2022)
d = defaultdict(list)
c = defaultdict(list)

for y in year:
    c[y] = sum([df['year'] == y])

c = pd.Series(c, index=c.keys())
plt.subplots(figsize=(15, 6))
# ax = plt.bar(c.index, c, )

ax = sns.barplot(x=c.index, y=c,
                 color=(0.2, 0.4, 0.6),
                 edgecolor=(0,0,0),
                 linewidth=1.5)
ax.set_xticklabels(c.index,
                   rotation=45,
                   ha='center',
                   fontsize=15,
                  )
ax.set_yticklabels(ax.get_yticks(),
                   fontsize=15,
                  )
ax.set_xlabel('Year', fontsize=18,)
ax.set_ylabel('Counts of Publications', fontsize=18,)
[t_ax.set_width(1) for t_ax in ax.patches];
ax.set_xlim([-0.4,30.62])
ax.set_ylim([0, 5000]);
fn = '../figures/counts_of_publications.svg'
plt.savefig(fn, dpi=300, bbox_inches='tight', facecolor="white")<jupyter_output><empty_output><jupyter_text>**4. Top 10 most popular journals identified based on cumulative counts of publications**<jupyter_code>c = df['journal'].value_counts().head(10)
plt.subplots(figsize=(15, 6))
# ax = plt.bar(c.index, c, )

ax = sns.barplot(y=c.index, x=c,
                 color=(0.2, 0.4, 0.6),
                 edgecolor=(0,0,0),
                 linewidth=1.5)
ax.set_xticklabels(range(0, 3100, 500),                   
                   ha='center',
                   fontsize=15,
                  )
ax.set_yticklabels(c.index,
                   fontsize=15,
                  )
ax.set_xlim([0, 3000])
ax.set_ylim([9.8, -0.6])
ax.set_xlabel('Counts of Publications', fontsize=18,)
[t_ax.set_height(1) for t_ax in ax.patches];
fn = '../figures/top_10_most_pop_journals_over_30_years.svg'
plt.savefig(fn, dpi=300, bbox_inches='tight', facecolor="white")<jupyter_output><empty_output><jupyter_text>5. Yearly most popular journal based on the counts of publications in that year<jupyter_code>df_coutns_num = pd.DataFrame()
df_coutns_title = pd.DataFrame()

df_coutns_num = (df[['year', 'journal']]
     .groupby(['year'], as_index=False)
     .apply(lambda x: x['journal'].value_counts().iloc[0]))
df_coutns_title = (df[['year', 'journal']]
     .groupby(['year'], as_index=False)
     .apply(lambda x: x['journal'].value_counts().index[0]))
df_counts = df_coutns_num.merge(df_coutns_title,how='left', on='year')
df_counts.columns = ['year', 'Counts of Publications', 'Most Pop.Journal']
df_counts<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17180013689253937, 'fraction_numerical': 0.035249828884325804, 'mean_word_length': 3.476263399693721, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '120254', 'license': 'MIT', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1089, 'n_words': 180, 'path': 'notebooks/EDA.ipynb', 'repo_name': 'weizhao-BME/metis-project4', 'size': '2928'}