I took Romerl’s data loading and cleaning and kept the lattitude and longitude columns. Using ggplot2, maps, and mapdata, I plotted the location of bombing sites across Germany. The graphics are very preliminary, this is to suggest a form of data visualization we could use, not to present anything that would go in the final presentation.
library(stringr)
library(ggplot2)
library(maps)
library(mapdata)
library(ggrepel) #not using this at the moment, but it does give the option to add labels. While not useful for the bombing sites, we could use it to label cities.
Loading of THOR_WWII_DATA_CLEAN.csv directly from data.world website.
# ref: [HOW]
urlfile <- "https://query.data.world/s/7tdvewopqdr5mu4zwlqeuy4c7nyeco"
tableWW2 <- read.table(file = urlfile, header = TRUE, fill = TRUE, sep = ",")
## Warning in scan(file = file, what = what, sep = sep, quote = quote, dec =
## dec, : EOF within quoted string
Removing unnecessary fields.
Separating data frame into two theaters: European and Pacific
ETOsites<-tableWW2ETO[,9:12]
ETOclean<-ETOsites[complete.cases(ETOsites),]
Targets<-ETOsites$TGT_TYPE
wm<-map_data("world")
sites<-data.frame(lat=ETOclean$LATITUDE,long=ETOclean$LONGITUDE, stringsAsFactors = FALSE)
#ggplot(ETOclean,aes(x=LONGITUDE,y=LATITUDE))+geom_point()+scale_y_continuous(limits=c(30,75))+scale_x_continuous(limits=c(-5,30))
EuropeM<-ggplot() + geom_polygon(data = wm, aes(x=long, y = lat, group = group), fill = NA, color = "black") + coord_fixed(1.3)
EuropeM<-EuropeM+xlim(-10,40)+ylim(35,60)
#f50k<-sites[1:50000,]
EuropeM+geom_point(data=sites,aes(long,lat),color="red",size=1)
## Warning: Removed 98 rows containing missing values (geom_point).
justgerm<-ggplot() + geom_polygon(data = wm, aes(x=long, y = lat, group = group), fill = NA, color = "black") + coord_fixed(1.3)+xlim(2,16)+ylim(46,55)
justgerm+geom_point(data=sites,aes(long,lat),color="red",size=1)
## Warning: Removed 11166 rows containing missing values (geom_point).