ecohealthalliance / eidr

https://eidr.ecohealthalliance.org
Apache License 2.0
1 stars 0 forks source link

EIDR events can have multiple geolocations and location fields have suggested values when link is added #318

Closed mawaruDOLL closed 8 years ago

mawaruDOLL commented 8 years ago

I settled on using a select2 control to suggest locations from geonames. Locations mentioned in articles are also suggested. Scraping a url in grits isn't currently working so the article body must be copied into a field in eidr in order to get a list of mentioned locations, which are shown in a bootstrap modal where the user can select multiple locations to add. If any of the mentioned locations are already associated with the event, they will be excluded from the list.

nathanathan commented 8 years ago

The geonames should include state/province/district information when displayed, so cities that are present in more than one state (e.g. Springfield) can be disambiguated.

Scraping URLs with the GRITS API works, but only for certain URLs. I suggest using this one for testing: http://promedmail.org/direct.php?id=4351506

The article location modal could use some instructions for the user.

mawaruDOLL commented 8 years ago

I had difficulty finding a way to get multiple specific locations from a geonames web service method, which we need to do because grits only sends the administrative subdivision's code and not the name. I ended up using search with multiple place names, which will send back way more results than we want, but I think it will be less expensive to the web service than getting each location one at a time. In any case, it'll definitely use less credits for EIDR's geonames account.

I also removed the article body input and included a checkbox so the user can decide whether or not to find mentioned locations in the article.

nathanathan commented 8 years ago

👍