NHacker Next
login
▲Show HN: I'm an airline pilot – I built interactive graphs/globes of my flightsjameshard.ing
611 points by jamesharding 5 hours ago | 109 comments
Loading comments...
ok_computer 4 hours ago [-]
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.

jamesharding 4 hours ago [-]
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!

im_down_w_otp 2 hours ago [-]
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!

jamesharding 58 minutes ago [-]
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?

ok_computer 3 hours ago [-]
Cool, thank you for the response and details.
wetoastfood 4 hours ago [-]
> How is the raw or display data stored?

He answered in the post that he uses LogTen Pro[1] which enables querying with SQL[2]. In the SQL post he says the app has an export for CSV but the app stores it in SQLite which you can access and query from directly.

[1] https://logten.com/ [2] https://jameshard.ing/posts/querying-logten-pilot-logbook-sq...

bombcar 4 hours ago [-]
Reminds me of https://youtu.be/1SKDvQzcasg which is quite old.
fastball 3 hours ago [-]
I assumed the globe was using Uber's H3 library for the hexagons.
weinzierl 3 hours ago [-]
That is beautiful. Besides the globe and the cool animations I like the dashboard that shows summary stats.

This made me think. Either Frauenhofer or Helmholtz in Germany used to have a site where you could enter your specific flights and it would tell you your overall radiation exposure. This was meant mainly for flight personnel and it was not nearly as beautiful. The accumulated exposure would be a useful addition for the dashboard.

jamesharding 1 hours ago [-]
A great idea!

The company that I work for does actually provide us with our cumulative dosage data for the month/year/lifetime, but not at such a granular level. Do you know of any statistical way that I could calculate this?

I suppose I could work out the great circle routes and the approximate dosage in that airspace at a given time?

the_arun 3 hours ago [-]
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 !
jamesharding 1 hours ago [-]
What a kind comment :) Thank you!
18172828286177 3 hours ago [-]
Being a professional pilot while also being able to put together such a polished software project like this is incredibly impressive
barbazoo 3 hours ago [-]
It’s not a 9-5 for many and time between flights can be significant. Not surprised they do that as a hobby on the side. Not imagining they’re doing anything during the flight.
shawabawa3 3 hours ago [-]
do pilots get to mess around on a laptop while flying? My understanding is that most of a flight is just sitting there waiting for landing to start, could mean a lot of spare time to pick up programming
mbreese 3 hours ago [-]
I don’t think the cognitive context switching required would be a good fit. I imagine pilots always have to be “on” just in case something happens, even if they are letting the plane do some of the routine flying.
Rendello 2 hours ago [-]
When you're 8 hours deep in borrow checker hell, you're in no emotional state to be piloting the A380.
kunley 44 minutes ago [-]
Or the contrary: nothing can shake you anymore
Mawr 2 hours ago [-]
Sure: https://en.wikipedia.org/wiki/Northwest_Airlines_Flight_188 (video: https://www.youtube.com/watch?v=uzmeGS29nu8)
perks_12 1 hours ago [-]
He graduated from UofT with a major in CompSci.
zX41ZdbW 3 hours ago [-]
I have a similar visualization on top of ~150 billion data points of ADS-B data: https://adsb.exposed/

It is interactive, so you can filter by any dimension, like the types of aircraft you fly.

It is 2D, but I thought about making it 3D as well.

PS. The map you showed is somewhat slow - when I zoom in, the framerate is less than 10.

david422 3 hours ago [-]
Looks great, thanks for sharing! One thing I love about software engineering is that you can apply it to so many different aspects of ordinary life. Showing your flight career like this is really cool.
jamesharding 44 minutes ago [-]
It is so true! This XKCD comic always comes to mind though with projects like this: https://xkcd.com/1205/
amelius 3 hours ago [-]
You could turn this into a product!

Something pilots can link to from their LinkedIn accounts.

And of course to impress friends and family.

jpresend 22 minutes ago [-]
This is amazing, James! Any chance you'd release it open source?
alabhyajindal 5 hours ago [-]
Very cool! I didn't know pilots are required to maintain a logbook. What's the official recommendation for this - using a paper logbook?
jamesharding 5 hours ago [-]
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.

pinoy420 4 hours ago [-]
[dead]
sokoloff 4 hours ago [-]
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.)
halilkoklu 2 hours ago [-]
Inspiring profile with beautiful charts.

Glad to have found someone else with a similar background who decided to fly jets.

I had a good run as a software engineer and executive for the last 20 years. I have just completed my Airbus 320 type rating waiting for my base check. I will be flying for a national flag carrier.

jamesharding 2 hours ago [-]
Congratulations, and thank you!

I moved from the A320 to the A350 just over two years ago, and they are remarkably similar to fly (by design)! I would go so far as saying that you could hop in the A350 sim with zero training, and you would be able to operate it to a safe standard.

