Where are all the hams?

Posted by Fred C (W6BSD) on May 07 2020

When I build or install a new antenna, I always run a series of tests. Like everyone else, I look at the resonant frequency and SWR. But to see how the antenna is performing, I run WSPR1 for a few days. Then I use the data collected by WSPR Net to draw the graphs that can be seen in my previous post about the 80-meter antenna I have installed in my backyard.

With these WSPR graphs, I can see where and in what direction I beam my signal, as well as how far. The violin plot also gives me information on the skip zones. These graphs are a handy tool for any antenna designer to view an antenna's performance.

There is one thing that always puzzled me: no matter the radiation pattern of my antenna, my system seemed to perform poorly in some directions. My hunch was that the antenna wasn't the issue, but that the ham radio operator density in some areas was sparse.

To test that hypothesis, I grabbed Python, my favorite programming language. I downloaded the WSPR raw data for the entire month of April 2020 and quickly wrote the following program to map where my fellow active ham radio operators are located.

Activity heatmaps

As you can see on world map, the large majority of the activity is in Europe and the US. The US has many more licensed operators, but Europeans seem to be more active.

On the US map, the majority of the activity is on the East Coast. Illinois and Texas seem active as well. In general, the hot spots are around urban areas. In California, the most active region is the San Francisco bay. Even Los Angeles, with its large population, is less active.

Active ham operators world wide (WSPR data)
Active ham operators world wide (WSPR data)

Active hamradio operators in the US (WSPR data)
Active hamradio operators in the US (WSPR data)

Active hamradio operators in the EU (WSPR data)
Active hamradio operators in the EU (WSPR data)

Active hamradio operators in the Australia / New Zealand(WSPR data)
Active hamradio operators in the Australia / New Zealand (WSPR data)

Active hamradio operators in South America(WSPR data)
Active hamradio operators in South America (WSPR data)

The program

I have quickly hacked this short python program to draw the heat-maps. The program uses the NumPy, matplotlib, and Basemap extension.

#!/usr/bin/exec python3.7

import csv
import logging
import numpy as np

import matplotlib.pyplot as plt

from mpl_toolkits.basemap import Basemap
from maidenhead import grid2latlon

FILENAME = 'wsprspots-2020-04.csv'


logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s',

logging.info('Reading data...')
lats, lons = [], []
with open(FILENAME) as csvfile:
  spamreader = csv.reader(csvfile)
  for row in spamreader:
    for col in (3, 7):
      lat, lon = grid2latlon(row[col])

logging.info('Plotting: %d datapoints', len(lats))

fig = plt.figure(figsize=(14, 8))
fig.suptitle('WSPR HEATMAP', fontsize=14, fontweight='bold')
fig.text(.02, .02, 'By W6BSD Fred')

bmap = Basemap(projection='merc', resolution='l',
               llcrnrlat=-80, urcrnrlat=80, llcrnrlon=-180, urcrnrlon=180)
# llcrnrlat=22, urcrnrlat=52, llcrnrlon=-130, urcrnrlon=-64)

# 5ยบ boxes
lon_bins = np.linspace(-180, 180, 72)
lat_bins = np.linspace(-80, 80, 36)

density = np.histogram2d(lats, lons, [lat_bins, lon_bins])[0]
lon_bins_2d, lat_bins_2d = np.meshgrid(lon_bins, lat_bins)
xs, ys = bmap(lon_bins_2d, lat_bins_2d)
density = np.hstack((density, np.zeros((density.shape[0], 1))))
density = np.vstack((density, np.zeros((density.shape[1]))))

logging.info('Mesh') # RdBu_r
plt.pcolormesh(xs, ys, density, cmap='jet', shading='gouraud')
cbar = plt.colorbar(orientation='vertical', shrink=0.625, aspect=20,
                    fraction=0.2, pad=0.02)
cbar.set_label('contacts density', size=14)

logging.info('Save figure')


This method is not perfect because it only uses data from WSPR. Some countries do not run WSPR; for example, I have never seen any spot or report coming from Mexico. FT8 is the most popular communication mode in the ham community. I want to run my program with data from FT8. If anyone of you knows where I could get that data, please send me a message.

  1. WSPR Weak Signal Propagation Reporter 

 Antenna      WSPR      FT8      Python