atmdatatools


Nameatmdatatools JSON
Version 0.0.1 PyPI version JSON
download
home_page
SummaryTools for air traffic data analysis
upload_time2023-03-13 07:10:30
maintainer
docs_urlNone
author
requires_python>=3.9
license
keywords air traffic management adsb ads-b
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ATM Data Tools
 Tools for air traffic data analysis. The package currently consists of 3 functions for reading ADSB files.

# Installation
This package is available via PyPi:

```
pip install atm-datatools
```

# Import
You can import the package by using

```
import atmdatatools as adt
```

# Functions
## read_adsb()
**`read_adsb(fname, datestr, downsample=None, floor=None, ceiling=None)`**

Reads raw ADSB files, assuming that each file only has 1 day worth of data. Raw ADSB files should have the columns `['073:071_073TimeforPos','131:Latitude','131:Longitude','140:GeometricHeight','170:TargetID']`. The column `073:071_073TimeforPos` contains the time elapsed in seconds in UTC and the timezone of the file is currently hardcoded for UTC+8. Hence, the first row of this column starts at approximately 57,600s representing 16:00 UTC of the previous day.

Returns a GeoDataFrame with the columns `['id','datetime','unix_timestamp','geometry']`. Each row represents 1 ADSB position report.

### Parameters
- **fname:** the filename of the adsb csv file
- **datestr**: date string in the format 'YYYYMMDD'
- [Optional] **downsample = None:** downsample the track data, e.g. 2 will take every 2nd point in the track data
- [Optional] **floor = None:** cuts off tracks below this altitude in feet, recommend 100 feet if you wish to exclude ground movements
- [Optional] **ceiling = None:** cuts off tracks above this altitude in feet

### Returns
- **GeoDataFrame:** A GeoDataFrame with the columns `['id','datetime','unix_timestamp','geometry']`. Each row represents 1 ADSB position report.
    - `id` contains the flight number (e.g. SIA92). Increments the id of a position if a time gap of more than 15 minutes is detected. e.g. MEDIC77 becomes MEDIC77_1.
    - Times are in UTC
    - `geometry` column has Shapely Point objects with lat, long, and altitude information


## read_adsb_byflightid()
**`read_adsb_byflightid(fname, datestr, flightid, downsample=None, floor=None, ceiling=None)`**

Reads raw ADSB files, assuming that each file only has 1 day worth of data, returning a GeoDataFrame with flight tracks of the desired flightid. Each row represents 1 ADSB position report. Parameters allow for additional filtering.

See the `read_adsb()` function documentation for raw ADSB file format.

### Parameters
- **fname:** the filename of the adsb csv file
- **datestr**: date string in the format 'YYYYMMDD'
- **airport**: Accepts ICAO airport codes, currently accepts `WSSS`, `WSSL`.
- [Optional] **downsample = None:** downsample the track data, e.g. 2 will take every 2nd point in the track data
- [Optional] **floor = None:** cuts off tracks below this altitude in feet, recommend 100 feet if you wish to exclude ground movements
- [Optional] **ceiling = None:** cuts off tracks above this altitude in feet

### Returns
- **GeoDataFrame:** A GeoDataFrame with the columns `['id','datetime','unix_timestamp','geometry']`. Each row represents 1 ADSB position report.
    - `id` contains the flight number (e.g. SIA92). Increments the id of a position if a time gap of more than 15 minutes is detected. e.g. MEDIC77 becomes MEDIC77_1.
    - Times are in UTC
    - `geometry` column has Shapely Point objects with lat, long, and altitude information


## read_adsb_byairport()
**`read_adsb_byairport(fname, datestr, airport, arrdep=None, downsample=None, floor=None, ceiling=None)`**

Reads raw ADSB files, assuming that each file only has 1 day worth of data, returning a GeoDataFrame with flight tracks filtered by airport of interest. Each row represents 1 flightpath. Parameters allow for additional filtering.

See the `read_adsb()` function documentation for raw ADSB file format.

