Visualizing Radio Contest Results

From Stu2
Jump to: navigation, search

Goal/Intro

  • Visualize data from our radio contest log files in order to see if there are any particular patterns.
  • An interesting follow on might be to get log files from several stations that had varying degrees of success.
  • At W4RM, we have learned that running is fairly important for high scores. So do we run more than we Search and Pounce?

Method

  • Export the Cabrillo Log file from N1MM
  • Run 'activity.pl' which is a perl script I wrote to parse the QSO data in 'filename.log' and store the output in a file called 'filename.log.amped'
  • Use gnuplot to produce the chart from 'filename.log.amped'

The perl script (activity.pl) normalized the data for each band on a scale from 10 - 60. For example, 160M data will have a nominal value of '10'. Then the data for each band is spread out (amplified) so it has a wider numerical range on the plot. This makes it easier to see small frequency changes.

Use gnuplot to plot columns 1 and 3. (time and normalized data)

Results

Here are some of the plots.

The first one is my solo operation in the recent ARRL CWSS contest. Note how I started on 15M by working up the band, down the band and repeat. You can see I worked more people on the first pass. Then I switch to 20, where I worked up the band, down the band and tried a run. Speaking of runs. I discovered later in the contest it was worth trying a run for at least 10 minutes before getting discouraged. Once a skimmer picked me up, I had multiple stations calling me at once.

W7iy-cwss-2011.png

For comparison, here is the plot for CQ World Wide SSB 2011. This has over 6500 Q's in the data set. This is our first multi-multi operation. You can clearly see the long runs and multiple band operations. Look at 14 UTC on 10 Meters and note the run with occasional Q's higher in the band. This OP search and pounced using the second VFO, while running on the main VFO.

Cqww-ssb-2011.png

And here is the plot for CQ World Wide SSB 2007. We were limited multi.

Cqww-ssb-2007.png

Script

Here is the prel script to 'amp' the data. Note you have to change the input file name in the @files array.

#!/usr/bin/perl

use Time::Local;

# file name to process
@files =('cqww2011ssb.log');

@bands = ('160','80','40','20','15','10');

foreach $filename (@files) {
	
		process_file();
	
}

sub process_file {
	$count = 1;
	# Open the text file
	$outfile = $filename.".amped";
	open(DATAFILE, "< $filename") or die "Can't open file $filename\n";
	open(OUTFILE, "> $outfile") or die "Can't open output file $outfile\n";
	print "Creating $outfile: ";
	while (defined ($line = <DATAFILE>)) {
		if ($line =~ /^QSO/) {
			parse_line();
			get_cont();
			get_band();
			get_amped();
			$output = join("\t",$datetime,$freq,$amped,$band,$call,$zone,$cont);
			print OUTFILE $output . "\n";
			$count++;
		}
	}
	close DATAFILE;
	close OUTFILE;
	print $count." records\n";
}
sub parse_line {
	@fields = split(/\s+/, $line);
	$label = $fields[0];
	$freq = $fields[1];
	$date = $fields[3];
	$time = $fields[4];
	$call = $fields[8];
	$zone = $fields[10];
	($yyyy, $mm, $dd) = ($date =~ /(\d+)-(\d+)-(\d+)/);
	($hr, $min) =  ($time =~ /(\d\d)(\d\d)/);
	$datetime = "$yyyy-$mm-$dd"."T"."$hr:$min:00";
}
# Determine area by CQ Zone
# Areas are: NA, SA, AF, EU, AS, FE, OC
sub get_cont {
	if( $zone >=1 && $zone <=8) { $cont = "NA"; }
	if( $zone >=9 && $zone <=16) { $cont = "SA"; }
	if( $zone >=16 && $zone<=23) { $cont = "AS"; }
	if( $zone >=24 && $zone<=32) { $cont = "OC"; }
	if( $zone >= 33 && $zone<=40){  $cont = "AF"; }

}

sub get_band {
	if( $freq >=1800 && $freq <=2000) { $band = 160; }
	if( $freq >=3500 && $freq <=4000) { $band = 80; }
	if( $freq >=7000 && $freq <=7350) { $band = 40; }
	if( $freq >=14000 && $freq <=14350) { $band = 20; }
	if( $freq >=21000 && $freq <=21450) { $band = 15; }
	if( $freq >=28000 && $freq < 29000) { $band = 10; }
}

sub get_amped {
	$w = 5;
	if ($band == 160) {$fu = 2000; $fl = 1800; $bias = 10; }
	if ($band == 80)  {$fu = 4000; $fl = 3500;  $bias = 20; }
	if ($band == 40) { $fu = 7350; $fl = 7000;  $bias = 30; }
	if ($band == 20) { $fu = 14350; $fl = 14000; $bias = 40; }
	if ($band == 15) { $fu = 21450; $fl = 21000; $bias = 50; }
	if ($band == 10) { $fu = 29000; $fl = 28000; $bias = 60; }
	$amped = ((($freq - $fl) / ($fu - $fl)) * $w) + $bias;
}

Here are the key gnuplot commands.

set timefmt x "%Y-%m-%dT%H:%M:%S"
set format x "%H"
unset key
set pointsize 0.4
set ytics   ("80M" 20.0000, "40M" 30.0000, "20M" 40.0000, "15M" 50.0000, "10M" 6
0.0000)
set title "ARRL CW Sweepstakes 2011 - W7IY" 
set xlabel "Time (UTC)" 
set ylabel "QSO Frequency" 
set yrange [ 10.0000 : 70.0000 ] noreverse nowriteback
plot "w7iy.log.amped" using 1:3 with points pt 7