Show HN: I'm an airline pilot – I built interactive graphs/globes of my flights (jameshard.ing)

1437 points by jamesharding ↗ HN
Hey HN!

Pilots everywhere are required to keep a logbook of all their flying hours, aircraft, airports, and so on. Since I track everything digitally (some people still just use paper logbooks!), I put together some data visualizations and a few 3D globes to show my flying history.

This globe is probably my favourite so far: https://jameshard.ing/pilot/globes/all

If you’ve got ideas for other graphs or ways to show this kind of data, I’d love to hear them!

210 comments

[ 3.1 ms ] story [ 90.1 ms ] thread
Very cool! I didn't know pilots are required to maintain a logbook. What's the official recommendation for this - using a paper logbook?
Each country has slightly different requirements! For the US, here is the FAA rule for it: https://www.ecfr.gov/current/title-14/chapter-I/subchapter-D...

A lot of people still use paper (and fill it in after landing each flight), but there are quite a few digital options on the market now. I use one called LogTen, which stores everything in a SQLite file behind the scenes which is what I used to make this.

What happens if you lose it?
You go back to every airline you ever worked for, beg for your flight logs, hope they are willing to provide them, and then over the course of weeks re-enter them into your paper logbook or software. Then you hope that the airline will also be willing to sign-off your logbook.

TL;DR: you're screwed.

You are only required to log time required for 61.51.a.1 or .a.2, but are not required to log “all [your] flying hours” by the FAA. (Your airline might require it and it’s a good idea to log all your flights, but it’s not a law.)
This is great data visualization of interesting data! I'm curious about the last graph; there seems to be something making some of the longest flights take more time/nm. Is that real or an artifact, and is there an explanation for the tail?
Great question! It is not an anomaly, it is very geographically specific.

Due the the Ukraine war (and my home base being in the UK), we have to fly the long way around to get to far-east destinations like Tokyo and Hong Kong. Flying outbound from London we have to fly down over Turkey (which adds about two hours of flight time).

Flying home from Tokyo with the ongoing airspace closure, if the the weather is suitable at the ETOPS airports enroute, it is actually quicker to fly home eastbound again, flying up over Alaska. A proper around-the-world in 4 days!

So for London-Tokyo the return route is completely different from the outbound route? Fascinating! I guess that has something to do with the jetstream (which only helps you when travelling eastbound)?
I wonder if you can spread out the airport labels a bit when they're clustered together, like the cluster around CYOO in the US.
Good idea! Not sure exactly how to do this with globe.gl but I will look into it.
[flagged]
Oh come on, lighten up a little, it's Friday, it's kinda cool as a display tool. should we reduce the number of flights and CO2 released? Of course.

But no need to be rolling in on a guy that just did something neat...

I’m also not sure how much sense it makes to talk about the personal carbon footprint of a pilot flying for their job, in terms of “could they make decisions that would change how much is released”
(comment deleted)
Having a computer engineering background, what motivated you to become a pilot and switch careers?
Looking at your projects, seems like you still have the hacker going in you! Saw Home Assistant one! Kudos!
Love Home Assistant! I have a screen on my split flap display that shows aircraft flying overhead our house (at very high level) - all fed by home assistant and various HACS addons.
I had always been interested in aviation, and I was fortunate that I was in the right place at the right time after graduation to join an airline on a sponsored "cadet scheme".

I still (hopefully evidently) very much love software/engineering, but I guess I chose the path of "professional pilot, hobbyist engineer" over the alternative of "professional engineer, hobbyist pilot".

I'm surprised how wide the acceptance age range is for BA's program (18-55). Is it common for people to transfer from unrelated careers? Nice to know that door isn't technically shut for a while!
I loved programming before doing it as a job. Now, I really can't be bothered to program outside of work.

At what age did you make this change?

I love medicine, researching diseases I hear about and learning about the body is hobby for me. I would love to get into it but I am almost 40.

> I would love to get into it but I am almost 40.

You're young! Saying that as a fellow almost-40.

