COVID-19 Resource Dashboard is a project leveraging the power of Redis Search, RedisGears, and Redis PubSub to create a live-updating, crowdsourced dashboard to connect places with excess supply of masks, oxygen, and vaccines to places lacking in such supplies. Users can add locations to indicate both excess supply and required resources, and the RedisGears matching engine will utilize the power ofRedis Searchgeospatial querying to match up supplies with requirements.
- Resource and location data are stored as documents in theRedis Searchformat. They contain the fields:
- masks (Numerical)
- vaccines (Numerical)
- oxygen (Numerical)
- updated (Numerical)
- coords (Geo)
- Data is inserted (asRedis Searchdocuments) using the
HSETcommand. Details on query construction are abstracted away with theRedis SearchPython API, but the fields are as mentioned above - Data is queried using
FT.SEARCH:- Since this uses geospatial querying, heavy use of
GEORADIUS/geospatial query syntax is used - Example query:
FT.SEARCH @coords[long lat radius km] FILTER masks 1 10000 INKEYS 1 -76,40
- Since this uses geospatial querying, heavy use of
- Update are published with PUBLISH and read with SUBSCRIBE
- New data is processed with RedisGears async jobs, and sent via Redis PubSub on either the
new_datachannel ormatch_datachannel (if a resource is matched) - Example:
PUBLISH new_data "{masks: 10, ...}",SUBSCRIBE new_data
- New data is processed with RedisGears async jobs, and sent via Redis PubSub on either the
- Run the Redis labs RedisModules docker image:
docker run -p 6379:6379 redislabs/redismod - Using pip and python 3.7, install the requirements in
requirements.txt, or create a Conda environment usingconda env create --file conda_env.ymland then runconda activate redisto activate the environment. - Run
python server.pyfrombackend/. This will create a server accessible atlocalhost:5000 - Install node.js and npm if you do not already have it installed (see https://nodejs.org/en/download/). Then run
npm installandnpm startfromfrontend/, and the React frontend should appear in your web browser atlocalhost:3000/admin/dashboard


