Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

CityBikeAnalytics

CityBikeAnalytics is a high-performance .NET 9.0 console application designed to fetch, merge, and analyze real-time data from the New York City CitiBike system alongside current weather conditions.

.NET C# JSON API

Key Features

  • Real-Time Data Integration: Asynchronously pulls static station metadata and live availability status using the GBFS (General Bikeshare Feed Specification).
  • Weather Awareness: Integrates the Open-Meteo API to fetch current temperature and wind speed for New York City (Lat: 40.71, Lon: -74.01).
  • Parallel Processing: Utilizes Task.WhenAll to execute multiple API requests concurrently, minimizing wait time.
  • Advanced LINQ Analytics:
    • Data Merging: Joins static and dynamic datasets based on station_id.
    • Critical Alerts: Identifies "Almost Empty" stations with fewer than 2 bikes available.
    • E-Bike Tracker: Highlights top stations for electric bike availability.
    • System Load: Calculates the overall percentage of bike occupancy across the entire network.
    • Availability Clustering: Groups stations into categories: Empty, Normal, or High Supply.
    • Geographic Insights: Determines the northernmost and southernmost active stations.
    • Street Popularity: Analyzes station names to identify the most frequent streets in the network.

Tech Stack

  • Language: C# 13 (utilizing record types for immutable data models).
  • Framework: .NET 9.0.
  • Libraries:
    • System.Net.Http: For asynchronous API communication.
    • System.Text.Json: For high-speed JSON deserialization.
    • System.Linq: For complex data querying and aggregation.

Project Architecture

  • NetworkService.cs: Handles all HTTP logic and external API communication.
  • Analyzer.cs: Contains the core business logic and LINQ reporting engine.
  • Models.cs: Defines the data structures (Records) for API responses.
  • Program.cs: The main entry point that orchestrates the data flow.

Data sourced from NYC CitiBike GBFS and Open-Meteo API.

About

Real-time CitiBike NYC Analytics tool built with C# .NET. Features: async/await, live API integration, JSON parsing, and LINQ data analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages