<jupyter_start><jupyter_text>Jupyter Data Science Workflow From timeline exploratory data analysis to reproducible Data Science in Jupyter notebook  <NAME>  Step 1 - Loading and Visualising Data<jupyter_code># Visualing plots in the notebook itself instead of separate windows
%matplotlib inline
import matplotlib.pyplot as plt
# Changing the style of the default plot using matplotlib styles module
plt.style.use('seaborn')
from jupyterworkflow.data import get_fremont_data
data = get_fremont_data()
data.head()
data.plot();
# Aggregation to ease the data visualisation
# Agregating the data by the number of rides each week ('W')
data.resample('W').sum().plot();
# Checking annual trends (growth, decline,..) for the number of riders
# Checking trends with 'rolling windows'
data.resample('D').sum().rolling(365).sum().plot();
# Getting better notion of dimensions and proportions in the data setting Y limits to include 0
ax = data.resample('D').sum().rolling(365).sum().plot();
ax.set_ylim(0, None);
# Taking a look at the trends in idividual days (grouping by specific days) 
# Grouping by each time of the day thorough the year
data.groupby(data.index.time).mean().plot();
# Seeing the whole dataset in this way using pivot table
# A line for each day of the years
pivoted = data.pivot_table('Total', index=data.index.time, columns=data.index.date)
pivoted.iloc[:5, :5]
# Plotting pivoted data
pivoted.plot(legend=False)
# Plotting pivoted data adding transparency to lines (alpha=0.01)
pivoted.plot(legend=False, alpha=0.01);<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10307298335467349, 'fraction_numerical': 0.01088348271446863, 'mean_word_length': 5.737068965517241, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '121899', 'license': 'MIT', 'n_tokens_mistral': 498, 'n_tokens_neox': 467, 'n_words': 175, 'path': 'JupyterWorkflow.ipynb', 'repo_name': 'alex4impact/JupyterWorkflow', 'size': '1574'}