kinshukdua / LiveActionMap

An attempt to map the areas with active conflict in Ukraine using twitter data and NLP.
https://www.live-action-map.com
MIT License
172 stars 15 forks source link

Catch nomatim api error/timeout #14

Closed laurin closed 2 years ago

laurin commented 2 years ago

Don't exit the whole application if fetching geolocation data fails. It will look like this:

Adding markers... (This may take a while)
 10%|█████████████████▌                                       | 50/512 [01:12<14:03,  1.83s/it] 
Getting geolocation data for the South China Sea failed
 11%|███████████████████                                      | 55/512 [01:26<19:59,  2.63s/it] 
kinshukdua commented 2 years ago

I added a retry mechanism in 4048dee9cc56de5f78129982bc5195b9ab8a0e62, closing in favor of that.

laurin commented 2 years ago

@kinshukdua Hm ok, 4048dee9cc56de5f78129982bc5195b9ab8a0e62 is a lot of duplicate code, we should probably put the loop into another function