<jupyter_start><jupyter_text>Jupyter Data Science Workflow From exploratory analysis to reproducible science*<NAME>**Home in his living room*<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
import os
import pandas as pd

FREMONT_URL = "https://data.seattle.gov/api/views/65db-xm6k/rows.csv?accessType=DOWNLOAD"


def get_fremont_data(filename='fremont.csv', url=FREMONT_URL, force_download=False):
    """Download and cache the fremont data
    
    Parameters
    ----------
    filename : string (optional)
        location to save teh data
    url : string (optional)
        web location of the data
    force_download : bool (optional)
        if True, force redownload of the data
    
    Returns
    ----------
    data: pandas.DataFrame
        The Fremont bridge data
    """
    if force_download or not os.path.exists(filename):
        Fremont = pd.read_csv(URL)
        Fremont.to_csv('fremont.csv')
    data=pd.read_csv('fremont.csv', index_col='Date', parse_dates=True)
    data.drop(columns = "Unnamed: 0", inplace=True)
    data.columns = ('West', 'East')
    data['Total'] = data.West + data.East
    return data
plt.style.use('seaborn')
%matplotlib inline
from jupyterworkflow.data import get_fremont_data
data = get_fremont_data()
!head Fremont.csv
data.head()
data.plot()
data.resample('W').sum().plot();
ax = data.resample('D').sum().rolling(365).sum().plot();
ax.set_ylim(0, None)
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);
get_fremont_data?
get_fremont_data??
2+2<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13903743315508021, 'fraction_numerical': 0.008912655971479501, 'mean_word_length': 3.9529411764705884, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '576566', 'license': 'MIT', 'n_tokens_mistral': 604, 'n_tokens_neox': 584, 'n_words': 127, 'path': 'JVPFremont.ipynb', 'repo_name': 'spencertollefson/JVPExample', 'size': '1694'}