ATFutures / upthat

Urban planning and transport health assessment tool
4 stars 1 forks source link

Allow switching between cities #7

Closed Robinlovelace closed 5 years ago

mpadge commented 5 years ago

I'm just going to re-open this as a prompt to me to make sure the RAM profile does what it should - drop switched-off data, and re-load only current selection

Robinlovelace commented 5 years ago

👍 After memory issues we've been having with the PCT, sounds like a good idea! https://github.com/npct/pct-shiny/pull/708#issuecomment-480536900

BTW mapdeck is superfast, I think I may never go back to good old leaflet 😢

mpadge commented 5 years ago

There is currently no code to do the actual switching between cities - the Kathmandu data are hard-wired. What we need is the ability for that switch to remove the Kathmandu data and load an alternative set.

Robinlovelace commented 5 years ago

You can switch cities. Try clicking on Accra and Kathmandu: https://atfutures.github.io/uta/. To add more cities, you just need to add net-accra.Rds (or any other city name) into the inst folder in the upthat repo that your server is running upthat from.

There may be other ways to do this, but the specific task of enabling city switching is done in the deployed version, so closing for now.

mpadge commented 5 years ago

Oh yeah, great. I just wasn't seeing that in my local version because i didn't have the local data. Thanks!

Robinlovelace commented 5 years ago

No worries - I probably should have spelled out more clearly that that's how it works. Would should probably expose a data_directory argument in runUpthat(). I think it's worth having a separate repo, e.g. called upthatdata, to host the data, albeit via piggyback. That way it can contain the code used to build the route nets.