Covid-Self-report-Tool / cov-self-report-frontend

Frontend repository for COVID-19 self-reporting tool in React
https://www.covidselfreport.org
MIT License
10 stars 1 forks source link

Feature request -- Display the count of varied symptoms given a geo-radius #75

Open parvinsingh opened 4 years ago

parvinsingh commented 4 years ago

A user on the tool should be able to see the count of people with varied symptoms, when he/she provides a geo-radius.

e.g: Given a 100 mile radius, the map should display number of people with varied symptoms.

Related items

Resolution

The current data is stored in DynamoDB. a) we need geo-spatial queries, AWS SDK provides tooling around this. b) we fetch all the symptoms within a given radius. c) we then parse the data in memory (will try and see if this can also be done in the query itself).

Additional context

Unsure if the current data type for geo-location column will support our use case.

abettermap commented 4 years ago

We should be able to do something simple like this with Leaflet. Would need to convert 100 miles to meters first, then use that as the radius for the Circle:

const radius = 160934; // 100 miles
const circle = L.circle([52.370216, 4.895168], { radius }).addTo(map);

Docs for Leaflet Circle