halilkoklu 29 minutes ago [-]
I've got my eyes on the A350 for ages now so I'm glad that I landed on the Airbus fleet (80/20 odds in favour of Boeing here at my airline).

I've got two possible progression tracks from here: 1. gain experience on the A320 for a year, get upgraded to the A330, after two years get certified for the A350 to fly A330/A350 mixed. 2. spend years on A320, upgrade to captain, many more years, then finally upgrade to A330 as captain, then two years later A350 added.

I am planning to fly jump seat to see all the types we're flying.

mattfrommars 51 minutes ago [-]
If I understand OP journey, was he fortunate to have been scholarship to fund his studies to become a pilot?

I was looking into pilot school here and they cost upwards to $100k

vmh1928 38 minutes ago [-]
Air Cadets appears to be a part of the Canadian Armed Forces and intended to provide an on-ramp for young people interested in different aspects of the Armed Forces (Army, flying, Naval.)

https://www.canada.ca/en/department-national-defence/service...

Qualifications to join the Air Cadets. https://www.canada.ca/en/department-national-defence/service...

jamesharding 40 minutes ago [-]
Exactly this. When I joined, the company offered a cadet scheme where the company would underwrite the loan required for your pilot training (84,000 GBP in 2016), and then that amount was repaid to us over 84 months of employment (while on a reduced cadet salary). It essentially spread the cost of training out over 7 years.

The current cadet scheme is better in the sense that you do not have to take on a personal loan for the flight training!

darkwater 13 minutes ago [-]
And what of you failed the final examination? Could you try more than once? Would that have affected your hireability at the company?
silasdavis 3 hours ago [-]
There seems to be some crossover between the software and flying 'communities'. Perhaps this is rather unsurprising given some of the shared prerequisite skills? Is it your experience there are many commercial pilots who code?

Do you expect to get 100% of the way to the sun over your career?

jamesharding 2 hours ago [-]
There are quite a few ex-engineers who fly (though anecdotally, most seemed to have studied aerospace engineering. At this rate, I think I am on track to make it about 10% of the way there by the time I retire (unless supersonic travel comes back in a large way!)
3 hours ago [-]
Peterpanzeri 48 minutes ago [-]
Damn this is soo cool im not even close to understrand all of it but its damn beautiful
sneak 11 minutes ago [-]
Code, data visualizations, aviation, mapping.

All you need to do is throw in some Rust and a custom PCB or two and you have an HN bingo. :)

Sweet hack.

ta12653421 38 minutes ago [-]
Beautiful!

Make an App out of it, sell it to your colleagues? why not?

ziofill 1 hours ago [-]
How did you make the world not pick up a geometric phase as you move it around? It's always oriented nicely.
jamesharding 55 minutes ago [-]
The https://github.com/vasturiano/globe.gl library seems to use this as the default
ppak10 2 hours ago [-]
Cool, the data visualization is really neat! Do you have a lot of down time during those long flights and are you able to work on this during that time?
jamesharding 1 hours ago [-]
Thank you! Not so much during the flight, but I bring my laptop on most trips, and I use some of the 24-48 hours we get between flights to try to be productive. It helps when I am awake at 2AM (PST) when it is 10AM on my body clock!
cetinsert 3 hours ago [-]
See https://RTEdge.net too, if you like globes with interactive nodes and edges!
collinvandyck76 4 hours ago [-]
This is inspiring me to collect more of my own data -- great job!
dylan604 2 hours ago [-]
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
jasonthorsness 4 hours ago [-]
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

jamesharding 4 hours ago [-]
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?)
FL410 3 hours ago [-]
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)

NKosmatos 4 hours ago [-]
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.
willsmith72 4 hours ago [-]
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?
cyberax 3 hours ago [-]
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.

willsmith72 1 hours ago [-]
Well shucks to my high school physics teacher
crsv 54 minutes ago [-]
This is just fun and fantastic. Love it.
arccy 5 hours ago [-]
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.
jamesharding 4 hours ago [-]
Good idea! Not sure exactly how to do this with globe.gl but I will look into it.
andreygrehov 4 hours ago [-]
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?

jamesharding 4 hours ago [-]
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!
lbotos 4 hours ago [-]
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.

netsharc 3 hours ago [-]
The newer planes pressurize their cabin to a lower simulated altitude.

https://aviation.stackexchange.com/questions/1728/does-the-b...

iamspoilt 4 hours ago [-]
Having a computer engineering background, what motivated you to become a pilot and switch careers?
jamesharding 4 hours ago [-]
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".

phkahler 42 minutes ago [-]
>> 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 ;-)

avgDev 3 hours ago [-]
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.

svara 2 hours ago [-]
> I would love to get into it but I am almost 40.

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

joshvm 4 hours ago [-]
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!
iamspoilt 4 hours ago [-]
Looking at your projects, seems like you still have the hacker going in you! Saw Home Assistant one! Kudos!
jamesharding 51 minutes ago [-]
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.
imp0cat 4 hours ago [-]
The logbook is nice, but the split-flap display is downright awesome. ;)

