MyNixOS website logo
Description

Spy vs. Spy Data.

Data on the Spy vs. Spy comic strip of Mad magazine, created and written by Antonio Prohias.

SPYvsSPY

Build Status CRAN Downloads Total

plot of chunk spyplot

Joke and Data

Data on the 248 installments of the Spy vs Spy comic by Antonio Prohias appearing in Mad Magazine: date, issue number, outcome, appearance of Grey Spy, V for Victory. Not affiliated or endorsed by the Estate of Antonio Prohias or Mad Magazine, a fan-curated dataset for the promotion of Spy vs Spy scholarship.

-- Steven E. Pav, [email protected]

Installation

This package can be installed from CRAN, via drat, or from github:

# via CRAN:
install.packages("SPYvsSPY")
# via drat:
if (require(drat)) {
  drat:::add("shabbychef")
  install.packages("SPYvsSPY")
}
# get snapshot from github:
if (require(devtools)) {
  install_github('shabbychef/SPYvsSPY')
}

Use it

First get a basic look at the data. The data are documented in the package. For each row we have the issue of Mad, the release date (as a character with format %Y-%m), the page in the Spy vs. Spy Omnibus, the author and artist of the strip, whether White Spy and Black Spy received a 'comeuppance' (i.e. were clubbed, eaten by lion, shot, etc.), whether the Grey Spy appears (only in the 60's), and whether the victorious Spy flashes the 'V for Victory' sign (mostly in the 80's).

library(dplyr)
library(knitr)
library(SPYvsSPY)

# this is it:
data(svs)
head(svs) %>%
	kable()
Mad_noyrmoomnibus_pageauthorartistwhite_comeuppanceblack_comeuppancegrey_spy_appearancev_for_victory
601961-0135Antonio ProhiasAntonio ProhiasTRUETRUEFALSEFALSE
601961-0136Antonio ProhiasAntonio ProhiasTRUETRUEFALSEFALSE
601961-0137Antonio ProhiasAntonio ProhiasFALSETRUEFALSEFALSE
611961-0338Antonio ProhiasAntonio ProhiasFALSETRUEFALSEFALSE
611961-0339Antonio ProhiasAntonio ProhiasTRUEFALSEFALSEFALSE
621961-0440Antonio ProhiasAntonio ProhiasFALSEFALSEFALSEFALSE

Let's check on the appearances per year with a Stem-and-Leaf plot:

library(SPYvsSPY)
# this is it:
data(svs)
stem(as.numeric(gsub('^(\\d{4})-.+','\\1',svs$yrmo)),scale=0.5) 
## 
##   The decimal point is 1 digit(s) to the right of the |
## 
##   196 | 1111111111111122222222222222333333333333334444444444444444444
##   196 | 5555555555555555555555566666666667777777777777788888888999999999999
##   197 | 0000000000000111111111111222222223333344444
##   197 | 55555566666666777788899999
##   198 | 0001111111222222333333334444444444
##   198 | 555566666667
##   199 | 2222
##   199 | 5

Compute a running net score of Black Spy victories:

library(SPYvsSPY)
# this is it:
data(svs)
svs %>%
	mutate(black_victory=as.numeric(white_comeuppance) - as.numeric(black_comeuppance)) %>%
	mutate(net_black_victory=cumsum(black_victory)) %>%
	arrange(Mad_no) %>%
	mutate(decade=10 * as.numeric(gsub('^(\\d{3}).+$','\\1',yrmo))) %>%
	group_by(decade) %>%
		summarize(running_tally_net_black_victory=last(net_black_victory)) %>%
	ungroup() %>%
	kable()
decaderunning_tally_net_black_victory
1960-2
1970-11
1980-5
1990-6

Nearly equal.

Wald Wolfowitz

The Wald Wolfowitz test is a non-parametric test for the presence of serial correlation that is appropriate for binary series like this. The test is performed by computing the number of 'runs', which is to say the number of clusters of consecutive victories by one of the Spies. When the test statistic is too high (compared to what would be observed if the data were serially independent), then the data are too 'flippy', often reversing. This would be the case if Prohias tried to keep score balance by always reversing the previous outcome. If the test statistic is too low, the data are too 'sticky', with long periods of one Spy prevailing over the other. This could happen if Prohias got moody and picked favorites, perhaps.

The test is easy enough to run using the randtests package:

library(randtests)
subdata <- svs %>%
	filter(Mad_no > 152) %>%
	mutate(black_victory=as.numeric(white_comeuppance) - as.numeric(black_comeuppance)) %>%
	filter(abs(black_victory) > 0.5)
set.seed(1234)
resu <- randtests::runs.test(subdata$black_victory,threshold=0)
print(resu)
## 
## 	Runs Test
## 
## data:  subdata$black_victory
## statistic = 0.9, runs = 50, n1 = 40, n2 = 50, n = 90, p-value = 0.4
## alternative hypothesis: nonrandomness

We get back a test statistic of 0.85, indicating slightly greater than random amount of reversal. However, this is not statistically significantly different than the expected value of 0, with a p-value of 0.39.

In conclusion, we have no evidence that Prohias kept running tally of Black and White Spy victories, and the data are consistent with the victor being chosen independently of the previous victories.

Metadata

Version

0.1.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows