<jupyter_start><jupyter_text>Jupyter Data Science Workflow  From exploratory analysis to reproducible science<jupyter_code>import os
from urllib.request import urlretrieve
import pandas as pd
%matplotlib inline
import matplotlib.pyplot as plt
plt.style.use('seaborn')

URL = "https://data.seattle.gov/api/views/65db-xm6k/rows.csv?accessType=DOWNLOAD&bom=true&format=true"

def get_fremont_data(filename="Fremont.csv", url=URL, force_download=False):
    if force_download or not os.path.exists(filename):
        urlretrieve(url, filename)
    data = pd.read_csv('Fremont.csv', index_col='Date', parse_dates=True)
    data.columns = ['East', 'West']
    data['Total'] = data['West'] + data['East']
    return data
data = get_fremont_data()
data.head()
data.resample('W').sum().plot()
data.groupby(data.index.time).mean().plot()
pivoted = data.pivot_table('Total', index=data.index.time, columns=data.index.date)
pivoted.iloc[:5,:5]
pivoted.plot(legend=False, alpha=0.01)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.149, 'fraction_numerical': 0.008, 'mean_word_length': 6.253623188405797, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '48377', 'license': 'MIT', 'n_tokens_mistral': 372, 'n_tokens_neox': 359, 'n_words': 63, 'path': 'JupyterWorkflow.ipynb', 'repo_name': 'CarlosKim94/JupyterWorkflow', 'size': '1000'}