| 1 | = Timeplot Reports = |
| 2 | [[TOC]] |
| 3 | |
| 4 | Timeplots report the development of aggregated process attributes over time, e.g.: |
| 5 | |
| 6 | - the number of residents in a refugee camp |
| 7 | - the number of projects at a location |
| 8 | - the total amount of funding for a project |
| 9 | - the stock level of certain items in a warehouse |
| 10 | |
| 11 | These reports are represented as interactive graphs over a time axis. |
| 12 | |
| 13 | '''Note:''' ''Timeplot reports should not be confused with timeline reports (which are used to show individual items along a time axis).'' |
| 14 | |
| 15 | == Data Model == |
| 16 | |
| 17 | For each data item we have the following fields: |
| 18 | |
| 19 | - a numeric value (for count aggregation, this value is generally 1) |
| 20 | - a start date (can be None if that attribute has always existed) |
| 21 | - an end date (optional, can be None if the attribute is perpetual) |
| 22 | |
| 23 | == Functional Requirements == |
| 24 | |
| 25 | === Framework === |
| 26 | |
| 27 | Timeplots are meant to become a generic, configurable reporting method (similar to S3Report2), which responds to the /timeplot method. |
| 28 | |
| 29 | The method shall support both resource default options, URL options as well as interactive options selection (via Ajax-update). |
| 30 | |
| 31 | Timeplots shall support filtering, and (optionally) integrate a filter form. |
| 32 | |
| 33 | Timeplots shall support integration into S3Summary (widget-method) and S3Profile. |
| 34 | |
| 35 | Ideally, timeplots could also be exported (XLS, PDF, PNG). |
| 36 | |
| 37 | === Aggregation methods === |
| 38 | |
| 39 | Timeplot reports shall support the following aggregation methods: |
| 40 | |
| 41 | - count (number of items) |
| 42 | - sum (total value) |
| 43 | - avg (average value) |
| 44 | - min (minimum value) |
| 45 | - max (maximum value) |
| 46 | |
| 47 | === Multiple layers === |
| 48 | |
| 49 | Timeplots shall be able to report multiple value dimensions in the same graph. These dimensions can be reported as overlays (for comparison) or stacked. |
| 50 | |
| 51 | === Baseline Aggregation === |
| 52 | |
| 53 | It shall be possible to specify a time interval for the analysis. |
| 54 | |
| 55 | To be able to specify a start date/time, we must calculate baselines, i.e. the aggregated attributes at the start of the analysis interval. |
| 56 | |
| 57 | === Interval Aggregation === |
| 58 | |
| 59 | It shall be possible to specify the resolution for the aggregation. This can be: |
| 60 | |
| 61 | - hourly |
| 62 | - daily |
| 63 | - weekly |
| 64 | - monthly |
| 65 | - yearly |
| 66 | - continuous (=item timestamps define the intervals) |
| 67 | - automatic (= automatically adjust resolution after the length of the analysis interval) |
| 68 | |
| 69 | === Graph Exploration === |
| 70 | |
| 71 | The graphs shall provide interactive methods to explore each data point. This includes on-hover tooltips to display point data as well as options to use a data point to drill down into individual items. |
| 72 | |
| 73 | It shall be possible to switch between different graph types (lines or bars). |
| 74 | |
| 75 | == Implementation == |
| 76 | |
| 77 | An early prototype of timeplots has been implemented in modules/s3/s3timeplot.py, the JavaScript can be found in statis/scripts/S3/s3.jquery.ui.timeplot.js. |
| 78 | |
| 79 | The prototype is using the flot library to generate the graphs. |
| 80 | |
| 81 | ---- |
| 82 | [wiki:BluePrint] |