pip install numpy pandas scipy streamlit altair
streamlit run dashboard/dashboard.py
This project analyzes bike-sharing data to understand the factors influencing bike rentals. The analysis focuses on several key aspects:
- How does weather affect the number of bike rentals?
- Is there a significant difference in bike rentals between working days and holidays?
- What are the temporal patterns in bike rentals?
- How do temperature and humidity interact to influence bike rentals?
- What insights can be gained from RFM analysis?
- What pattern can be observed from time series decomposition?
dashboard/
main_data.csv
: The main dataset used for analysisdashboard.py
: Streamlit dashboard script
data/
hour.csv
: The dataset used for analysisday.csv
: The dataset used for analysis
README.md
: This filerequirements.txt
: List of required Python packages
- Data Loading: The dataset (main_data.csv) is loaded using pandas.
- Data Preprocessing:
- Convert date to datetime
- Map weather situations and working days to descriptive labels
- Convert temperature to Celsius
- Convert humidity to percentage
- Exploratory Data Analysis (EDA):
- Analyzed the impact of weather on bike rentals
- Compared bike rentals on working days vs. holidays
- Performed time series decomposition
- Conducted simple clustering based on temperature and humidity
The Streamlit dashboard (dashboard.py
) includes:
-
Weather Impact Analysis:
- Visualizes the distribution of rental patterns
-
Working Days vs. Holidays:
- Compares bike rental patterns between working days and holidays
-
Daily Trend Analysis:
- Shows the trend of bike rentals throughout the day for working days and holidays
-
RFM (Recency, Frequency, Monetary) Analysis:
- Visualizes the distribution of rental patterns
- Provides insights into customer segmentation
-
Time Series Decomposition:
- Breaks down the rental data into trend, seasonal, and residual components
- Helps identify underlying patterns and anomalies
-
Simple Clustering:
- Groups rental patterns based on temperature and humidity
- Visualizes the relationship between weather conditions and rental frequency
-
Raw Data Display:
- Option to view the filtered dataset used in the analysis
- Ensure all required packages are installed (see Setup environment)
- Run the Streamlit app using the command provided above
- Use the sidebar controls to filter data by:
- Weather condition
- Day type (Working Day or Holiday)
- Date range
- Explore the visualizations and insights provided in the main content area
- Adjust filters to see how different conditions affect bike rentals
- Interactive filters for data exploration
- Comprehensive analysis of weather impact on bike rentals
- Comparison of rental patterns between working days and holidays
- Daily trend analysis
- RFM analysis for customer segmentation
- Time series decomposition for trend and seasonality analysis
- Simple clustering to visualize weather impacts
- Option to view raw data
-
Weather Impact:
- Weather conditions significantly influence bike rental patterns
- The clustering heatmap provides insights into optimal weather conditions for rentals
-
Working Days vs. Holidays:
- Rental patterns differ between working days and holidays
- This is visible in the RFM analysis and time series decomposition
-
Temporal Patterns:
- The time series decomposition reveals clear trends and seasonal patterns in bike rentals
- This can help in predicting future rental demands
-
Temperature and Humidity Interaction:
- The clustering analysis shows how temperature and humidity jointly affect rental frequencies
- This information can be valuable for inventory management and marketing strategies
- The raw data can be displayed by checking the 'Show Raw Data' box in the dashboard
- The dashboard is designed to handle empty filter conditions, displaying a warning when no data matches the selected filters
- For best performance, ensure your dataset (main_data.csv) is up-to-date and correctly formatted
- Implement predictive modeling for rental forecasting
- Add more advanced clustering techniques
- Incorporate external data sources (e.g., local events, public transportation schedules)
- Enhance visualization interactivity
This project is licensed under the MIT License.