Features / Planning & tracking

Analytics dashboard

MIS counts for yesterday, this month and overall (farmers surveyed, C1 farmers and area, S2S farmers, targets and coverage), with drill-down to farmer lists and VO/Cadre/SHG filters.

FactsheetPlanning & tracking
Who uses it
CadreUnit In-Charge / FMT L1
How you get here
Analytics icon on the Home bottom bar (all users); Side menu > Analytics (Unit only).
APIs
8 calls today, 2 App Service operations
Offline
Shows today's cache only; refresh and filters need internet.

Screens

ScreenWhat it doesSource
DashboardTabs Yesterday MIS, Monthly MIS and Overall MIS with last-refreshed time and Refresh.app/src/main/java/org/platformcommons/urvi/view/dashboard/DashboardFragment.kt
Analytics farmer listFarmers behind a tapped count.app/src/main/java/org/platformcommons/urvi/view/dashboard/AnalyticsIeListFragment.kt

What it captures

FieldTypeRequiredValidationOptions from
VO filter (Cadre)multi-select with AllNoNeeds internet. Title "Select VO".Distinct VOs in local farmer data
Cadre filter (Unit)multi-selectNoNeeds internet. Changing cadres resets VO and SHG. Has Clear all.Server analytics data
VO filter (Unit)multi-selectNoCascades from Cadre; changing VOs resets SHG. Has Clear all.Server analytics data
SHG filter (Unit)multi-selectNoCascades from VO. Has Clear all.Server analytics data

Rules

Conditions from the code, rewritten as plain decision rules.

WhenThen
Cached analytics were fetched today (KEY_ANALYTICS_DATA_LAST_DATE)Show the cached data.
Cached analytics are older than todayShow a no-data animation until the user taps Refresh.
The filter is opened offlineShow a no-internet toast.
A filter is appliedSave the selection in preferences.
A count is tappedOpen the list of those farmers.
The dashboard is openHide the bottom bar's search and Add farmer button.
The user is UnitThe 12-hourly analytics background worker is not started.

API contracts

Each call opens to its use case, headers, request and response bodies, and errors.

App Service v2: operationUse
GET /configTyped config bundle (ETag)
GET /analytics/dashboardMIS dashboard for cadre or unit

Behaviour notes

  • Results are stored as a JSON blob in pref KEY_ANALYTICS_DATA.
  • Filter titles are hard-coded English.

Improve in the rewrite

  • Show stale data with a "last updated" label instead of an empty screen.
  • Store analytics in a database table with timestamps.