Friday, April 28, 2017

Planning a trip


On my last post I talked about Google Maps... Today I'm going to share a couple of holiday itineraries that I've put together using Google Maps:

London 2015
Vienna-Prague-Berlin 2016
Portugal & Spain 2018

This is the process that I've followed for planning these schedules:

  • Research (browse the web, read guides, listen to podcasts).
  • Enlist the interesting places you want to visit.
  • Place the points in a map.
  • Group the places into areas that are close to each other.
  • Consider opening times and special events (exhibitions, concerts, festivals, etc). 
  • Investigate restaurants and bars (check reviews on Foursquare and Trip Advisor).
  • Choose an area for your hotel (the maps in Airbnb and Trip Advisor are very useful to make sure your selection is easily accessible and not too far from where you want to be).
  • Take everything into account and plan your days.

I enjoy traveling well prepared to make the most of my time and to know a little about the places I visit. Sometimes you definitely need to improvise and sorprises can be great, but I've always found much truth in this phrase: "if you fail to prepare, you prepare to fail".

Tuesday, April 18, 2017

Google Maps for traveling

I love Google Maps and I've used them to create my own collection of interesting places when visiting a city or planning a trip:


I have also found them useful for explaining a route and defining guiding points on a map. This is an example I built to present a recommended itinerary from Mexico City to Acapulco (originally posted in my wedding blog):


Monday, April 3, 2017

O-D Animation


I just found a cool feature to animate dashboards!

It is possible to define a filter on a slide that then lets you explore the data as some kind of evolution. This works pretty neatly when observing a variable through time.

Remember the Ecobici dashboard? Check how this kind of animation can be applied on that data:


On Tableau Desktop you can automate the transitions and just hit the play button when examining your data, but this functionality doesn't work when you publish your file to the web. Anyways, the visualization looks something like this when it is automated:


Monday, March 20, 2017

Ousterhout's dichotomy


On a previous post about efficiency I shared my experience when I optimized a dashboard that was running slowly.

However, I didn't measure the performance improvement and the comparison, although very obviously noticeable, was not quantified. It wasn't important then, but in many other cases it is necessary to know more accurately. As it is said, what isn't measured can't be managed.

Measuring efficiency

Tableau's help guide includes an article on Recording and Analyzing Workbook Performance that can lead you through the step by step process on how to evaluate the performance of a workbook. I ran this analysis for the Original Ecobici file and then for the Optimized version.

When filtering the heatmap table by a certain time and day in the week, it took an average of 22 seconds for the original file to run:


While it only took 0.35 seconds for the optimized file to execute the queries implicated.


This signified that the same query ran 60 times faster on the latest workbook, but it also implied a certain tradeoff in the simplicity that the tool offers since it was a little laborious to adapt the data. In this example, it was definitely worth investing some effort in better organizing the information for Tableau to be swifter. However, in some occasions this may not be the case.

The pretentious name for this dilemma is called the Ousterhout's dichotomy:

Easy for humans to program  vs  Easy for machines to run

Monday, March 6, 2017

(Real) Data Ownwership


I'm still trapped on Nike+ since I don't want to give up more than 6 years of data. However, if I started again I'd probably use Strava.

It is a very cool mobile app and the desktop version fully allows the import and export of your data. It has pre-built widgets as the one on the left, but you can also extract the second by second readings of your training sessions.

You can download your information as a GPX file (a simple XML structure) where each reading is recorded as follows:
 
<trkpt lat="19.4226360" lon="-99.1724980">
    <ele>2244.5</ele>
    <time>2017-02-11T22:42:08Z</time>
</trkpt>


You can also extract the information as a JSON file that I found a little harder to parse, but includes a few extra measures for the accumulated distance, the instant speed and the course (as a value between 0 and 360, I guess it is measured in degrees).

I downloaded the data for a bicycle ride, I translated the JSON into a table and replicated some of the graphs that are shown in the app:

   



Monday, February 20, 2017

(Semi-Recovered) Data Ownwership

I'm still not comfortable about not being able to access my Running information in Nike+, but I'm happy that Apple has a different perspective on this and the data that my phone is capturing from my daily activity is available for me to download and use.
So, I managed to export the data from the Health application in my iPhone. The first part of the process is quite simple:
  1. Enter the app.
  2. Click the Health Data icon at the bottom of the screen.
  3. Click the export icon at the top right corner.
  4. Confirm Export.
  5. Define how you want to export. In this case I selected the email option and a ZIP file was sent to my Inbox.
The ZIP file contains an XML document that in my case had information for the past 9 months (last time I had to format my phone) organized in over 22 thousand elements of an XML tree. From this structure, I will highlight a few attributes that I think are the most relevant:

  • _type  The measure that has been recorded, peg. StepCount, DistanceWalkingRunning, etc.
  • _unit  The unit of measure that is being used, peg. count, km, etc.
  • _value  The amount, degree or size that was counted for this measurement.
  • _creationDate  Self explanatory
  • _startDate  The starting moment for this reading
  • _endDate  The ending moment for this reading

It's interesting that the app does not measure activity homogeneously and the timing in between each observation can vary from a few seconds and up to 40 minutes, although on average it makes a reading every less than 4 minutes.

I converted the XML tree into a table, I reorganized it a little bit (see the final version here) and I can finally have the same graphs as on my phone (you can drill down the horizontal axis to see the information by Month, Week and Day). The information is not as rich as in Nike+, but it is available and it is mine!

Thursday, February 9, 2017

(Lost) Data Ownwership

I've been consistently running since 2008, but I've only tracked my runs since 2011. Back then, I used an iPod nano to keep the records and later it all got stored on the Nike+ Run platform.

My 2016 totals

A few years later I had my first iPhone and I started using the Nike+ application on my mobile. I've been  very happy with this tool and although I recently tried moov and Strava, I didn't find enough reasons to migrate. However, I also came to reflect about the 5 years of data that I've loaded into Nike+, it's richness and how I'd like to access this data and do my own analysis.

I browsed the Nike+ platform and I did a quick internet search, but I couldn't find an easy way to download my data. I found some apps that claim to do the trick, but I wasn't too confident to install them or provide them with my Nike+ login/pwd. I also found a couple of pieces of code that would supposedly recover the data, but I wasn't bothered to test them and decipher what they really do.

I never read the small letters when I started my Nike+ account and I guess that I'd have registered anyways (or maybe not if I there had been a Strava integration with my iPod), but this make me think who is the owner of the data. I'm still a fan and a daily user of the app, I'm OK with Nike knowing my running habits, but not letting me export my data leaves me thinking... Who really owns the data? Nike+ or myself?