February 24, 2015
I decided to try loading data from https://secure.whistlerblackcomb.com/ls/lifts.aspx into ElasticSearch, and view it in Kibana 3 for fun. nodejs handles downloading the info and putting it into ElasticSearch, and runs Express to serve the static Kibana pages. You can launch your own instance on Heroku with this button:
Overlapping lines on graphs hide data. Users can’t tell exactly which lifts are closed by looking at the graphs because the last queried lift covers up the other lines at the same Y value.
Kibana rounds numbers to whole numbers, so the speed graph/histogram loses precision. Combine that with the overlapping lines mentioned above, and the graph becomes less useful. I had to multiply speeds by 10 before loading them into ElasticSearch (speeds are in dm/s instead of m/s), otherwise all the lifts appear only have about 4 different speeds in the graph.
Still, looking at the colourful squiggly lines is fun during opening and closing time on weekends.
The hardest part of this was making .profile.d/kibana-config.sh work. I kept running into issues with line breaks ending up in the login:password string that gets base 64 encoded and used in the Authorize HTTP header, which lead to lots of 401 Forbidden errors when Kibana tried to access ElasticSearch.
curl -X DELETE 'https://name:email@example.com/index-name' curl -X POST 'https://name:firstname.lastname@example.org/index-name'
These work great together to remove and recreate an index. Very handy when you to clear data out of 1 ElasticSearch index.
BONSAI_URL=https://name:email@example.com npm start
When working on my dev machine, I used this to start node with the same BONSAI_URL environment variable set that Heroku has.
How cool is this button?
Things to note when you deploy this:
This gradient scale might be fun. Valley lifts in green, mid-mountain in white, alpine in blue.
Maybe Whistler and Blackcomb lifts could have slightly different tints?