<jupyter_start><jupyter_text>Distribution crime<jupyter_code>data_df = pd.read_csv('../data/generated_files/merged_features.csv')
data_df['sp_id'] = data_df['sp_id'].astype(str)

data_df = data_df.sort_values(['city', 'sp_id'])
data_df.head()
f, axs = plt.subplots(2, 2, figsize=figsize(0.8, "golden"))

for ax, c in zip(axs.reshape(-1), ['bogota', 'boston', 'LA', 'chicago']):
    ax.hist(data_df[data_df.city == c]['ncrimes'].values, bins=40)
    if c == 'LA':
        c = 'Los Angeles'
    ax.set_title(c.title())

axs[0, 0].set_ylabel("Number of neighborhoods")
axs[1, 0].set_ylabel("Number of neighborhoods")
axs[1, 0].set_xlabel("Number of crimes")
axs[1, 1].set_xlabel("Number of crimes")

plt.tight_layout()
plt.savefig('../figures/manuscript/supplementary_distribution_crime.pdf', bbox_inches='tight', pad_inches=0.05)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19369894982497082, 'fraction_numerical': 0.021003500583430573, 'mean_word_length': 6.333333333333333, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '417635', 'license': 'MIT', 'n_tokens_mistral': 368, 'n_tokens_neox': 344, 'n_words': 54, 'path': 'src/manuscript_extra_plots.ipynb', 'repo_name': 'denadai2/bayesian-crime-multiple-cities', 'size': '857'}