CodeForAfrica / CodeForAfrica/sensors.AFRICA
Update Sensor Data Displayed on UI
- Dominant language
- JavaScript
- Stars
- 24
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
From #351
From a user's perspective, I would be interested in the most recent data from the active nodes. From a business perspective, it would be important to showcase to potential partners/general public our project's regional footprint.
To implement this, all inactive sensors can be displayed on the map using a unique visual marker, say greyed cells, with a label indicating that they have been inactive for a given period.
How I would implement this:
Have a cron job get all nodes that have been inactive since = longer period and save the results as a static JSON file. This cron job should be done each new month, for example.
The endpoint that the map will use to show active nodes will filter short period from now.
To populate the cells, counter-check the inactive nodes from the JSON file with the active nodes query results and filter out "inactive nodes" that may come back to life after the cron job was done.
What do you think?
Contributor guide
Research direction
Start by tracing the map's current active-node endpoint and the existing UI that displays sensor cells. Then define how the monthly cron job and static JSON should represent inactive nodes, including the inactivity period. Done means the map distinguishes inactive sensors, labels their inactivity, and excludes nodes that have become active again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100