FAA TFR Scraper
Project description
TFR-Scraper
Scrapes TFRs from FAA site https://tfr.faa.gov/ and details for each TFR.
Requirements
- html_table_parser.parser https://pypi.org/project/html-table-parser-python3/
- untangle https://pypi.org/project/untangle/
- pandas https://pypi.org/project/pandas/
Functions
tfr_list() #Returns the basic list of TFRs
parse_tfr(notam_number) #Parses a notam number in full format like (1/8339) and will return the details of the tfr.
get_list_and_parse_all() #Downloads TFR list and parses all combines details with list and returns it.
all(filepath) #Does get_list_and_parse_all() and saves as a json, filepath is optional default is ./detailed_tfrs.json
TFR/Shape types
- TFRs have many types wether it be just a circle or a polygon or a TFR can have multiple circles/polygons, this scraper will parse each.
- Below is an example of each and the type of shapes the parser will return in the shapes list for each when the details are parsed
Single Circle
!
"shapes": [
{
"type": "circle",
"radius": "5.0",
"lat": "40.74388889N",
"lon": "111.65527778W",
"up_to": "12500"
}
Single Polygon
!
"shapes": [
{
"type": "poly",
"points": [
[
"46.59583333N",
"116.54111111W"
],
[
"46.61666667N",
"116.47388889W"
],
[
"46.55833333N",
"116.40638889W"
],
[
"46.5125N",
"116.42416667W"
],
[
"46.50055556N",
"116.53722222W"
],
[
"46.51416667N",
"116.62916667W"
]
],
"up_to": "8500"
Multi Circle
!
"shapes": [
{
"type": "circle",
"radius": "10.0",
"lat": "39.64805556N",
"lon": "077.46666667W",
"up_to": "17999"
},
{
"type": "circle",
"radius": "5.0",
"lat": "39.64805556N",
"lon": "077.46666667W",
"up_to": "17999"
}
]
TFR JSON objects
Single TFR object from list w/o details parsed
{
"Date": "08/13/2021",
"NOTAM": "1/7932",
"Facility": "ZSE",
"State": "CA",
"Type": "HAZARDS",
"Description": "35NM SE YREKA, CA, Friday, August 13, 2021 through Sunday, September 05, 2021 UTC New",
"Zoom": ""
},
A detailed object when combined with info from list
{
"Date": "08/13/2021",
"NOTAM": "1/7932",
"Facility": "ZSE",
"State": "CA",
"Type": "HAZARDS",
"Description": "35NM SE YREKA, CA, Friday, August 13, 2021 through Sunday, September 05, 2021 UTC New",
"Zoom": "",
"details": {
"txtDescrPurpose": "TO PROVIDE A SAFE ENVIRONMENT FOR FIRE FIGHTING AVIATION OPS",
"txtLocalName": "1/7932",
"dateEffective": "2021-08-13T18:15:00",
"dateExpire": "2021-09-05T05:00:00",
"codeTimeZone": "UTC",
"codeExpirationTimeZone": "UTC",
"shapes": [
{
"type": "poly",
"points": [
[
"41.4N",
"122.13333333W"
],
[
"41.72083333N",
"121.94166667W"
],
[
"41.625N",
"121.7W"
],
[
"41.43333333N",
"121.78333333W"
],
[
"41.4N",
"122.13333333W"
]
],
"up_to": "10500"
}
]
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tfr_scraper-0.0.3.tar.gz
(4.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tfr_scraper-0.0.3.tar.gz.
File metadata
- Download URL: tfr_scraper-0.0.3.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d0183c8183a0194b7b7f2ae6c0cc5bd760b367a93469d669b1d8f5435f091a2
|
|
| MD5 |
3ee5c36bc3ddf22b4fb3c471b4b81da0
|
|
| BLAKE2b-256 |
cb5ad168ed79e402268ab3e21e61eeee46df7e9bf5d3b65d98abbec068b2cb1c
|
File details
Details for the file tfr_scraper-0.0.3-py3-none-any.whl.
File metadata
- Download URL: tfr_scraper-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7bfc015d1abd5aee32b7f932aab9ece84e68935e85d314f89d99c2794e8ec1f
|
|
| MD5 |
a101ac683138eeec3c4865f16330ba0e
|
|
| BLAKE2b-256 |
e98a35d0d8987673ea4fa652a633f4082e0bccb1bd9da3bf4e5b512570cb863b
|