Skip to content

fine tuning of color markings #5

Description

@Marrrrtthias

The color markings seem very arbitrary. When I open the app right now, pretty much every station in my area is green. Only one in my city is yellow and red is not even used for ANY station shown on the map even when zoomed out.

IMG_2965
IMG_2966

After looking at the code, this seems to be the intended behaviour:

if (minPrice + 0.04 >= price) {
  return StationPriceRange.cheap;
} else if (minPrice + 0.10 >= price) {
  return StationPriceRange.normal;
} else {
  return StationPriceRange.expensive;
}

I would suggest using a different logic for the categorisation. Instead of having a fixed width for each category, in my opinion it would be better to look at the range of prices that actually exist in the area and have an "intelligent" scale: For example if the prices go from min to max:

  • mark the stations in the bottom 10 % of that interval as green (price <= min + ((max-min)*.1))
  • mark stations in the top 50 % as red (price >= min + ((max-min)*.5))
  • and everything in between as yellow

That way the scale would actually show which stations are the cheapest instead of just showing everything marked as cheap if prices are close together.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions