Background

Data downloaded from data.mil and data.world. It covers US military airstrikes over a 3 day period during the Vietnam War - 14 - 16 November, 1965. I picked these dates to coincide with the battle for LZ XRay. I deleted several hundred observations out of the roughly 2500 because no lat/long data was available. Most of those observations were actually recce missions. The marker labels/popups consist of the following:

Raw data is available on github (use RCurl to load into a dataframe): https://raw.githubusercontent.com/datameister66/Vietnam/master/vietnam_nov_65.csv

library(leaflet)
## Warning: package 'leaflet' was built under R version 3.3.3
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
# setwd("C:/Users/Cory/Desktop/nam")
df = read.csv("vietnam_nov_65.csv")

dim(df)
## [1] 2252   39
names(df)
##  [1] "THOR_DATA_VIET_ID"    "MILSERVICE"           "MSNDATE"             
##  [4] "SOURCEID"             "SOURCERECORD"         "AIRCRAFT"            
##  [7] "TAKEOFFLOCATION"      "LAT"                  "LONG"                
## [10] "TGTTYPE"              "NUMWEAPONSDELIVERED"  "TIMEONTARGET"        
## [13] "WEAPONTYPE"           "WEAPONTYPEWEIGHT"     "AIRCRAFT_ORIGINAL"   
## [16] "AIRCRAFT_ROOT"        "FLTHOURS"             "MFUNC"               
## [19] "MFUNC_DESC"           "MISSIONID"            "NUMOFACFT"           
## [22] "OPERATIONSUPPORTED"   "PERIODOFDAY"          "UNIT"                
## [25] "TGTCLOUDCOVER"        "TGTCONTROL"           "TGTCOUNTRY"          
## [28] "TGTORIGCOORDS"        "TGTORIGCOORDSFORMAT"  "TGTWEATHER"          
## [31] "ADDITIONALINFO"       "GEOZONE"              "ID"                  
## [34] "MFUNC_DESC_CLASS"     "NUMWEAPONSJETTISONED" "NUMWEAPONSRETURNED"  
## [37] "TIMEOFFTARGET"        "Year"                 "popup"
# If the same mission conducts multiple attacks on the same # lat/long, it generates a separate observation. Therefore, I have # chosen to dedupe on mission id number (MISSIONID)
df <- distinct(df, MISSIONID, .keep_all = T)
dim(df)
## [1] 609  39
# US Air Force = blue
# US Marine Corps = dark red
# US Navy = light green
df$color <- ifelse(df$MILSERVICE == "USAF", "blue", ifelse(
  df$MILSERVICE == "USMC", "darkred", "lightgreen"
))

icons <- awesomeIcons(
  icon = "air",
  iconColor = "black",
  library = "glyphicon",
  markerColor = df$color # Branch of Service
  #text = df$MISSIONID 
)

leaflet(df) %>% 
  addProviderTiles("Esri.WorldImagery", group = "Image") %>%
  addProviderTiles("Stamen.Terrain", group = "Terrain") %>%
  
  addLayersControl(
    baseGroups = c("Image", "Terrain"),
    overlayGroups = df$MSNDATE,
    options = layersControlOptions(collapsed = FALSE))  %>%
  
  addAwesomeMarkers(icon = icons,
             label = ~ df$popup, 
             popup = ~ df$popup,
             group = paste(df$MSNDATE))
## Assuming 'LONG' and 'LAT' are longitude and latitude, respectively

LZ XRay

This photo shows the area where the Battle of LZ Xray took place, southwest of Pleiku.

LZ XRay

LZ XRay