UEWBot / dipvis

Django-based visualiser for tournaments for the boardgame Diplomacy
GNU General Public License v3.0
7 stars 4 forks source link

Calculate distance travelled to the tournament #280

Open UEWBot opened 7 months ago

UEWBot commented 7 months ago

Now that we have Tournament.location and TournamentPlayer.location, we can calculate how far everyone travelled.

geopy looks like a good library for this.

Makes sense to add lat/long to both Tournament and TournamentPlayer, so they only have to be figured out once (might make sense to create a new field type that accepts a textual location and auto-derives the lat/long). Then we'd also want to add a distance to TournamentPlayer, again so it only has to be calculated once.

Finally, we'd need to display the results. Probably in the list of registered players and in the tournament background ("Fred Smith travelled 197km to get to the tournament")