Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overall statistics #109

Open
nuest opened this issue Nov 5, 2013 · 7 comments
Open

Overall statistics #109

nuest opened this issue Nov 5, 2013 · 7 comments

Comments

@nuest
Copy link
Contributor

nuest commented Nov 5, 2013

Create statstics for complete database ("the current state"):

  • overall driven kilometers
  • number of tracks
  • number of contributors
  • number of cars
  • overall CO2 emission per kilometer
  • accumulated CO2 emission

Think about the temporal resolution of the statistics (archive), potentially cached.

Regarding the website presentation, the page should show the statistics starting with the overall statistics of "just now" and two graphs of three graphs that are interesting to observe over time (no user interaction, just preconfigured graphs)

  • length of tracks in kilometers
  • co2 emission per driven kilometer over time

Other statistics, such as number of cars, users, contributors should be prepared on the server side but not added to the website.

@ghost ghost assigned MartinDueren Nov 5, 2013
@matthesrieke
Copy link
Member

Number of tracks is available through calling https://envirocar.org/api/stable/tracks?limit=1

The HTTP Response Header Link provides links to next and last. The page of the last corresponds to the total number of tracks:

Link: <https://envirocar.org/api/stable/tracks?limit=1&page=384>;rel=last;type=application/json, <https://envirocar.org/api/stable/tracks?limit=1&page=2>;rel=next;type=application/json

@nuest
Copy link
Contributor Author

nuest commented Nov 6, 2013

Great - I would collect that information in a API though an not use headers. But the code should show how the information can be retrieved server side, which is good.

@nuest
Copy link
Contributor Author

nuest commented Nov 6, 2013

API sketch (comments welcome @matthesrieke), should probably move this issue to the server.

  • /rest/statistics/
    • already exists
    • change into a list of available statistics resource (like https://envirocar.org/api/stable/) and provide the content under rest/statistics/phenomenon/:phenomenonid
  • /rest/statistics/project
  • /rest/statistics/project?fields={:id}
    • return just the information for one identifier (value, id, description, unit)
  • /rest/statistics/project/:year/:month/:week?fields={:id}
    • the same information as above but only for specific months or days
    • examples
      • /rest/statistics/project/
      • /rest/statistics/project/2013/8/23
      • /rest/statistics/project/2013/8?fields={emission:co2,tracklength}
{
   "source":"www.envirocar.org",
   "statistics":[
      {
         "value":12345.6,
         "id":"tracklength",
         "description":"The accumulated number of the kilometers of all tracks on the enviroCar server.",
         "unit":"km"
      }
   ]
}

@matthesrieke
Copy link
Member

I would collect that information in a API though an not use headers

headers can be part of the API. We currently only support HTTP anyhow. But providing nice JSON is also fine with me.

@MartinDueren
Copy link
Member

screenshot from 2013-11-15 12 57 16

This is a rough sketch of how we could show some statistics on the landing page. Of course a little fancier ;)

@ahitch
Copy link
Member

ahitch commented Nov 18, 2013

Am 15.11.2013 12:58, schrieb MartinDueren:

screenshot from 2013-11-15 12 57 16
https://f.cloud.github.com/assets/2618987/1549695/28de7d10-4ded-11e3-9776-8586f05c8561.png

This is a rough sketch of how we could show some statistics on the
landing page. Of course a little fancier ;)


Reply to this email directly or view it on GitHub
#109 (comment).

As long as it is clear what the numbers represent: number of active
envirCar participants, number of tracks... What do we want to show?

Ann Hitchcock
52°North Initiative for Geospatial Open Source Software GmbH
Martin-Luther-King-Weg 24
48155 Muenster, Germany

tel. +49 (0)251 396371 -21
fax: +49 (0)251 396371 -11

[email protected]
http://52north.org

General Managers:
Dr. Albert Remke, Dr. Andreas Wytzisk
Local Court Muenster HRB 10849

@nuest
Copy link
Contributor Author

nuest commented Dec 18, 2013

Discussion of API layout continued in server issue enviroCar/enviroCar-server#170

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

No branches or pull requests

4 participants