<jupyter_start><jupyter_text><NAME>  DATA 515  Homework 1  April 16 2019<jupyter_code>import pandas as pd
import matplotlib.pyplot as plt<jupyter_output><empty_output><jupyter_text>Question 1<jupyter_code>data = pd.read_csv('../data/Fremont_Bridge_Hourly_Bicycle_Counts_by_Month_October_2012_to_present.csv')
data.head()<jupyter_output><empty_output><jupyter_text>Question 2<jupyter_code>data['total_count'] = data['Fremont Bridge East Sidewalk'] + data['Fremont Bridge West Sidewalk']
data['Date'] = data.Date.apply(lambda x: pd.to_datetime(x))
data['hour'] = data['Date'].apply(lambda x: x.hour)
data['year'] = data['Date'].apply(lambda x: x.year)
data.head()<jupyter_output><empty_output><jupyter_text>Question 3<jupyter_code>data_2016 = data[data['year'] == 2016]<jupyter_output><empty_output><jupyter_text>Question 4 I was a little confused about what this question is asking.  I summed all trips by hour.<jupyter_code>plt.plot(data.groupby('hour').sum().total_count)
plt.title('total crossings by hour of day')
data.groupby('hour').mean().total_count<jupyter_output><empty_output><jupyter_text>Question 5<jupyter_code>plt.plot(data.groupby('hour').mean().total_count)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14463840399002495, 'fraction_numerical': 0.022443890274314215, 'mean_word_length': 9.846846846846846, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, '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': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '399659', 'license': 'MIT', 'n_tokens_mistral': 472, 'n_tokens_neox': 438, 'n_words': 69, 'path': 'analysis/data515_homework1_peter_meleney.ipynb', 'repo_name': 'UWSEDS/manipulating-data-in-python-pmeleney', 'size': '1210'}