https://jameshard.ing/projects/split-flap

compacct27 4 hours ago [-]
Oh my god, love these visuals. Geo data is so perfect for dataviz
jonlucc 5 hours ago [-]
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?
jamesharding 4 hours ago [-]
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!

rob74 4 hours ago [-]
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)?
Perz1val 3 hours ago [-]
I'm surprised that it is mostly back and forth routes. Guess they're called airlines for a reason
Chico75 4 hours ago [-]
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.
jamesharding 4 hours ago [-]
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.
h1fra 3 hours ago [-]
Cool viz, I guess it's using https://nivo.rocks/?
jamesharding 3 hours ago [-]
It is indeed! And using https://globe.gl/ for the 3D globes.
3l3c7r1c 3 hours ago [-]
Those visualizations are really cool! Did you use any AI assisted coding? If the answer is yes, which tool(s) did you use?
jamesharding 3 hours ago [-]
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.
nelblu 4 hours ago [-]
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.
netsharc 3 hours ago [-]
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.

jamesharding 3 hours ago [-]
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/

butlike 4 hours ago [-]
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?

jamesharding 3 hours ago [-]
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!

ortusdux 3 hours ago [-]
Very cool! Can you share any info on the 945min flight from back in June?
jamesharding 3 hours ago [-]
Thank you!

That flight was the return from Tokyo (RJTT) to London (EGLL). Due to the closure of Russian airspace, the outbound flight is longer than pre-war as we fly over Turkish airspace. Due to the wind patterns, it is almost always longer flying westbound, so we usually fly east both ways.

In this case, the weather at one of the ETOPS alternates that we use (Shemya, https://en.wikipedia.org/wiki/Eareckson_Air_Station) was out of limits, so we had to fly back Westbound with the associated headwind and longer flight time.

uptownJimmy 4 hours ago [-]
Maaaaan, this is so cool. I'm geekin'.
beepbooptheory 45 minutes ago [-]
Love this work. Is this something you can share with your partner in the cockpit often? Would you say you are more of a First Officer Blunt, or a Captain Allears?
AJRF 4 hours ago [-]
Hell yeah. This is very cool, happy flying!
3 hours ago [-]
kunley 46 minutes ago [-]
Very cool visualisation project!

As for your flying, I just wanted to tell you good luck, we're all counting on you

trizoza 3 hours ago [-]
Love the destination matrix graph!
IncreasePosts 2 hours ago [-]
I'm flying your most recent route next month(ba218). If I see you I'm going to say something weird, like "I know where you've been flying James". I hope that's okay.

Regarding ideas, I noticed that you use great circle distance in some of your measurements, what about getting the actual flight data, and the graph showing deviation of your flight from the ideal.

jamesharding 47 minutes ago [-]
Haha, if there is another James flying the plane, they might be spooked! I'm not flying to Denver for until at least August based on my current roster.

It would be great to use the actual distances (and would help me lap the moon a few more times), but there is no easy way to get the data. Our company flight plans which contain the actual route are in PDF format and with no easy API, and EuroControl (who hold the filed flight plans) charge quite a bit to have access I believe. I supposed I could screenshot the route and upload it to my server and have it OCR the route!

maxehmookau 2 hours ago [-]
This is super cool, although perhaps the coolest thing is that this website is part of a WEBRING!
mkoubaa 4 hours ago [-]
Are you allowed to code while sitting in the cockpit but not actively flying?
jamesharding 4 hours ago [-]
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!
walthamstow 4 hours ago [-]
I am insanely productive when programming on flights without wifi, provided I've cached what I needed to beforehand. Something about it just works
bschwindHN 2 hours ago [-]
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.
amelius 3 hours ago [-]
Ok, so no high-quality LLMs possible.
3 hours ago [-]
jcsnv 4 hours ago [-]
this is so cool!
baroquetaxers0s 4 hours ago [-]
this is cool
Shadowfight 3 hours ago [-]
[dead]
supportengineer 3 hours ago [-]
Here I am having accomplished apparently nothing in my life.
gavmor 2 hours ago [-]
Your handle is "supportengineer". Presumably you outrank OP if you count assists, or a share of others' successes.

Do the developers of the libraries he used count this site as a personal accomplishment? Do the airplane mechanics? Do their support engineers?

We participate in a circulatory economy, but we haven't yet adopted a perspective of circulatory attribution. Maybe we never will. Maybe we never should.

Maybe you should recognize your piecemeal contributions as a sort of ikigai, or maybe you should see this as a wakeup call to carpe diem.

Thanks for the opportunity to pontificate!

uncleDingle 3 hours ago [-]
Relatable
3 hours ago [-]
oulipo 4 hours ago [-]
[flagged]
Wololooo 4 hours ago [-]
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...

lucasban 2 hours ago [-]
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”
4 hours ago [-]
vdddv 3 hours ago [-]
A lot of data and none on his carbon footprint