back to home

Rusty Gas Prices

Gas Price Monitoring & Pattern Analysis System

rustgraphqlreqwestserdetokiodata analysis

I was speaking with a friend about having some kind of app to monitor gas prices throughout the year, but moreso throughout shorter time periods, study their patterns in hopes of analyzing gas prices across locations. And I took matters into my own hands to get my friends their optimal gas stations after reading a reddit thread of how someone programmed their home assistant to monitor gas prices.

Tech Stack

  • Rust
  • GraphQL
  • Reqwest HTTP Client
  • Serde JSON Parsing
  • Tokio Async Runtime

Key Attributes

  • Real-time gas price monitoring across US locations
  • Location-based retrieval with zipcode support
  • Fuel type comparison (cash vs credit pricing)
  • Home assistant integration with visual alerts

Development Process

  • Nationwide gas price aggregation
  • Pattern detection and forecasting
  • Handled large JSON datasets
  • Implemented efficient location-based queries to fetch gas station information
  • Preparing native app integration

Core Features

  • Price & location polling
  • Nearly 2GB of structured storage
  • Zip code-based queries

Challenges

  • Handling complex API responses and identifying reliable fuel price data
  • Started with small cities in IL, expanded to support any city in the USA or valid zipcode

Data Analysis

  • Home assistant integration with visual alerts (green for cheap, red for expensive)
  • Pattern detection to forecast future prices
  • Price analysis for cheapest and most expensive stations