Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents

...

  • per day Vehicle Journeys count for a date range for Line(s) or Route(s)

  • total Vehicle Journeys count for a date range for Line(s) or Route(s)

Example 1: Retrieve daily statistics

Code Block
languagegraphql
{
  lines {
    nodes {
      objectid
      service_statisticsserviceCounts(from: "2021-01-01", to: "2021-01-31") {
        date
        count
      }
    }
}  
Code Block
languagejson
{
  "data": {
    "lines": {
      "nodes": [
        {
          "objectid": "chouette:Line:d1b1f581-8b68-456c-8de8-714c142a8ec9:LOC",
          "service_statisticsserviceCounts": {
            "nodes": [
              {
                date: "2021-01-01",
                count: 17,
              },
              {
                date: "2021-01-02",
                count: 33,
              },
              ...
              {
                date: "2021-01-31",
                count: 35,
              },
            ]
        }
        {
          "objectid": "chouette:Line:d1b1f581-8b68-456c-8de8-714c142a8ec9:LOC",
           "service_statisticsserviceCounts": {
              "nodes": [
                {
                  date: "2021-01-01",
                  count: 67,
                },
                ...
              ]
           }
        }
      ]
    }
  }
}

...

Code Block
languagegraphql
{
  lines {
    nodes {
      objectid
      service_countserviceCount(from: "2021-01-01", to: "2021-01-31")
    }
}
Code Block
languagejson
{
  "data": {
    "lines": {
      "nodes": [
        {
          "objectid": "chouette:Line:d1b1f581-8b68-456c-8de8-714c142a8ec9:LOC",
          "service_countserviceCount": 456
        },
        {
          "objectid": "chouette:Line:d1b1f581-8b68-456c-8de8-714c142a8ec9:LOC",
          "service_countserviceCount": 983
        },
        ...
      ]
    }
  }
}  

Objective: Sprint 46

...