{ "cells": [ { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "58e202bc07c949d598e5c04c44b2b152", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(FloatProgress(value=0.0, description='Executing', max=11.0, style=ProgressStyle(description_wid…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n" ] }, { "data": { "text/plain": [ "{'cells': [{'cell_type': 'code',\n", " 'execution_count': 1,\n", " 'metadata': {'tags': [],\n", " 'papermill': {'exception': False,\n", " 'start_time': '2020-03-08T05:39:04.416638',\n", " 'end_time': '2020-03-08T05:39:05.594100',\n", " 'duration': 1.177462,\n", " 'status': 'completed'}},\n", " 'outputs': [],\n", " 'source': \"import pandas as pd\\nimport seaborn as sns\\nimport matplotlib.pyplot as plt\\n%config InlineBackend.figure_format='retina'\"},\n", " {'cell_type': 'code',\n", " 'execution_count': 2,\n", " 'metadata': {'tags': [],\n", " 'papermill': {'exception': False,\n", " 'start_time': '2020-03-08T05:39:05.602719',\n", " 'end_time': '2020-03-08T05:39:05.688626',\n", " 'duration': 0.085907,\n", " 'status': 'completed'}},\n", " 'outputs': [],\n", " 'source': 'df = pd.read_csv(\"austin_bikeshare_20191101.csv\")'},\n", " {'cell_type': 'code',\n", " 'execution_count': 3,\n", " 'metadata': {'tags': [],\n", " 'papermill': {'exception': False,\n", " 'start_time': '2020-03-08T05:39:05.695622',\n", " 'end_time': '2020-03-08T05:39:06.601528',\n", " 'duration': 0.905906,\n", " 'status': 'completed'}},\n", " 'outputs': [],\n", " 'source': \"df['start_time'] = pd.to_datetime(df['start_time'])\\ndf['start_date'] = df['start_time'].dt.date\\ndf['start_hour'] = df['start_time'].dt.hour\"},\n", " {'cell_type': 'code',\n", " 'execution_count': 4,\n", " 'metadata': {'tags': ['parameters'],\n", " 'papermill': {'exception': False,\n", " 'start_time': '2020-03-08T05:39:06.609330',\n", " 'end_time': '2020-03-08T05:39:06.625654',\n", " 'duration': 0.016324,\n", " 'status': 'completed'}},\n", " 'outputs': [{'output_type': 'stream',\n", " 'name': 'stdout',\n", " 'text': '2019-11-05\\n'}],\n", " 'source': \"date = '2019-11-05'\\nprint(date)\"},\n", " {'cell_type': 'code',\n", " 'metadata': {'tags': ['injected-parameters'],\n", " 'papermill': {'exception': False,\n", " 'start_time': '2020-03-08T05:39:06.632824',\n", " 'end_time': '2020-03-08T05:39:06.647869',\n", " 'duration': 0.015045,\n", " 'status': 'completed'}},\n", " 'execution_count': 5,\n", " 'source': '# Parameters\\ndate = \"2019-11-07\"\\n',\n", " 'outputs': []},\n", " {'cell_type': 'code',\n", " 'execution_count': 6,\n", " 'metadata': {'tags': [],\n", " 'papermill': {'exception': False,\n", " 'start_time': '2020-03-08T05:39:06.655135',\n", " 'end_time': '2020-03-08T05:39:06.674652',\n", " 'duration': 0.019517,\n", " 'status': 'completed'}},\n", " 'outputs': [],\n", " 'source': \"filter_df = df[df['start_date'].astype(str) == date]\"},\n", " {'cell_type': 'code',\n", " 'execution_count': 7,\n", " 'metadata': {'tags': [],\n", " 'papermill': {'exception': False,\n", " 'start_time': '2020-03-08T05:39:06.681757',\n", " 'end_time': '2020-03-08T05:39:06.710937',\n", " 'duration': 0.02918,\n", " 'status': 'completed'}},\n", " 'outputs': [{'output_type': 'execute_result',\n", " 'metadata': {},\n", " 'data': {'text/plain': ' trip_id subscriber_type bikeid start_time \\\\\\n95 21217328 Local365 113G 2019-11-07 21:05:38+00:00 \\n209 21215455 Local365 2277 2019-11-07 13:56:48+00:00 \\n353 21215762 Local365 336G 2019-11-07 15:07:34+00:00 \\n495 21215287 Local365 004G 2019-11-07 13:09:40+00:00 \\n565 21217486 U.T. Student Membership 288 2019-11-07 22:22:17+00:00 \\n\\n start_station_id start_station_name end_station_id \\\\\\n95 3294 6th/Lavaca 3635 \\n209 2568 East 11th/Victory Grill 2568 \\n353 2575 Riverside/South Lamar 3293 \\n495 2495 4th/Congress 4047 \\n565 2540 17th/Guadalupe 4050 \\n\\n end_station_name duration_minutes start_date start_hour \\n95 13th/San Antonio 678 2019-11-07 21 \\n209 East 11th/Victory Grill 1 2019-11-07 13 \\n353 East 2nd/Pedernales 26 2019-11-07 15 \\n495 8th/Lavaca 10 2019-11-07 13 \\n565 5th/Campbell 597 2019-11-07 22 ',\n", " 'text/html': '
\\n | trip_id | \\nsubscriber_type | \\nbikeid | \\nstart_time | \\nstart_station_id | \\nstart_station_name | \\nend_station_id | \\nend_station_name | \\nduration_minutes | \\nstart_date | \\nstart_hour | \\n
---|---|---|---|---|---|---|---|---|---|---|---|
95 | \\n21217328 | \\nLocal365 | \\n113G | \\n2019-11-07 21:05:38+00:00 | \\n3294 | \\n6th/Lavaca | \\n3635 | \\n13th/San Antonio | \\n678 | \\n2019-11-07 | \\n21 | \\n
209 | \\n21215455 | \\nLocal365 | \\n2277 | \\n2019-11-07 13:56:48+00:00 | \\n2568 | \\nEast 11th/Victory Grill | \\n2568 | \\nEast 11th/Victory Grill | \\n1 | \\n2019-11-07 | \\n13 | \\n
353 | \\n21215762 | \\nLocal365 | \\n336G | \\n2019-11-07 15:07:34+00:00 | \\n2575 | \\nRiverside/South Lamar | \\n3293 | \\nEast 2nd/Pedernales | \\n26 | \\n2019-11-07 | \\n15 | \\n
495 | \\n21215287 | \\nLocal365 | \\n004G | \\n2019-11-07 13:09:40+00:00 | \\n2495 | \\n4th/Congress | \\n4047 | \\n8th/Lavaca | \\n10 | \\n2019-11-07 | \\n13 | \\n
565 | \\n21217486 | \\nU.T. Student Membership | \\n288 | \\n2019-11-07 22:22:17+00:00 | \\n2540 | \\n17th/Guadalupe | \\n4050 | \\n5th/Campbell | \\n597 | \\n2019-11-07 | \\n22 | \\n