penguin-academy / covid-19-py

COVID-19 Web App for Paraguay
https://autoreporte.org
Other
50 stars 18 forks source link

Evaluate changing the neighborhood field for a Google Map Pin #88

Open camposcristian opened 4 years ago

camposcristian commented 4 years ago

Neighbourhoods in Paraguay are quite confusing and not very well known by everyone. If users can just leave a pin on the map with a radio it could be easier to track the area and future cases. Here's an example of confusing neighbourhoods:

image

pA1nD commented 4 years ago

ohh.. that's indeed a problem. @Deeliapatricia @camposcristianeze would it be better to search by the street?

I put it like this for people to not use their exact address

camposcristian commented 4 years ago

Yep, def the idea won't be to use their exact address 👍 Streets are also repeating a bit across neighbourhoods and districts so I'd avoid that one as well

One thing I found is https://apps.senatics.gov.py/dinacopa/#/zona/zonaspostales Debugging this I got a JSON of all districts (which is maybe a more common thing to use here) and then neighbourhoods... Thinking to make a component which detects closer districts by location and then filters the list of neighbourhoods?

BTW How are you geo-filtering Paraguay using the PlacesAutoComplete component? Is it through an env var? Couldn't find it

jmayalag commented 4 years ago

How accurate is the location provided by the browser? Could we add a CovPy wants to know your location?

pA1nD commented 4 years ago

@jmayalag I think that would be something that could scare a numbers of users away.

@camposcristianeze SelectPlace component, line 22.

.getPlacePredictions(
      {
        input: input,
        types: ['(regions)'],
        componentRestrictions: { country: 'py' }
      },

I'm directly using the Google getPlacesPredictions API where I can pass an object for configuration.