Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion rtmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from folium.plugins import MeasureControl

def create_point_layer(csv_file):

df = pd.read_csv(csv_file)

# Row filtering
Expand All @@ -17,6 +16,13 @@ def create_point_layer(csv_file):
(df_filtered['rx lat'].between(-90, 90)) &
(df_filtered['rx long'].between(-180, 180))]

# Replace commas with periods in 'rx snr' and convert to numeric
df_filtered['rx snr'] = df_filtered['rx snr'].str.replace(',', '.').astype(str)
df_filtered['rx snr'] = pd.to_numeric(df_filtered['rx snr'], errors='coerce')

# Drop rows with NaN values in 'rx snr'
df_filtered = df_filtered.dropna(subset=['rx snr'])

# Check if df_filtered has valid data
if df_filtered.empty:
print(f"No valid data found in {csv_file}. Skipping point layer creation.")
Expand Down Expand Up @@ -52,6 +58,7 @@ def create_point_layer(csv_file):

return layer


def create_map_with_layers(csv_files, output_file):
# Base map
initial_df = pd.read_csv(csv_files[0])
Expand Down