Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.8K Views
|
5 Replies
|
1 Total Like
View groups...
Share
Share this post:

How to perform analysis on a FlightData call, that is in a time object format?

Posted 1 year ago
POSTED BY: R Balled
5 Replies

Hi Ryder,

maybe this helps a bit:

arrivalDelaysRaw = FlightData[Entity["Airport", "MEM"] -> Entity["Airport", "LGA"], {"ArrivalDelay"}, {DateObject[{2023, 1, 1}], DateObject[{2023, 1, 10}]}];
arrivalDelays0 = DeleteCases[arrivalDelaysRaw, <|"ArrivalDelay" -> Missing["NotAvailable"]|>];
arrivalDelays = KeyValueMap[{#1, UnitConvert[#2["ArrivalDelay"], "Minutes"]} &, arrivalDelays0]
POSTED BY: Henrik Schachner
Posted 1 year ago

Thank you, I am still having issues. The end goal is to get these datasets for various routes to be able to compare them statistically, but I am having trouble getting the list of numbers into something that is usable. Do you have any general advice for this? I appreciate the help very much!

POSTED BY: Updating Name

Can you provide an example of the data format that you are trying to construct?

POSTED BY: Rohit Namjoshi
Posted 1 year ago
Attachment

Attachments:
POSTED BY: R Balled

Hi Ryder,

QuantityConvert is not a built-in function. It should be UnitConvert. The error checking can be simplified by eliminating Missing from the raw data

arrivalDelaysRaw // Map[DeleteMissing] // processArrivalDelay

There is a handy Resource Function KeyGroupBy that you can use to group the data by airline or any other property of the Flight entity.

ResourceFunction["KeyGroupBy"][processedArrivalDelays, #["Airline"] &]
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard