Bikeshare Insights: Summer in the Windy City
  • AI Chat
  • Code
  • Report
  • Beta
    Spinner

    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.

    Source: Divvy Bikes

    🌎 Some guiding questions to help you explore this data:

    1. How many observations are in the dataset? Are there null values?
    2. How would you clean and prepare the data for analysis?
    3. Which bike types are popular and which ones aren't? Check if being a member or casual rider makes a difference in bike choice.
    4. 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:

    import pandas as pd
    import matplotlib.pyplot as plot
    import seaborn as sns
    from datetime import datetime
    divvy_jan2023 = pd.read_parquet("202307-divvy-tripdata.parquet")
    divvy_jan2023.head()

    Explor and clean your data

    # Get information about data
    divvy_jan2023.info()
    # Get numbers of rows
    divvy_jan2023.shape
    # Get statistic summary
    divvy_jan2023.describe()
    # missing values
    divvy_jan2023.isna().sum()

    Convert from object to datetime.

    # convert object to datetime
    divvy_jan2023["started_at"] = pd.to_datetime(divvy_jan2023["started_at"])
    divvy_jan2023["ended_at"] = pd.to_datetime(divvy_jan2023["ended_at"])
    divvy_jan2023
    # Check data types of your data
    divvy_jan2023.dtypes

    Convert object to categorical

    β€Œ
    β€Œ
    β€Œ