A Hyper Local, Crowd Sourced, Data Driven Chatbot for Covid

Overview

The COVID-19 pandemic has captured everyone's attention and impacted our daily lives for the past few months. It is likely to remain that way for the foreseeable future too as we learn to navigate around it.

Several organizations and volunteers globally have create various kinds of dashboards, databases etc. so that information is available to everyone. Some of them are -

Approach

From the various open source applications already created for COVID, came my inspiration too, for a chat bot. The idea is to empower local communities with data and insight so that they are better informed as they go about their daily tasks and routine. This might help people assess the "risk" where -
  • some of them have to an office or public place for work
  • children going to schools/parks
  • people heading out for chores/outdoors
  • and similar scenarios

Concept

Governments, NGO's, businesses, health officials all over the world are taking several initiatives to keep people safe. However, it is imperative that local communities also take steps to safe guard themselves. The idea is to create a chat bot that is setup and maintained by each local community, kind of like a ham radio movement. 



Such chat bots could provide both quantitative and qualitative data to the users. This chat bot could act as a digital sentinel for each local community. So, let's call them DISCO (Distributed Information Sentinels for COvid) chat bots. Each of these DISCO bots will be maintained by each community.



Technology

  • The first step is to gather the relevant data. This can be done in a google spreadsheet, as it allows multiple people to update the sheet at the same time. In the example here, data from Arogya Setu app is used to capture the covid positive cases and at-risk cases for a given location. A sample spreadsheet is here. This is the kind of "quantitative" data that the DISCO bot could provide.
  • Often, many people have queries regarding the pandemic. An FAQ conversation model can be built that can also be integrated into the DISCO bot. A sample is provided here. This is the kind of qualitative data the DISCO bot could provide.
  • Next, we need a host computer to run the bot. It could be a desktop, laptop, server, cloud or even a Raspberry Pi. This bot would download the above spreadsheet regularly and keep a local cache (for quicker responses to user queries). My copy of the DISCO bot for the local community is running on my Raspberry Pi 3 that has been idle for years.
  • Lastly, the community can use Telegram chat app on a compatible device to interact with the bot. Scroll below for the demos on how to setup and use the DISCO bot.

Drivers and Goals

The following drivers and goals have driven the design and implementation of this chat bot.
  • Local
  • Yet Global
  • Community/Volunteer Driven
  • Accessible
  • Simple and Cheap

Local

As we have seen so far, each community can setup their own little 'database' in the form of a google spreadsheet. The idea is not to have a global or even a national instance of the chat bot, but for each community/locality/suburb to maintain one for themselves.

With many countries and communities in various stages of lock down at some time or other, many people - professionals, students, elderly and children (basically everyone!) are home bound most of the time. Hopefully, this idea motivates people to reuse this chat bot and build something similar for their local communities. This way, people can learn/share some knowledge on technology and help their communities at the same time. 

Yet Global

Largely, people are limiting their travel and daily routines to their immediate and near by areas. This approach can be adopted by communities and organizations around the world.

Use cases for this bot could be residential communities, educational institutions, workplaces (where remote working is not possible), etc.

Community/Volunteer Driven

The two key stakeholders for this chat bot are the volunteers -
  • Data volunteers - Their responsibility is not just to enter/maintain the data, but to also ensure that the data is "as true" as possible. The data volunteers are kind of playing the role of citizen journalists. One of the "journalistic ethics" is to have a story/lead/data verified by at least 2 independent sources. This is the reason for the google spreadsheet to have the 2 columns - "Data Source Verified By (1): and "Data Source Verified By (2)".  It is also important to ensure that the data maintained is sufficiently protected and privacy maintained. For more details, please refer Reuters Handbook.
  • Technology Volunteers - Their responsibility is to setup and run the chat bot. It should take roughly 1-2 hours to set it all up from scratch. I will be happy if someone can set it up faster than that. The source code and installation instructions are available here at Github.

Accessible

Creating chat bots using Telegram API's is incredibly simple. Also, Telegram provides various free chat clients across all devices and form factors - web, desktop, mobile and tablet apps. 

Unless someone is on a "feature phone", virtually anyone in the world should be able to access their respective local COVID chat bot over a data connection (mobile or broadband or wi-fi) from a device of their choosing.

Simple and Cheap

Simplicity here has 4 connotations -
  • simple to maintain the data
  • simple and light weight to setup and run the chat bot
  • simple and actionable insights
  • simple for anyone to use the chat bot

All the technologies used in this chat bot are either free or open source or cheap to buy.

No

Technology

Purpose

Cost

Availability

Remarks

1

Google Spreadsheet

Serves as UI and database for the volunteers to enter and maintain data

Free

Global

 

2

Python

All the programs and libraries for the chat bot are written using Python

Free

Global

 

3

Chat Bot Host

Run the chat bot and other programs

Raspberry Pi - 4,000 INR (approx. 50 USD)

Global

The chat bot created in this post runs on a Raspberry Pi 3.

Alternatively, these programs can just run in any existing laptop/desktop/server that can run python 3.6.4 or above.



Chat Bot in Action

Step 1 - Updating data in a google spreadsheet


Step 2 - Training a sample FAQ for the chat bot



Step 3 - Downloading google spreadsheet to a local file cache and running the chat bot on a Raspberry Pi



Step 4 - Testing an alpha version of the chat bot in the Telegram Web app



Step 4 - Testing current version of the chat bot in Telegram app for iPhone



How to setup your own Bot

The source code and installation instructions are available here at Github. Feel free to customize to your requirements. You can setup and run a bot for your local community/organization. 

Summary

In this example, the health and contact tracing application from the Indian central/federal government - Arogya Setu (rough English translation - Bridge to your Health) has been used to collect anonymous data for a specific location where I live.

A brief comparison between the two apps, key points highlighted in bold.
 

Arogya Setu

‘Local’ DISCO Bot

A health an contact tracing app maintained by the central/federal government of India

A community driven app built and maintained by each local community

Uses GPS, Data, Bluetooth

Uses only Data

Collects information based on the scenario

Doesn’t collect any information from end user

Provides data at a “point in time” for a location. Data available for entire country.

Provides data at a “point in time” and trends. Data available only for a location.

Contains a FAQ

Contains FAQ

Requires installation of the Arogya Setu App on Android or iOS

Requires installation of the Telegram messenger app on Desktop, Mobile and Tablet

No customization

Customization based on the needs of the community by the community volunteers themselves

Public and health agencies collate the data and feed into the app

Data volunteers need to look at the Arogya Setu app and/or other sources and enter data into a google spreadsheet for their location


Take care and stay safe. 

Comments

  1. Great analysis Rajan , Good job keep it up !!!

    ReplyDelete
  2. This is a wonderful idea. Technology of the people, by the people, for the people!

    ReplyDelete

Post a Comment

Popular posts from this blog

Meta Prompting for Success

Book Review - The Price of Being Fair

How to create a big picture