Skip to content
Bikeshare Insights: Summer in the Windy City
Bikeshare Insights: Summer in the Windy City
This dataset contains information on Divvy Bikes, a bikeshare program that provides residents and visitors of Chicago with a convenient way to explore the city.
The workspace is set up with one CSV file containing bikeshare activities at the peak of the summer-July 2023. Columns include ride ID, bike type, start and end times, station names and IDs, location coordinates, and member type. Feel free to make this workspace yours by adding and removing cells, or editing any of the existing cells.
🌎 Some guiding questions to help you explore this data:
- How many observations are in the dataset? Are there null values?
- How would you clean and prepare the data for analysis?
- Which bike types are popular and which ones aren't? Check if being a member or casual rider makes a difference in bike choice.
- Time check! What are the peak and off-peak riding times during the day?
📊 Visualization ideas
- Bar chart: Display the number of times each bike type is used to identify the most and least used bikes.
- Grouped bar chart: Compare bike usage by member type (member vs. casual) to see if it affects bike choice.
- Heatmap: Vividly illustrate the popularity of bikes at different times during the day and week.
You can query the pre-loaded CSV files using SQL directly. Here’s a sample query:
DataFrameas
df
variable
SELECT rideable_type, COUNT(*) AS usage_count
FROM '202307-divvy-tripdata.parquet'
GROUP BY rideable_type
ORDER BY usage_count DESCDataFrameas
df1
variable
select count(*) FROM '202307-divvy-tripdata.parquet'DataFrameas
df2
variable
SELECT *
FROM '202307-divvy-tripdata.parquet'
WHERE ride_id IS NULL OR rideable_type IS NULL OR started_at is NULL OR ended_at is NULL OR start_station_name IS NULL OR end_station_name IS NULL OR start_lat is NULL OR start_lng is NULL OR end_lat is NULL OR end_lng is NULL OR member_casual is NULL ;import pandas as pd
divvy_jan2023 = pd.read_parquet("202307-divvy-tripdata.parquet")
null_columns = divvy_jan2023.columns[divvy_jan2023.isnull().any()]
null_columnsnull_start_station = divvy_jan2023[divvy_jan2023['start_station_name'].isnull()]
null_start_stationnull_start_station = divvy_jan2023[divvy_jan2023['start_station_name'].isnull() & divvy_jan2023['start_station_id'].notnull()]
null_start_stationnull_start_station = divvy_jan2023[divvy_jan2023['start_station_name'].notnull() & divvy_jan2023['start_station_id'].isnull()]x
null_start_stationimport pandas as pd
divvy_jan2023 = pd.read_parquet("202307-divvy-tripdata.parquet")
divvy_jan2023.head()Ready to share your work?
Click "Share" in the upper right corner, copy the link, and share it! You can also add this workspace to your DataCamp Portfolio