Space Launch Sites over Time

March 29, 2015
By

(This article was first published on Wiekvoet, and kindly contributed to R-bloggers)

Continuing from last weeks post, I am now looking at space launch sites.

Data

Data are from the main table. In addition, this sites table was manually browsed for interpretation of abbreviations.

List of most important sites

Just by running counts the most important locations (more that 100 counts) are visible. As can be seen, each site has two parts. LC is an abbreviation for launch complex.
                                Site Freq
1  NIIP-53  LC41/1                    310
2  NIIP-5   LC31                      308
3  NIIP-5   LC1                       264
4  NIIP-53  LC43/4                    243
5  NIIP-53  LC43/3                    193
6  GIK-5    LC1                       191
7  NIIP-53  LC132/2                   172
8  NIIP-53  LC132/1                   168
9  NIIP-53  LC133/3                   123
10 CSG      ELA2                      119
11 CC       LC17A                     118
12 CC       LC17B                     107
13 GIK-5    LC200/39                  106
14 NIIP-53  LC16/2                    103
For ease of analysis, the Site is reduced to the first part. In addition, some sites have been renamed. The most important sites:
#NIIP-5=GIK-5=Baykonur
#NIIP-53=GNIIP=GIK-1=Plesetsk
#CC=Cape Canaveral=KSC=John F. Kennedy Space Center, Florida
#V=Vandenberg
#CSG=Centre Spatial Guyanais, Kourou, Guyane Francaise

In addition, for each site the country is determined. This led me to some confusion. Some locations seemed to be on the moon. However, I could not find the launches of the Apollo astronauts back from the moon. Finally, to remove this confusion and for ease of depiction I have only taken the locations with more than 10 counts. Two locations are not countries. A sea platform (Odyssee) and plane launch (Lockheed L-1011). 
The plot shows the renames in Russia, but also the parallel usage of the names KSC and CC by the USA. VandenBerg gets used less over time. China and India got more active in the recent years. 

Code

library(dplyr)
library(ggplot2)
r1 <- readLines(‘launchlog.txt’)
colwidth  <- gregexpr(‘#’,r1[2])[[1]] %>%
    c(.,max(nchar(r1))) %>%
    diff(.)

cols <- read.fwf(textConnection(r1[1]),
        widths=colwidth,
        header=FALSE,
        comment.char=’@’) %>%
    unlist(.) %>%
    make.names(.) %>%
    gsub(‘\.+$’,”,.) 

r2 <- read.fwf(‘launchlog.txt’,
    widths=colwidth,
    col.names=cols) 
r3 <- filter(r2,!is.na(Suc))
Sys.setlocale(category = “LC_TIME”, locale = “C”)
r3$Launch.Date..UTC[1:3]
r3$Date <- as.Date(r3$Launch.Date..UTC,format=’%Y %b %d’)

xtabs(~ Site , r3) %>%
  as.data.frame(.) %>%
  arrange(.,-Freq) %>%
  filter(.,Freq>100)
#LC=launch complex
ll <- levels(r3$Site)
r3$loc1 <- factor(gsub(‘( |,)[[:print:]]+$’,”,ll)[r3$Site])
xtabs(~ loc1 , r3) %>%
    as.data.frame(.) %>%
   arrange(.,-Freq) %>%
   filter(.,Freq>100)
#http://planet4589.org/space/log/sites.txt
#NIIP-5=GIK-5=Baykonur
#NIIP-53=GNIIP=GIK-1=Plesetsk
#CC=Cape Canaveral=KSC=John F. Kennedy Space Center, Florida
#V=Vandenberg
#CSG=Centre Spatial Guyanais, Kourou, Guyane Francaise
#JQ=Jiuquan Space Center, Nei Monggol Zizhiqu, China
#XSC=Xichang Space Center, Sichuan, China
#GTsP-4, Kapustin Yar, Volgograd, Rossiya
#L1011 = modified Lockheed L-1011 TriStar aircraft 
#Odyssey = Sea launch from platform

locbycountry <- read.csv(text=’
CC    , USA  
CSG   , France
GIK-1 , Russia
GIK-5 , Russia
GNIIPV ,Russia
GTsP-4 ,Russia
JQ     ,China
KASC   ,Japan
KSC    ,USA
L-1011 ,Air
MARS   ,USA
NIIP-5 ,Russia
NIIP-53 ,Russia
ODYSSEY ,Sea platform
PA      ,USA
SHAR    ,India
TNSC    ,Japan
TYSC    ,China
V       ,USA
WI      ,USA
XSC  , China’,
skip=1,header=FALSE,
  col.names=c(‘loc1′,’Geography’),
  stringsAsFactors=FALSE,
  strip.white=TRUE) %>%
  arrange(.,Geography) 

r4 <- xtabs(~ loc1 , r3) %>%
    as.data.frame(.) %>%
#   arrange(.,-Freq) %>%
    filter(.,Freq>10) %>%
    select(.,loc1) %>%
    merge(.,r3) %>%
    mutate(.,loc1=as.character(loc1)) %>%
    merge(.,locbycountry) %>%
    mutate(.,loc1=factor(loc1,levels=rev(locbycountry$loc1)))

ggplot(r4, aes(loc1, Date,col=Geography)) +
    geom_point()+
    coord_flip()+
    geom_jitter(position = position_jitter(width = .25)) +
    xlab(‘Geography’) +
    theme(legend.position=”bottom”)+
    guides(col=guide_legend(nrow=2))

To leave a comment for the author, please follow the link and comment on their blog: Wiekvoet.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)