Python tools to download JSON files from rfi.stanford.edu.
Project description
GNSS Interference Monitoring Data Download Tool
This repository explains a Python package <rfi_fileparser> to download JSON files from GNSS Interference Monitoring Website: http://rfi.stanford.edu/. Users can specify a start date, end date, and data type (jamming, spoofing, or dashboard).
Installation
Prerequisites
- Python 3.8+ installed
Setup
(TestPyPI)
Open a terminal (or Anaconda prompt if using that) and run:
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple rfi-fileparser==0.6.0
That way, dependencies come from real PyPI, and your package from TestPyPI.
(PyPI: ignore this, this will be used after making repository public)
pip install rfi-fileparser
Usage
To download JSON files:
from rfi_fileparser import downloader
downloader.download_files("2025/03/23", "2025/03/26", "dashboard")
downloader.download_files("2025/03/23", "2025/03/26", "jamming")
downloader.download_files("2025/03/23", "2025/03/26", "spoofing")
- You can ignore the warnings which is caused by bypassing https protection from our website to download the files.
- A week of all types of data would take few minutes to download, please be patient!
- Once code is done running, files can be found in folder "downloaded_json_files/" under your current path.
To visualize Heatmaps:
from rfi_fileparser import plot_daily_heatmap, plot_hourly_heatmap
plot_daily_heatmap("downloaded_json_files", "2025/03/25")
plot_hourly_heatmap("downloaded_json_files", "2025/03/25")
To visualize events:
from rfi_fileparser import plot_jamming, plot_spoofing
plot_jamming("downloaded_json_files", "2025/03/25")
plot_spoofing("downloaded_json_files", "2025/03/25")
Data Structure
.downloaded_json_files/
├── dashboard
│ ├──general.json
│ └── 2025
│ └── 03
│ └── statistics.json
├── jamming
│ └── 2025
│ └── 03
│ └── 23
│ ├── events.json
│ ├── heatmap.json
│ ├── 0000
│ │ └── heatmap.json
│ ├── 0100
│ │ └── heatmap.json
│ └── ...
└── spoofing
└── 2025
└── 03
└── 23
├── beforeAndDuringSpoofing.json
├── duringAndAfterSpoofing.json
├── events.json
└── heatmap.json
Data Information
1. jamming/2025/03/23/heatmap.json
→ Daily heatmap data.
2. jamming/2025/03/23/0000/heatmap.json
→ Hourly heatmap data.
-
h3Index: Unique index for each hexagonal cell (H3 system). Use it to get hexgaon boundaries in Python:from h3 import h3 from shapely.geometry import Polygon def h3_to_polygon(h3_index): boundary = h3.h3_to_geo_boundary(h3_index, geo_json=True) return Polygon(boundary)
(Functions for this are included in the GitHub repository.)
-
lowQualityCountandtotalAircraftCount: Number of low NIC / total aircraft seen within that hexagonal cell.
3. jamming/2025/03/23/event.json
→ All jamming events detected on that day.
latitudeandlongitude: Centroid location of each jamming event.startTimeandendTime: Start and end times of each jamming event.
4. spoofing/2025/03/23/beforeAndDuringSpoofing.json
→ For each spoofing event, shows the last known normal position and the first spoofed position observed for each affected flight.
beforeSpoofing: Last known normal positionspoofedInto: First spoofed position
Example:
{
"event_1": [
{
"beforeSpoofing": {
"lat": 53.1131,
"lon": 49.9999,
"alt": 9098.28,
"nic": 7,
"time": 1740858262.297
},
"spoofedInto": {
"lat": 53.102,
"lon": 49.9545,
"alt": 9098.28,
"nic": 0,
"time": 1740859918.787
},
},
...
],
...
}
5. spoofing/2025/03/23/duringAndAfterSpoofing.json
→ For each spoofing event, shows the last spoofed position and the first normal position after recovery.
spoofedInto: Last spoofed positionafterRecovering: First normal position after spoofing
Example:
{
"event_1": [
{
"spoofedInto": {
"lat": 53.101,
"lon": 49.9843,
"alt": 9098.28,
"nic": 0,
"time": 1740867858.763
},
"afterRecovering": {
"lat": 51.7174,
"lon": 55.0444,
"alt": 9098.28,
"nic": 0,
"time": 1740868558.257
}
},
...
],
...
}
6. spoofing/2025/03/23/event.json
→ All spoofing events detected on that day.
latitudeandlongitude: Centroid location of each spoofing event.startTimeandendTime: Start and end times of each spoofing event.
7. spoofing/2025/03/23/heatmap.json
→ Daily heatmap of spoofing-affected region.
-
h3Index: Unique index for each hexagonal cell (H3 system). (See usage example above underjamming/2025/03/23/0000/heatmap.json.) -
spoofedFlightCount: Number of affected aircraft within each cell, based on interpolated true paths. -
seenAircraftCount: Number of unaffected aircraft in the same cell, based on ADS-B data.
Example:
{
"event_1": [
{
"h3Index": "841f533ffffffff",
"spoofedFlightCount": 2,
"seenAircraftCount": 26
},
{
"h3Index": "841f53bffffffff",
"spoofedFlightCount": 3,
"seenAircraftCount": 19
},
...
],
...
}
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
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 rfi_fileparser-0.6.1.tar.gz.
File metadata
- Download URL: rfi_fileparser-0.6.1.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a79e824977442780c0da85448aa15d64c3dd316901ce238b7c4182961bfa430
|
|
| MD5 |
b12aa371ce739251f2bd180f256477f0
|
|
| BLAKE2b-256 |
13cdc3dbc39e5be8ff3bd0dd1b83445e9156acbca5ec1b5b9d18a17948f00650
|
File details
Details for the file rfi_fileparser-0.6.1-py3-none-any.whl.
File metadata
- Download URL: rfi_fileparser-0.6.1-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
477ec699b2a6d8b99828de6e1c01f5897aa7c488ae8b003ac6df5b78de1faa17
|
|
| MD5 |
9e048e96c28629c0e3cffc90211d9ba3
|
|
| BLAKE2b-256 |
70ac2abc4be51293be7959f0b16dc8de133a2220a8be8fd6e0c5ce1934390576
|