2022: Week 24 - Longest Flights

Challenge by: Jorge Supelano

Have you ever wondered about the longest flights ever taken? Let's prep all the data required to answer that question and build a viz like Jorge's!

Find Jorge's viz here

Inputs

  1. Non-stop flights (top 30, by great-circle distance) - from Wikipedia 

  2. World City Latitudes and Longitudes - from SimpleMaps

Requirements

  • Input the data
  • Remove the airport names from the From and To fields
    • e.g. New York-JFK should just read New York
  • Create a Route field which concatenates the From and To fields with a hyphen
    • e.g. Dubai - Dallas
  • Split out the Distance field so that we have one field for the Distance in km and one field for the Distance in miles
    • Ensure these fields are numeric
  • Rank the flights based on Distance
    • Use a dense rank in order to match the wikipedia page
  • The Scheduled duration is a Date/Time data type. Change this to a string so that we only keep the time element
  • Update the First flight field to be a date
  • Join on the lat & longs for the From and To cities
  • Output the data

Output


  • 15 fields
    • Rank 
    • From
    • To
    • Route
    • Airline
    • Flight number
    • Distance - mi
    • Distance - km
    • Scheduled duration
    • Aircraft
    • First flight
    • From Lat
    • From Lng
    • To Lat
    • To Lng
  • 31 rows (32 including headers)
You can download the full output here

After you finish the challenge make sure to fill in the participation tracker, then share your solution on Twitter using #PreppinData and tagging @Datajedininja@JennyMartinDS14 & @TomProwse1

You can also post your solution on the Tableau Forum where we have a Preppin' Data community page. Post your solutions and ask questions if you need any help

Popular posts from this blog

2023: Week 1 The Data Source Bank

2023: Week 2 - International Bank Account Numbers

How to...Handle Free Text