<jupyter_start><jupyter_text>Anomaly detection on Toronto data<jupyter_code>import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams['figure.figsize'] = 12, 4<jupyter_output><empty_output><jupyter_text>Load data<jupyter_code>project_folder = '../../datasets/thorium-medium/'
df_rain = pd.read_csv(project_folder + 'rainfall1.csv', parse_dates=['time'])
rain = df_rain.set_index('time')['rainfall'].fillna(0)
df_flow = pd.read_csv(project_folder + 'flow1.csv', parse_dates=['time'])
flow = df_flow.set_index('time')['flow'].fillna(0)
df = pd.concat([flow, rain], axis=1)
df<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1537290715372907, 'fraction_numerical': 0.0121765601217656, 'mean_word_length': 8.267605633802816, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '287204', 'license': 'Apache-2.0', 'n_tokens_mistral': 252, 'n_tokens_neox': 242, 'n_words': 42, 'path': 'notebooks/thorium-medium/[eda] anomalies.ipynb', 'repo_name': 'carldata/argo', 'size': '657'}