Flydenity is a callsign identification library to help match tail numbers or callsigns to origin nations. The library is a python wrapper on top of a curated dataset containing a set of regular expressions generated from the International Telecommunications Union (ITU) International Call Sign prefixes. The registration codes in this dataset are separated by country post The Paris Convention in 1929. The database also contains a description of each codeset with 2 and 3 letter ISO country codes following the ISO-3166 standard.
Flydenity is on PyPi, simply install it with PIP
pip3 install flydenity
To run, you can simply include it in your python library using the following
>>> from flydenity import Parser
>>> parser = Parser()
>>> parser.parse("AF1234")
{'nation': 'United States', 'description': 'general', 'iso2': 'US', 'iso3': 'USA'}
You can also run it from the command line (multiple arguments allowed)
$ python -m flydenity AF1234 D-1234
{'AF1234': {'nation': 'United States', 'description': 'general', 'iso2': 'US', 'iso3': 'USA'},
'D-1234': {'nation': 'Germany', 'description': 'gliders', 'iso2': 'DE', 'iso3': 'DEU'}}
In total, the dataset contains a total of 408 unique regular expressions to describe aircraft tail numbers across 217 unique countries.
Of course, everyone has a programming language of choice. Mine for this effort was Python. I've including a wrapper class classed "ARP" which you can use to parse through the expressions.
Since the ITU International Call Sign prefexies are universal across Aircraft and Maritime Call Signs, we include functions within out API to parse Maritime Call Signs as well.
To evaluate how well the regular expressions work, we extracted unique tail numbers from a years worth of air traffic from FlightRadar24.com In total, we evaluated over 250k unique tail numbers against the regular expressions to minimize duplicate tags. In total, the parser was around 98% accurate in matching tail numbers to a specific country. Of course this could be improved, but that's why this library is open-source :)
All data was collected using open sources across the web, specifically using the links below.
I constructed two datasets (as of right now) for this effort.
Some of these countries or regions could have a standard that is not within this database. Please update the list if you make changes.
Collen Roller collen.roller@gmail dot com