Data
- Leg bands that use global position system to recored location and altitude
- Five inidivdual birds during fall migration 2013
- Data is available from USGS.
- Lets take a look at the data using the code below
## Crane Time X Y
## 1 100840 9/1/2013 0:59 -2663.988 3273.347
## 2 100840 9/1/2013 12:56 -2665.651 3273.454
## 3 100840 9/1/2013 18:54 -2666.122 3271.090
## 4 100840 9/2/2013 6:50 -2663.497 3270.656
## 5 100840 9/2/2013 12:50 -2665.664 3271.351
## 6 100840 9/3/2013 0:48 -2663.884 3272.595
# Change date/time to class 'POSIXct'
df.sacr$Time <- mdy_hm(df.sacr$Time, tz = "America/Chicago")
pt.sacr <- SpatialPointsDataFrame(coords = df.sacr[, 3:4], data = data.frame(crane = df.sacr$Crane,
time = df.sacr$Time), proj4string = CRS("+proj=aeqd +lat_0=51 +lon_0=-110 +ellps=GRS80 +units=km +no_defs"))
# Get map of World
map.world <- map("world", fill = TRUE, plot = FALSE) #projection = 'azequalarea', plot = FALSE)orientation = c(51,-101,0)
sf.world <- map2SpatialPolygons(map.world, IDs = map.world$names)
map.crs <- CRS("+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0")
# Plot data for crane 100840 on world map
plot(sf.world, xlim = c(-200, -101), ylim = c(29.3, 68.5))
plot(spTransform(pt.sacr, map.crs)[which(df.sacr$Crane == 100840), ], add = TRUE)