### Parameters
- **fname:** the filename of the adsb csv file
- **datestr**: date string in the format 'YYYYMMDD'
- **airport**: Accepts ICAO airport codes, currently accepts `WSSS`, `WSSL`.
- [Optional] **downsample = None:** downsample the track data, e.g. 2 will take every 2nd point in the track data
- [Optional] **floor = None:** cuts off tracks below this altitude in feet, recommend 100 feet if you wish to exclude ground movements
- [Optional] **ceiling = None:** cuts off tracks above this altitude in feet

### Returns
- **GeoDataFrame:** A GeoDataFrame with the columns `['id','geometry']`. Each row represents 1 flightpath.
    - `id` contains the flight number (e.g. SIA92). Increments the id of a position if a time gap of more than 15 minutes is detected. e.g. MEDIC77 becomes MEDIC77_1.
    - `geometry` column contains a Shapely LineString representing the flight's flightpath


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "atmdatatools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "air,traffic,management,ADSB,ADS-B",
    "author": "",
    "author_email": "Skyler Tan <shiuhtan123@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/6d/0a/636119347492c80e67672c313ded2966bd8379a624f21e6a29547f52d86f/atmdatatools-0.0.1.tar.gz",
    "platform": null,
    "description": "# ATM Data Tools\r\n Tools for air traffic data analysis. The package currently consists of 3 functions for reading ADSB files.\r\n\r\n# Installation\r\nThis package is available via PyPi:\r\n\r\n```\r\npip install atm-datatools\r\n```\r\n\r\n# Import\r\nYou can import the package by using\r\n\r\n```\r\nimport atmdatatools as adt\r\n```\r\n\r\n# Functions\r\n## read_adsb()\r\n**`read_adsb(fname, datestr, downsample=None, floor=None, ceiling=None)`**\r\n\r\nReads raw ADSB files, assuming that each file only has 1 day worth of data. Raw ADSB files should have the columns `['073:071_073TimeforPos','131:Latitude','131:Longitude','140:GeometricHeight','170:TargetID']`. The column `073:071_073TimeforPos` contains the time elapsed in seconds in UTC and the timezone of the file is currently hardcoded for UTC+8. Hence, the first row of this column starts at approximately 57,600s representing 16:00 UTC of the previous day.\r\n\r\nReturns a GeoDataFrame with the columns `['id','datetime','unix_timestamp','geometry']`. Each row represents 1 ADSB position report.\r\n\r\n### Parameters\r\n- **fname:** the filename of the adsb csv file\r\n- **datestr**: date string in the format 'YYYYMMDD'\r\n- [Optional] **downsample = None:** downsample the track data, e.g. 2 will take every 2nd point in the track data\r\n- [Optional] **floor = None:** cuts off tracks below this altitude in feet, recommend 100 feet if you wish to exclude ground movements\r\n- [Optional] **ceiling = None:** cuts off tracks above this altitude in feet\r\n\r\n### Returns\r\n- **GeoDataFrame:** A GeoDataFrame with the columns `['id','datetime','unix_timestamp','geometry']`. Each row represents 1 ADSB position report.\r\n    - `id` contains the flight number (e.g. SIA92). Increments the id of a position if a time gap of more than 15 minutes is detected. e.g. MEDIC77 becomes MEDIC77_1.\r\n    - Times are in UTC\r\n    - `geometry` column has Shapely Point objects with lat, long, and altitude information\r\n\r\n\r\n## read_adsb_byflightid()\r\n**`read_adsb_byflightid(fname, datestr, flightid, downsample=None, floor=None, ceiling=None)`**\r\n\r\nReads raw ADSB files, assuming that each file only has 1 day worth of data, returning a GeoDataFrame with flight tracks of the desired flightid. Each row represents 1 ADSB position report. Parameters allow for additional filtering.\r\n\r\nSee the `read_adsb()` function documentation for raw ADSB file format.\r\n\r\n### Parameters\r\n- **fname:** the filename of the adsb csv file\r\n- **datestr**: date string in the format 'YYYYMMDD'\r\n- **airport**: Accepts ICAO airport codes, currently accepts `WSSS`, `WSSL`.\r\n- [Optional] **downsample = None:** downsample the track data, e.g. 2 will take every 2nd point in the track data\r\n- [Optional] **floor = None:** cuts off tracks below this altitude in feet, recommend 100 feet if you wish to exclude ground movements\r\n- [Optional] **ceiling = None:** cuts off tracks above this altitude in feet\r\n\r\n### Returns\r\n- **GeoDataFrame:** A GeoDataFrame with the columns `['id','datetime','unix_timestamp','geometry']`. Each row represents 1 ADSB position report.\r\n    - `id` contains the flight number (e.g. SIA92). Increments the id of a position if a time gap of more than 15 minutes is detected. e.g. MEDIC77 becomes MEDIC77_1.\r\n    - Times are in UTC\r\n    - `geometry` column has Shapely Point objects with lat, long, and altitude information\r\n\r\n\r\n## read_adsb_byairport()\r\n**`read_adsb_byairport(fname, datestr, airport, arrdep=None, downsample=None, floor=None, ceiling=None)`**\r\n\r\nReads raw ADSB files, assuming that each file only has 1 day worth of data, returning a GeoDataFrame with flight tracks filtered by airport of interest. Each row represents 1 flightpath. Parameters allow for additional filtering.\r\n\r\nSee the `read_adsb()` function documentation for raw ADSB file format.\r\n\r\n### Parameters\r\n- **fname:** the filename of the adsb csv file\r\n- **datestr**: date string in the format 'YYYYMMDD'\r\n- **airport**: Accepts ICAO airport codes, currently accepts `WSSS`, `WSSL`.\r\n- [Optional] **downsample = None:** downsample the track data, e.g. 2 will take every 2nd point in the track data\r\n- [Optional] **floor = None:** cuts off tracks below this altitude in feet, recommend 100 feet if you wish to exclude ground movements\r\n- [Optional] **ceiling = None:** cuts off tracks above this altitude in feet\r\n\r\n### Returns\r\n- **GeoDataFrame:** A GeoDataFrame with the columns `['id','geometry']`. Each row represents 1 flightpath.\r\n    - `id` contains the flight number (e.g. SIA92). Increments the id of a position if a time gap of more than 15 minutes is detected. e.g. MEDIC77 becomes MEDIC77_1.\r\n    - `geometry` column contains a Shapely LineString representing the flight's flightpath\r\n\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Tools for air traffic data analysis",
    "version": "0.0.1",
    "split_keywords": [
        "air",
        "traffic",
        "management",
        "adsb",
        "ads-b"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7409a164db38ce6c5e2bb9b04d65fd493dc01c34d45da2859bc1490d1b542565",
                "md5": "2673bdf215a37b552072f728301345fc",
                "sha256": "266921f56cd6a2f3b62882db93fee6e740e0b31b360540864234c5dc340b3f6c"
            },
            "downloads": -1,
            "filename": "atmdatatools-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2673bdf215a37b552072f728301345fc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 17932,
            "upload_time": "2023-03-13T07:10:28",
            "upload_time_iso_8601": "2023-03-13T07:10:28.050401Z",
            "url": "https://files.pythonhosted.org/packages/74/09/a164db38ce6c5e2bb9b04d65fd493dc01c34d45da2859bc1490d1b542565/atmdatatools-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6d0a636119347492c80e67672c313ded2966bd8379a624f21e6a29547f52d86f",
                "md5": "fb60337704ccadd9a9581e47c1d8cd22",
                "sha256": "cbf3402245e2b8847749a4ee78166ab6173034d7ff072604ea56050ca433d868"
            },
            "downloads": -1,
            "filename": "atmdatatools-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "fb60337704ccadd9a9581e47c1d8cd22",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 17501,
            "upload_time": "2023-03-13T07:10:30",
            "upload_time_iso_8601": "2023-03-13T07:10:30.222599Z",
            "url": "https://files.pythonhosted.org/packages/6d/0a/636119347492c80e67672c313ded2966bd8379a624f21e6a29547f52d86f/atmdatatools-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-13 07:10:30",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "atmdatatools"
}
        
Elapsed time: 0.04266s