Skip to content

Reports and Analytics

K Sashi Kumar edited this page Jul 25, 2017 · 4 revisions

Implementation details

This is not implemented in the client yet

The available count metrics in Forli as of now are:

  • Unanswered discussions count
  • Spammed discussions count
  • Unpublished discussions count
  • Average Sentiment Score of the discussions

The API for this is: GET /api/v1/reports

All these data are stored in Redis and falls back to the database if the data from Redis is empty. The future implementation plan for these metrics is to move the data persistence to Elasticsearch so that flexible and customizable reports metrics could be built.

Analytics Dashboard

There are 2 available dashboard metrics in Forli:

  • Volume Trends - Distribution of number of discussions created over the period of time
  • [In Development] Sentiment Trends - Distribution of sentiment scores of discussions created over the period of time

Both of these metrics queries data from Elasticsearch. The date_histogram and date_range aggregation provided by Elasticsearch is used to query the data.

The API for the metrics are:

  • PUT api/v1/reports/volume_trends
  • PUT api/v1/reports/sentiment_trends
Clone this wiki locally