majk-p / how-slow-is-your-tram-script

Code examples for "How slow is your tram?" talk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code example: How slow is your tram?

This repository holds code for my talk "How slow is your tram".

It consists of few components:

  • Two api clients for different data sources, MpkWrocApiClient is more reliable
  • Vehicles algebra - adaptation layer to make the rest of the script independent of selected API
  • StatsCalculator that uses the Vehicles to obtain and summarize the data using fs2.Stream
  • main.scala file that configures and runs the process

Requirements

Make sure you have scala-cli installed.

Usage

Run scala-cli main.scala

Notice

This is just an educational project that aims to present a use case for fs2. The calculations are simplified and might not be accurate.

About

Code examples for "How slow is your tram?" talk

License:Apache License 2.0


Languages

Language:Scala 100.0%