>> chose the path of "professional pilot, hobbyist engineer" over the alternative of "professional engineer, hobbyist pilot"

Both pay well for a job, but as a hobby the costs are very different ;-)

This is great work! I have a somewhat off-topic question. How are your ears? Do pilots have any tricks to save their ears from getting clogged due to the constant pressure changes?

Second question. Would it be possible to predict flight delays based on the number of inbound and outbound flights?

Thank you :) I haven't had issue with my ears (other than the occasional lingering cold), but usually a good yawn or chewing gum will clear it. On a normal day, I am fortunate to have wide eustacian tubes I guess!
Not a pilot but fly frequently -- A lot of the modern larger planes 787 Dreamliner or an A330/350 have something that helps with the ear clogging.

I travel NY/LON a lot, and I rarely have any ear popping. If I travel on a smaller plane say NY -> Miami, I easily get the clogged feeling.

Love it :-). Do you also need to log the gps co-ordinates as you are flying? I would love to see how you avoid the airspace in the war hit areas.
Not OP, but commercial airliners fly on airways: https://www.youtube.com/watch?v=EwaYDVbQvKI& , from waypoint to waypoint.

When there's missiles in the air heading to land on innocent babies, the airlines choose waypoints so that they don't fly over these areas.

I wish I had it! Our flight plans contain the full routes (waypoints and airways), but there is no easy way to capture this information.

While not exact prohibited airspace, this map shows where GPS jamming is highest, which roughly corresponds to the warzones: https://gpsjam.org/

Cool visualization for your personal logbook. How is the raw or display data stored?

The globe map reminds me of this hexagonal grid article from my bookmarks I’d found on here or reddit.

https://www.redblobgames.com/grids/hexagons/

As an airline pilot, I am curious, have you watched the season 2 of Nathan Fielder’s Rehearsal on HBO, that comically addresses the topic of pilot-copilot communication?

If so what are your thoughts on his portrayal of the existence of copilot communication friction. And without intending to dig into your personal business, do you think there is a tendency and survivor (retention) bias for the profession to remain high functioning ______, without recognizing a need for help. Or is this portrayal of stunted coworker dialog an edge case that is amplified from his perspective.

The data is all in a sqlite file from my logbook software! I wrote a little post about extracting the data here: https://jameshard.ing/posts/querying-logten-pilot-logbook-sq...

I have only seen a few clips from The Rehersal (the bit with Sully listening to Evanescence), so I don't have much to go on. Pilot communication is definitely something that we spend a lot of time talking about and training (under the larger banner of CRM - crew resource management), and in my experience the industry is making real efforts to be better in this area!

Cool, thank you for the response and details.
Hey! I used to work for the company that makes that logbook software. That was a great job. The CEO was an amateur pilot himself and really, really loved software product design.

It's been over a decade, but it's cool to see that software still being iterated on and pilots still loving it.

Even cooler to see someone such as yourself extending its usefulness by leveraging the data. Cheers!

Awesome!

You can tell that the software is created by people passionate about aviation (and also passionate about nice UX, something that most all of the Logten competitors really lack). Do you remember if my guess about using NSDate internally was correct?

"passionate about aviation" and "passionate about nice UX" definitely described Noah and the rest of the team!

Honestly, I don't remember Re: NSDate. It was many jobs and Dante's levels of burnout ago. :-)

What I remember from that time was a lot of fighting with Apple's early iCloud syncing. Because it had a habit of being incredibly fraught and flakey using SQLite-backed Core Data stuff.

