<jupyter_start><jupyter_text>Scrape DataPlease dont execute these and create unnecissary load on knoxville's servers. The data is already available. The next section will download the latest data.<jupyter_code># knoxdata.get_and_write_crime_dataframes()<jupyter_output><empty_output><jupyter_text>Crime DatasetKeep in mind this is quite large about `200Mb`. I includes 7 years of data from what I can tell. It could be possible to get more.<jupyter_code>print('Loading dataset takes awhile if downloading over internet it is around 200Mb')

# crimes_df = pd.read_csv('../data/crime/crime.csv', index_col=0, parse_dates=['date', 'datetime'])
crimes_df = pd.read_csv('https://gitlab.com/costrouc/knoxville-opendata-notebooks/raw/master/data/crime/crime.csv', index_col=0, parse_dates=['date', 'datetime'])
crimes_df.info()
# crimes per year
crimes_df.date.dt.year.value_counts()
# 25 most common crimes
crimes_df.crime.value_counts()[:25].plot(kind='bar', figsize=(20, 10))
# crimes plot longitude and latitude
# crimes_df.plot.hexbin(x='longitude', y='latitude', gridsize=200, figsize=(20, 10))
crimes_df.plot.scatter(x='longitude', y='latitude', s=0.05, alpha=0.05, figsize=(20, 10))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1327287716405606, 'fraction_numerical': 0.028029678483099753, 'mean_word_length': 6.9868421052631575, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '579373', 'license': 'MIT', 'n_tokens_mistral': 448, 'n_tokens_neox': 410, 'n_words': 102, 'path': 'notebooks/crime.ipynb', 'repo_name': 'knoxdata/knoxville-opendata-notebooks', 'size': '1213'}