An end-to-end data analytics project exploring Citi Bike ridership in Jersey City through Python-based analysis, SQL, PostgreSQL/PostGIS, weather integration, geospatial analytics, and interactive data visualization.
The project evolved from exploratory analysis of Citi Bike trip data into a complete analytical workflow that combines data engineering, statistical analysis, spatial analysis, SQL analytics, year-over-year comparison, and business-oriented insights.
The goal of this project is to understand Citi Bike usage patterns in Jersey City and identify the temporal, behavioral, environmental, and geographic factors associated with bike-sharing demand.
The analysis covers:
- Citi Bike trip patterns and demand
- Seasonal and monthly trends
- Member vs. casual rider behavior
- Hourly and weekday/weekend usage
- Weather and ridership relationships
- Station-level activity
- Popular routes
- Station departure/arrival imbalance
- Neighborhood-level activity
- Geospatial patterns across Jersey City
- 2025 vs. 2026 ridership changes
- Business-oriented recommendations
The project combines Python analytics with a relational and spatial database layer, resulting in an interactive portfolio presentation.
The analysis focuses on several key questions:
- How does Citi Bike demand change throughout the year?
- Which periods experience the highest and lowest demand?
- How did ridership change between 2025 and 2026?
- What is the distribution between members and casual riders?
- Has the user composition changed over time?
- When are Citi Bike trips most frequently taken?
- How does temperature relate to bike usage?
- Do precipitation and wind conditions affect demand?
- Can weather help explain daily fluctuations in ridership?
- Which stations generate the most departures?
- Which stations receive the most arrivals?
- What are the most popular station-to-station routes?
- Which stations experience significant departure/arrival imbalance?
- Which Jersey City neighborhoods have the highest Citi Bike activity?
- How does station activity vary spatially?
- Which areas appear to function as major mobility hubs?
- Python
- Pandas
- NumPy
- Matplotlib
- Plotly
- GeoPandas
- PostgreSQL
- SQLAlchemy
- PostGIS
- Docker
- Plotly
- Folium
- HTML / CSS / JavaScript
- Citi Bike trip data
- Open-Meteo weather data
- Jersey City geographic boundary data
- Jupyter Notebook
- VS Code
- Conda
- Git
- GitHub
citibike/
โ
โโโ data/
โ โโโ citibike/
โ โโโ Citi Bike trip data
โ โโโ JC2025.csv
โ โ
โ โโโ processed/
โ โโโ JC2025_Enriched.csv
โ
โโโ notebooks/
โ โโโ 1_Download_Citibike_Jersey_Data.ipynb
โ โโโ 2_Data_Enrichment.ipynb
โ โโโ 3_Weather_Data.ipynb
โ โโโ 4_Data_Visualization.ipynb
โ โโโ 5_Neighborhood_Analysis.ipynb
โ โโโ 6_SQLAlchemy_with_CitiBike.ipynb
โ โโโ 7_2026_Data.ipynb
โ โโโ 8_2025_vs_2026_comparison.ipynb
โ โโโ 9_Final_Business_Analysis.ipynb
โ
โโโ postgis_data/
โ
โโโ presentation/
โ โโโ index.html
โ โโโ script.js
โ โโโ style.css
โ
โโโ .gitignore
โโโ docker-compose.yaml
โโโ requirements.txt
โโโ README.md
The project is organized into nine analytical stages, progressing from raw data ingestion to final business insights.
| Notebook | Purpose |
|---|---|
1_Download_Citibike_Jersey_Data.ipynb |
Data acquisition and initial dataset preparation |
2_Data_Enrichment.ipynb |
Data cleaning and feature engineering |
3_Weather_Data.ipynb |
Weather data collection and preparation |
4_Data_Visualization.ipynb |
Exploratory data analysis and visualization |
5_Neighborhood_Analysis.ipynb |
Geospatial and neighborhood-level analysis |
6_SQLAlchemy_with_CitiBike.ipynb |
PostgreSQL, SQLAlchemy and PostGIS integration |
7_2026_Data.ipynb |
2026 Citi Bike data ingestion and analysis |
8_2025_vs_2026_comparison.ipynb |
Year-over-year comparison |
9_Final_Business_Analysis.ipynb |
Consolidated business analysis and final insights |
The raw Citi Bike trip data was processed and transformed using Pandas.
The workflow includes:
- Data loading and consolidation
- Data type conversion
- Datetime processing
- Missing-value handling
- Data quality checks
- Ride duration calculation
- Date and time feature extraction
- Month and season classification
- Hourly analysis
- Weekday/weekend classification
- User-type segmentation
- Station-level aggregation
- Route-level aggregation
The processed datasets provide the foundation for both exploratory analysis and database-based analytics.
The exploratory analysis investigates Citi Bike demand across multiple dimensions.
- Monthly ridership
- Seasonal ridership
- Daily ride patterns
- Day-of-week patterns
- Weekday vs. weekend behavior
- Hourly demand
- Member vs. casual riders
- User-type distribution
- Changes in user composition over time
- Top departure stations
- Top arrival stations
- Station activity
- Departure/arrival balance
- Most frequently used station pairs
- High-volume travel corridors
- Network connectivity patterns
Interactive Plotly visualizations were used throughout the analysis to make patterns easier to explore.
Weather data was integrated with daily Citi Bike activity using the Open-Meteo Archive API.
The analysis considers environmental variables such as:
- Temperature
- Precipitation
- Rain
- Snow
- Wind
Daily Citi Bike demand was merged with corresponding weather observations to investigate relationships between environmental conditions and ridership.
One of the strongest patterns identified in the analysis was the positive relationship between temperature and daily Citi Bike usage.
Station activity was calculated by combining trip departures and arrivals.
For each station, the following metrics were analyzed:
- Total Activity = Departures + Arrivals
- Net Departures = Departures โ Arrivals
These metrics help distinguish between:
- High-volume stations
- Major departure points
- Major arrival points
- Balanced stations
- Stations with significant network imbalance
Transit-oriented locations emerged as important activity hubs within the Jersey City Citi Bike network.
Trip-level records were aggregated into station-to-station routes.
The route analysis identifies:
- Most frequently used routes
- Major travel corridors
- High-volume station connections
- Potential commuting patterns
Route-level aggregation also provides the foundation for interactive geographic visualization of Citi Bike flows.
GeoPandas and PostGIS were used to analyze Citi Bike activity geographically.
The geospatial workflow includes:
- Station coordinate processing
- Point geometry creation
- Coordinate Reference System management
- Spatial joins
- Station-to-neighborhood mapping
- Neighborhood-level aggregation
- Route mapping
- Choropleth visualization
- Interactive station maps
Station coordinates were represented using geographic coordinates and integrated with Jersey City neighborhood boundaries.
Station-level metrics were aggregated by neighborhood to identify broader spatial patterns.
Neighborhood-level metrics include:
- Number of stations
- Total departures
- Total arrivals
- Total activity
- Net departures
- Average activity per station
This provides a more meaningful geographic perspective than looking only at individual station rankings.
The analysis helps identify neighborhoods functioning as:
- Major mobility hubs
- Residential demand centers
- Transit-connected areas
- High-activity destinations
- Potentially imbalanced areas
The project was extended with a database layer using PostgreSQL, SQLAlchemy, and PostGIS.
The goal was to move beyond a Pandas-only workflow and demonstrate how analytical datasets can be structured and queried within a relational database.
The database contains analytical datasets representing:
| Dataset | Purpose |
|---|---|
| Citi Bike trips | Ride-level transactional data |
| Weather | Daily environmental observations |
| Neighborhoods | Geographic boundaries |
| Stations | Station-level activity and spatial information |
SQLAlchemy provides the connection between Python and PostgreSQL, while PostGIS enables spatial data storage and geographic operations.
The database layer allows analytical questions to be answered directly using SQL.
Examples include:
- Monthly ride counts
- Station departures
- Station arrivals
- Total station activity
- User-type analysis
- Hourly demand
- Weather-related aggregations
- Station imbalance
- Geographic aggregation
Example:
SELECT
start_station_id AS station_id,
COUNT(*) AS departures
FROM jersey_city_2026
WHERE started_at >= '2026-02-01'
AND started_at < '2026-07-01'
GROUP BY start_station_id;This database-driven approach makes the analysis more scalable and creates a foundation for connecting the data to Business Intelligence tools.
The project was extended with 2026 Citi Bike data to perform a year-over-year comparison.
The comparison focuses on comparable periods rather than comparing a complete year against a partial year.
The analysis evaluates:
- Total ridership
- Monthly demand
- Member vs. casual behavior
- User composition
- Hourly demand
- Weather relationships
- Station-level changes
- Station performance
Overall Ridership 2026 ridership was slightly lower than the comparable 2025 period.
User Composition Casual riders increased their share of total rides, indicating a shift in the composition of Citi Bike demand.
Peak Usage The strongest hourly demand occurred around the evening commuting period, with 17:00 identified as the peak hour.
Weather Temperature showed a strong positive association with daily ridership.
Seasonal Recovery Later months in the analyzed period showed stronger ridership performance, including a notable improvement in June compared with the previous year.
The analysis generated several business-relevant conclusions.
- Citi Bike demand is strongly seasonal โ Bike-sharing activity increases substantially during warmer periods and declines during colder months.
- Weather is an important demand driver โ Temperature has a strong relationship with daily ridership, making weather an important factor when interpreting demand fluctuations.
- Evening commuting is a major usage pattern โ The 17:00 peak suggests a significant commuting component in Citi Bike usage.
- Casual usage is becoming more important โ The share of casual riders increased in the year-over-year comparison, suggesting potential opportunities for leisure, tourism, and short-term users.
- Transit hubs are major mobility centers โ Stations near major transportation locations show particularly high levels of activity.
- Station imbalance can reveal operational needs โ Comparing departures and arrivals can identify stations that may require bike redistribution.
- Neighborhood-level analysis reveals broader spatial patterns โ Analyzing station activity within neighborhoods provides additional context that cannot be captured by station rankings alone.
The final stage of the project consolidates the analytical findings into a business-oriented view.
The analysis moves from:
What happened?
โ
Why did it happen?
โ
Where did it happen?
โ
Who is driving the demand?
โ
What factors influence demand?
โ
What could the business do about it?
Potential business applications include:
- Bike redistribution planning
- Station capacity planning
- Seasonal resource allocation
- Weather-aware demand planning
- Customer segmentation
- Casual rider acquisition
- Geographic expansion decisions
The final findings were transformed into an interactive HTML presentation using:
- HTML
- CSS
- JavaScript
- Plotly
The presentation focuses on data storytelling rather than simply displaying individual charts.
It includes:
- Executive Summary
- Key Performance Indicators
- Monthly Ridership
- User Type Analysis
- Weekday / Weekend Patterns
- Hourly Demand
- Weather Impact
- Top Stations
- Station Performance
- Network Imbalance
- Key Business Insights
The presentation is located in:
presentation/
โโโ index.html
โโโ script.js
โโโ style.css
Database credentials and connection settings are stored in environment variables and are not committed to the repository.
A local .env file is used for database configuration.
Example:
DATABASE_URL=postgresql://user:password@localhost:5432/database
Make sure .env is included in .gitignore.
1. Clone the repository
git clone https://github.com/arpidata/citibike.git
cd citibike2. Create the Conda environment
conda create -n citibike python=3.123. Activate the environment
conda activate citibike4. Install dependencies
pip install -r requirements.txt5. Launch Jupyter Notebook
jupyter notebook6. Run the notebooks
Follow the analytical workflow in order:
1. Data Download
โ
2. Data Enrichment
โ
3. Weather Integration
โ
4. Data Visualization
โ
5. Neighborhood Analysis
โ
6. PostgreSQL / SQLAlchemy / PostGIS
โ
7. 2026 Data
โ
8. 2025 vs. 2026 Comparison
โ
9. Final Business Analysis
The overall database architecture can be summarized as:
Citi Bike Data
โ
โผ
Pandas
โ
โโโโโโโโโโโผโโโโโโโโโโ
โ โ โ
โผ โผ โผ
Weather GeoJSON Feature
Data Boundaries Engineering
โ โ โ
โโโโโโโโโโโผโโโโโโโโโโ
โผ
PostgreSQL
โ
PostGIS
โ
โผ
SQL Analytics
โ
โโโโโโโโโโโผโโโโโโโโโโ
โ โ โ
โผ โผ โผ
Temporal Spatial Business
Analysis Analysis Analysis
โ โ โ
โโโโโโโโโโโผโโโโโโโโโโ
โผ
Visualization
โ
โผ
Interactive Presentation
The project uses publicly available Citi Bike trip data for Jersey City, combined with weather observations and geographic boundary data.
The datasets are used for analytical and educational purposes.
The project was developed incrementally through several stages.
Phase 1 โ Python Data Analysis Raw Citi Bike data was cleaned, transformed, and explored using Python and Pandas.
Phase 2 โ Weather Integration Weather data was introduced to investigate environmental factors affecting ridership.
Phase 3 โ Geospatial Analysis GeoPandas and Folium were used to analyze stations, routes, and neighborhoods.
Phase 4 โ Database Engineering The project was extended with PostgreSQL, SQLAlchemy, and PostGIS.
Phase 5 โ SQL Analytics Business questions were translated into SQL queries and database-level aggregations.
Phase 6 โ 2026 Data Expansion Additional Citi Bike data was incorporated to enable year-over-year analysis.
Phase 7 โ Comparative Analysis 2025 and 2026 were compared across ridership, user behavior, temporal patterns, weather, and station performance.
Phase 8 โ Final Business Analysis The analytical results were consolidated into actionable business insights.
Phase 9 โ Data Storytelling The final findings were presented through an interactive HTML presentation.
This project demonstrates practical experience in:
- Data Cleaning
- Data Wrangling
- Feature Engineering
- Exploratory Data Analysis
- Python Programming
- Pandas
- SQL
- PostgreSQL
- SQLAlchemy
- PostGIS
- Geospatial Analytics
- Statistical Analysis
- API Integration
- Weather Data Integration
- Data Visualization
- Interactive Visualization
- Interactive Mapping
- Business Analysis
- Data Storytelling
- Git & GitHub
- Database-driven Analytics
Arpenik Mesropyan Radiologist โ Data Analyst
Healthcare professional transitioning into Data Analytics, with a strong interest in:
- Data Analytics
- SQL
- Python
- Data Visualization
- Geospatial Analytics
- Business Intelligence
- Healthcare Analytics
This project demonstrates the ability to combine domain knowledge, programming, databases, analytical thinking, and visualization to transform raw data into meaningful business insights.
GitHub: https://github.com/arpidata/citibike
โญ If you find this project interesting, feel free to explore the notebooks and interactive presentation.