cityofaustin / homelessness-dashboard

design and development project tracking for the homelessness dashboard
3 stars 2 forks source link

Use tableau api #85

Closed easherma closed 4 years ago

easherma commented 4 years ago

This is a big change.

Instead of embedding iframes, we use the tableau API.

The api ends up rendering iframes, but at least we control them in a manageable way now.

it reads in a JSON file that matches the structure of this google sheet: https://docs.google.com/spreadsheets/d/1AhNY1nELONPMdwEhTI0EOPx5BF_94whOyQobtcnPw3s/edit#gid=0

which will make it much easier to update the links in the future, and also lays the groundwork to have other content be not managed in the code directly it also makes it easier to structure the code for this project in such a way that if/when it gets picked up or re-written as part of alpha or something else there will be more pieces of it that can be reused this way, too, if we keep having iframe problems we hopefully have more options to mitigate. like if one dosen't load now, i can actually tell which one failed in the code, so we might be able to wrap them in some javascript to retry an iframe if it fails one downside of the way its currently implemented is the initial pageload takes longer, cause its loading all of the visualizations at once essentially, instead of when you click the tab. but thats an improvement we might be able to make incrementally and IMO isn't a blocker for MVP also these embeds are a bit more responsive, if the window size changes they will resize the visualization