More EDA, Time Series, and Geospatial Data#
Today we aim to get some practice with exploratory analysis, examine some strategies for visualizing time series data, and look at some basic geospatial visualization tools.
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
Partner Exercise#
Below, a dataset with information on a bikeshare program in Washington, DC is loaded and displayed. You are tasked with exploring the data and summarizing your results in tables and plots. Use your knowledge of pandas and seaborn to explore the following questions:
What time of year is most popular for bike rentals?
What’s the most popular day of the week for bike rentals?
What’s the frequency of use for the registered versus casual user?
How does ridership change on workdays, weekends, and holidays?
bikes = pd.read_csv('https://raw.githubusercontent.com/jfkoehler/nyu_bootcamp_fa25/refs/heads/main/data/hour.csv', index_col = 0)
bikes.head()
| dteday | season | yr | mnth | hr | holiday | weekday | workingday | weathersit | temp | atemp | hum | windspeed | casual | registered | cnt | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| instant | ||||||||||||||||
| 1 | 2011-01-01 | 1 | 0 | 1 | 0 | 0 | 6 | 0 | 1 | 0.24 | 0.2879 | 0.81 | 0.0 | 3 | 13 | 16 |
| 2 | 2011-01-01 | 1 | 0 | 1 | 1 | 0 | 6 | 0 | 1 | 0.22 | 0.2727 | 0.80 | 0.0 | 8 | 32 | 40 |
| 3 | 2011-01-01 | 1 | 0 | 1 | 2 | 0 | 6 | 0 | 1 | 0.22 | 0.2727 | 0.80 | 0.0 | 5 | 27 | 32 |
| 4 | 2011-01-01 | 1 | 0 | 1 | 3 | 0 | 6 | 0 | 1 | 0.24 | 0.2879 | 0.75 | 0.0 | 3 | 10 | 13 |
| 5 | 2011-01-01 | 1 | 0 | 1 | 4 | 0 | 6 | 0 | 1 | 0.24 | 0.2879 | 0.75 | 0.0 | 0 | 1 | 1 |
Time Series and Geopandas#
Please see the colab notebook here.