I assumed the globe was using Uber's H3 library for the hexagons.
Hell yeah. This is very cool, happy flying!
I'm curious to know what is the small concentrated cluster of flights Northwest of Dulles airport, where the flight durations seem way too high compared to the effective distance between the points.
Those are all of my flights in light aircraft around my hometown in Canada! They fly a little bit slower than the A350 :) There is a similar cluster around the south of Spain where I completed my Commercial/ATPL training.
Are you allowed to code while sitting in the cockpit but not actively flying?
On the long flights where we carry more than two pilots, we have allocated break time away from the cockpit. During those breaks, you can do whatever you like (sleep, watch a film, read a book, etc). I tend to try to sleep on the plane, but I always bring my laptop on trips to work on projects while downroute. Especially on west-coast trips with the 8 hours timezone change, I am usually awake at 2am which is great for being productive!
I am insanely productive when programming on flights without wifi, provided I've cached what I needed to beforehand. Something about it just works
Ok, so no high-quality LLMs possible.
I'm jealous - all that time sitting around to get something productive done, and I can't concentrate at all because I can't relax, the plane suddenly shakes and distracts me, and it feels like I'm lacking oxygen and am not thinking clearly. I remember trying to code some stupid iterator thing in Rust for a few hours and couldn't crack it. On the ground it was solved in like 10 minutes.
Your phone has a "do not disturb" feature
I'm jealous of them being able to be productive _on a plane_.

I can be productive on the ground no problem, but I'm mostly useless when I'm on a plane.

this is so cool!
Those few days that show back-to-back 14hr days must have been an experience :)

What's your favorite thing to see up in the sky and in the clouds?

The 14 hour days certainly felt long!

I think that seeing the northern lights (quite common on our flights to west-coast North America) or large thunderstorms over the equator at night (from a safe distance) are probably the highlights for me :) SpaceX launches are becoming more regular occurrences too!

I love the sequential globe especially!

For an idea - anything you could do with altitude? Your average height above sea level per day? I dunno :p

I’ll second this idea. Keeping track of your hours on high altitude is important sine you get more radiation than us on the ground. I’ve read various articles about pilots & flight attendants health affected by higher exposure to radiation.
True, but is it counterbalanced by their ageing at least a few microseconds more slowly thanks to spending so much time closer to the speed of light?
You actually age faster on an airplane, because you are in a less dense space and experience less gravitational redshift.

General relativity works against the Special Relativity in this case.

Well shucks to my high school physics teacher
I wish I had the data! Likewise, collecting the number of passengers carried would be a nice cumulative statistic at the end of my career (I guess I can start recording this when I become a Captain?)
You could (probably) pull the ADSB data for a "representative" flight on given routes and use that to at least get close - probably would still be useful for things like radiation exposure mentioned elsewhere.

Otherwise, maybe you can get Claude to vibe code you a mobile app that runs in the background and collects all the interesting data (GPS, cabin alt, etc)

This is inspiring me to collect more of my own data -- great job!
Just map your device's location services. It'll be telling just how much someone that gained access to your device could tell about you. Or how much theGoog is making from knowing that data
Oh my god, love these visuals. Geo data is so perfect for dataviz
Folks like you (expert in multiple domains) are an inspiration for people like me. I always dream to do something other than my day job. Hope I push through my laziness to do it some day !
Sometimes I wish software development didn’t pay so exceptionally well. I’m interested in so many other things, but it’s hard to justify switching to another full-time field, knowing it would mean a significant pay cut.
My heart bleeds.
Depending on your locale and position, you may have it backwards. Check out pilot pay in the United States at www.airlinepilotcentral.com
(comment deleted)
I wish I wasn't medically barred from having a pilot's license. Not for the pay, but I just like the idea of flying. Unfortunately, I cannot. I recommend people use their salaries to learn how to fly regardless! It's maybe ~$15-20k to get a PPL which is doable for the tech crowd with some planning.
I think GP meant some girls outside of software engineering.

I would love to switch (back) to teaching but a 10x pay cut is not doable. Maybe close to retirement I will give it a try.

There's an oft-repeated line that goes something like, "I was lucky enough to be terrible at my first job." ie, optionality is a curse.
Those visualizations are really cool! Did you use any AI assisted coding? If the answer is yes, which tool(s) did you use?
Thank you! This was all by hand using Astro, but I have steated experimenting with using AI coding for my newest project (https://liberateloyalty.com/). I have just been using ChatGPT and Copilot so far, and I am totally sold on their helpfulness.
You could turn this into a product!

Something pilots can link to from their LinkedIn accounts.

And of course to impress friends and family.

(comment deleted)