wiki:BluePrint/Chart

BluePrint: Chart

Introduction

Charts can be used to quickly and easily visualise data. As Sahana Eden can contain larges amount of informations, Charts can be a valuable tool for presenting this information to Users to support their analysis and decision making.

Description

Types of Charts:

  • Line Charts - for quantitate data over time
  • Bar Charts - for quantitate data associated with a label
  • Pie Charts - for quantitate data associated with a label

Ideally the Sahana Eden framework would be able to be configured to produce a chart method for any resource.

Use-Cases

Project Module

  • A Regional Project Manager can use a bar chart to compare the number of projects in different countries and which hazards those projects are addressing to identify needs for new programs (eg. 2 Variable Bar Chart showing the count of projects by Country and Hazard)
  • A Project Manager can use a chart to see what types (themes) for projects are being implemented in a specific country for a specific hazard to see if there are best practices to follow or potential for innovation. (eg. 2 Variable Bar Chart showing the count of projects by Hazard Theme filtered by a country )
  • A Project Assistant can use a chart to compare the number of beneficiaries in different communities to ensure that all communities are benefiting equally (eg. 2 Variable Bar Chart showing the sum of Beneficiaries by L4 and Beneficiary Type). They may want to save this chart to put into a presentation for Donors.
  • A Project Manager can use a chart to compare the amount of funding different donors are giving to find out who the major donors are. (eg. 1 Variable Bar Chart showing the sum of Funds Contributed by Organisation filtered for a specific project). They may then want to view this data in tabular form.
  • A Project Assistant can use a chart to view the cumulative number of beneficiaries over time for a specific project/location (eg. Line Chart showing the cumulative sum of Beneficiaries over time filtered for a specific project. Multiple Lines could be shown for different Beneficiary Types)

Inventory Module

  • A warehouse manager can monitor the stock levels of a specific item in different warehouses to decide if any need to be transferred (eg. 1 Variable Bar Chart showing the quantity of an Item in different warehouses filtered for a specific item)

Human Resources

  • A Staff Manager can use a chart to compare the number of staff in different offices to get an overview of the size of each operation (eg. 1 Variable Bar Chart showing the count of Staff by different offices)
  • A Volunteer Coordinator can can use a chart to find out which communities have gaps in their number of volunteers (eg. 1 Variable Bar Chart showing the count of Volunteers by different communities). They may then want to then view these numbers on a map (although this would be an advanced feature that would be implemented at a later stage).

Requirements

Bar Chart

These requirements are based on the implementation of chart in the DRR Project Portal: http://drrprojects.net/drrp/drrpp/project/graphs. Code for this can be found here: http://bazaar.launchpad.net/~michael-howden/sahana-eden/adpc/view/head:/models/drrpp.py#L1984

Many of these requirements are documented based on the assumption that charts will be implemented with a similar method to the current S3Report method. Most of these requirements could also improve the current implementation of Reports.

Basic

  • Be able to filter the data which is used to generate the chart using S3Search widgets.
  • 2 Variable Bar Chart: Allow "Row" and "Column" data to be simultaneously displayed on the chart. The Row can have a label and the Column variable can have a colour key.

http://drrprojects.net/drrp/static/img/drrpp/graph_img.png or https://docs.google.com/a/sahanafoundation.org/spreadsheet/oimg (https://docs.google.com/spreadsheet/ccc?key=0AuNG6ihli0CudHpuZUp4dU1hY3RnM0RzOTdBZTg0LWc)

  • Allow the user to select No Column to display a 1 variable chart.
  • Remove the "Row" and "Columns" labels and just have "Display Chart for: <Row Input> and <Hazard Input>
  • Hard code a single value for the chart to plot and remove this input choice from the user (eg. Count of Project Names)
  • Automatically associate the aggregate function based on the type of field used for the value.
    • String fields will always be aggregated by Count
    • It may be desirable to always aggregate an integer/double by sum to avoid confusing users
  • When hovering over a bar, display the label (Row + Column) and value of that bar.
  • Be able to download the chart as an image file (This link maybe helpful: http://stackoverflow.com/questions/4197468/how-to-save-a-jquery-flot-graph-to-a-png-or-orther-image-formate)
  • From the Chart page, be able to navigate directly to the List page, Report page and Map page for the resource, while retaining the same Filter Criteria (and Row and Column values for the report)

Advanced

  • Automatically select the Row and Column based on the result of the Search.
    • If there is more than one result for a field that was used for the filter, use this field for the Row
    • If there is more than one result for another field that was used for the filter, use this field for the Column
    • Eg. If a Project Chart is searched by Countries: Thailand, Loas and Vietnam and Hazards: Floods & Cyclone, use Countries for the Row and Cyclone for the Column
  • By clicking on a single bar in the chart, be able to add the value for the Row and Column to the filter criteria - "Drilling Down" into the data (See http://demo.drrprojects.net/drrp/drrpp/project/graphs for a demonstration of this feature)

Line Chart

...

Pie Chart

...

Design

TBD

Implementation

S3Report

Currently charts can be generated as part of the S3Report. However as these are not initially displayed, users may over look these. Hopefully the data generated for this Report view can be utilized for the generation of the charts.

References


BluePrint

Last modified 11 years ago Last modified on 10/09/13 19:56:44
Note: See TracWiki for help on using the wiki.