xoolive / traffic

A toolbox for processing and analysing air traffic data
https://traffic-viz.github.io/
MIT License
374 stars 79 forks source link

ADS-B data parser for flightradar24 #135

Closed jaimebw closed 3 years ago

jaimebw commented 3 years ago

Hello Xavier, I was wondering if you would be interested in adding a parser for the ads-b data coming from flightradar24. I have been working with their historical data for the last couple of months and I wouldn't mind trying to create an implementation for the Traffic library. Basically, the data from flightradar24 comes in two .csv files:

xoolive commented 3 years ago

Thank you for this suggestion, Yes this would be a good addition into the library. I am aware of the single CSV from the flight list page (the one with lat/lon in the same column of the csv file... 🙄 ) But I don't know where to get the other file...

I am quite busy on deepest sh... in the library and would appreciate the pull request if you have time for that. It should be actually very simple.

I would suggest to start with single Flights and an interface along:

from traffic.core import Flight
Flight.from_file("WB305_27da0904.csv")  # random one I just downloaded

So this would imply inferring the proper renaming from the column names present in the file.

If you know how to download batches (legally), then I am curious about a proper documented description.

Maybe the best way to start is to go as you are comfortable, open the PR, and we work from there together when it's ready?

jaimebw commented 3 years ago

I think that the way the data is structured depends on how much information is downloaded. The datasets I am working with contain all the info from a period of 3 months of all the ads-b receivers of the flighradar24 infrastructure. I have some documentation but I think I can't share that (confidentially agreements 😬). I will start with the simple .csv that you can download directly from flightradar24 cheapest premium account for the Flight class as you told me. I'll open a PR as soon as I have something working.

xoolive commented 3 years ago

Oh I see... Let's start with the info from basic and premium regular accounts @fr24 and then look into what's the standard way to get data with confidential agreement from there. I just would like to ensure this way is standard enough and that it can help other potential users.

jaimebw commented 3 years ago

Just opened the PR, hope it passes the tests! Should I add any further documentation on the function? I have kind of copyed the same structure that follows the from_file of the Traffic class

xoolive commented 3 years ago

I'll close it for now but if the fr24 API you use comes online, I have no objection to integrate it as well.