-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rhistory
101 lines (101 loc) · 3.57 KB
/
.Rhistory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
shiny::runApp()
shiny::runApp()
library(fisheryO)
stock_status(active_year = 2018)
stock_status(active_year = 2017)
runApp()
tagging_events <- read.csv("Data/tagging_events.csv")
View(tagging_events)
runApp()
names(tagging_events)
runApp()
library(leaflet)
library(mapview)
leaflet() %>%
addProviderTiles(providers$Esri.OceanBasemap) %>%
setView(lng = -3.5, lat = 53.8, zoom = 6) %>%
addCircleMarkers(lng=tagging_events$longitude, lat=tagging_events$latitude,
radius = tagging_events$numbercodtagged/3,
color = col(tagging_events$numbercodtagged),
stroke = FALSE, fillOpacity = 0.9)
col <- colorNumeric("viridis",tagging_events$numbercodtagged, n=5)
leaflet() %>%
addProviderTiles(providers$Esri.OceanBasemap) %>%
setView(lng = -3.5, lat = 53.8, zoom = 6) %>%
addCircleMarkers(lng=tagging_events$longitude, lat=tagging_events$latitude,
radius = tagging_events$numbercodtagged/3,
color = col(tagging_events$numbercodtagged),
stroke = FALSE, fillOpacity = 0.9)
dim(tagging_events)
test=filter(tagging_events, Gear =="Semipelagic")
library(dplyr)
test=filter(tagging_events, Gear =="Semipelagic")
test=filter(tagging_events, gear =="Semipelagic")
leaflet() %>%
addProviderTiles(providers$Esri.OceanBasemap) %>%
setView(lng = -3.5, lat = 53.8, zoom = 6) %>%
addCircleMarkers(lng=test$longitude, lat=test$latitude,
radius = test$numbercodtagged/3,
color = col(test$numbercodtagged),
stroke = FALSE, fillOpacity = 0.9)
leaflet() %>%
addProviderTiles(providers$Esri.OceanBasemap) %>%
setView(lng = -3.5, lat = 53.8, zoom = 6) %>%
addCircleMarkers(lng=test$longitude, lat=test$latitude,
#radius = test$numbercodtagged/3,
#color = col(test$numbercodtagged),
stroke = FALSE, fillOpacity = 0.9)
leaflet() %>%
addProviderTiles(providers$Esri.OceanBasemap) %>%
setView(lng = -3.5, lat = 53.8, zoom = 6) %>%
addCircleMarkers(lng=tagging_events$longitude, lat=tagging_events$latitude,
radius = tagging_events$numbercodtagged/3,
color = col(tagging_events$numbercodtagged),
stroke = FALSE, fillOpacity = 0.9) %>%
addLegend("bottomleft", pal=col, values = tagging_events$numbercodtagged,
title = "Number of Cod tagged")
test$longitude
test$latitude
class(test$longitude)
class(test$latitude)
leaflet() %>%
addProviderTiles(providers$Esri.OceanBasemap) %>%
setView(lng = -3.5, lat = 53.8, zoom = 6) %>%
addCircleMarkers(lng=tagging_events$longitude, lat=tagging_events$latitude,
radius = tagging_events$numbercodtagged/3,
color = col(tagging_events$numbercodtagged),
stroke = FALSE, fillOpacity = 0.9,
popup=paste("<b>Long:</b> ",round(tagging_events$longitude,4),
"<br />", "<b>Lat</b>: ",round(tagging_events$latitude,4),
"<br />", "<b>Year</b>", tagging_events$year,
"<br />", "<b>No. fish tagged</b>", tagging_events$numbercodtagged,
"<br />", "<b>Survey</b>", tagging_events$survey_ID)) %>%
addLegend("bottomleft", pal=col, values = tagging_events$numbercodtagged,
title = "Number of Cod tagged")
runApp()
sessionInfo()
shiny::runApp()
shiny::runApp()
library(plyr)
library(reshape)
id=c("034","034","016","016","016","340","340")
date=c("1997-09-28", "1997-10-06", "1997-11-04", "2000-09-27",
"2003-07-20", "1997-11-08", "1997-11-08")
ref=c(2, 2, 1, 1, 2, 1, 1)
data1=data.frame(id, date, ref, stringsAsFactors = FALSE)
data1
data2 <- ddply(data1, .(id), transform, occasion = seq_along(id))
data2
c1 <- cast(data2, id ~ occasion, value = 'date')
c2 <- cast(data2, id ~ occasion, value = 'ref')
names(c1)[-1] <- paste('date', 1:3, sep = '')
names(c2)[-1] <- paste('ref', 1:3, sep = '')
merge(c1, c2, by = 'id')
c2
shiny::runApp()
shiny::runApp('H:/IGFS/IGFS3/HAD')
runApp('H:/Tagging/Deployed/Current-NewData')
shiny::runApp()
shiny::runApp()
runApp()
runApp()