I’ve been the usage of Trainline (formerly Capitaine Train) to e-book my education tickets across Europe given that July 2011. They provide e-book instruct tickets for a handful of international locations with no fuss so I’ve used them nearly each and every time I took the instruct because then. I’m involved by way of the GDPR law, and it offers us a remarkable possibility to take lower back management of our private information from agencies thanks to Article 20 – Right to records portability. I requested Trainline for my non-public records and determined to analyze my teaching utilization throughout these years.
Asking for your personal data
You can contact the business enterprise by using electronic mail or via their contact structure and ship an e-mail that appears like this:
Hello there,
My username on your carrier is XXXX and I would like to exercise my proper to get my non-public facts thanks to the GDPR law. Please ship me this fact with the aid of an e-mail in a machine-readable format. If you’ve obtained any sort of documentation related to it, I’m fascinated by this as well.
If I don’t get a reply in 30 days or if you refuse to comply with my request, I’ll contact my Data Protection Authority.
Have a first-class day.
Most services will ask you for proof of your identification so it’s top to connect an identification report to keep away from some other exchange. Keep proof that you despatched this e-mail in case you want to attain your Data Protection Authority to implement your rights.
Playing with my data
The Trainline group received again to below 48h hours with an automatic e-mail with a ZIP archive, which contained a JSON with my searches, savings cards, bookings, etc. This is surely uncommon so it has to be stated that they did the right job in order to be geared up for GDPR. JSON documents are naturally verbose however mine had extra than 100k strains so I had to create smaller and extra usable archives earlier than being capable to analyze my data.
I used to be solely fascinated by journeys I’ve certainly traveled (not booked or canceled for example) so my first center of attention used to be on this. I desired to have an easy CSV file, with one line per instruct journey. In order to gain this result, I wrote a small Python file that takes the supply JSON file and outputs a CSV file containing my traveled instruct journeys with primary information: departure time, arrival time, departure station, arrival station, carrier, educate number, educate type, tour class, CO2 emission, departure and arrival international locations and the wide variety of instances I’ve finished this precise educate ride in complete (or booked by way of Trainline to be exact). You can discover this Python script on my GitHub below the MIT license.
Visualization
Armed with a CSV containing my done instruct journeys, I desired to get tough thinking of my teach usage. My predominant activity used to be seeing the place and how regularly I traveled. I selected to use Kepler. gl from Uber Engineering due to the fact it’s easy to use: you go to their website, select your CSV file with latitude and longitude columns and you’re equipped to play. Your facts stay on your laptop due to the fact it’s simply a frontend application.
Here are my education journeys broken up by means of my carrier:
My most frequent journey: Paris-Rouen. Explained with the aid of the truth that I stay in Paris however come from Normandy and consequently, I go there often.
					
						
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
							
Leave Comment