Commit a0c3f119 authored by Alex Nunes's avatar Alex Nunes

Modified environment and mapping

parent 2b472be4
......@@ -172,15 +172,12 @@
"metadata": {},
"outputs": [],
"source": [
"\n",
"geo <- list(\n",
"# scope = 'north america',\n",
"# scope = 'north america',\n",
" showland = TRUE,\n",
" landcolor = toRGB(\"grey83\"),\n",
" subunitcolor = toRGB(\"white\"),\n",
" countrycolor = toRGB(\"white\"),\n",
" showlakes = TRUE,\n",
" lakecolor = toRGB(\"white\"),\n",
" landcolor = toRGB(\"#7BB992\"),\n",
" showocean = TRUE,\n",
" oceancolor = toRGB(\"#A0AAB4\"),\n",
" showcountries = TRUE,\n",
" resolution = 50,\n",
" center = list(lat = ~median(latitude),\n",
......@@ -192,8 +189,12 @@
"\n",
"map <- summary_data %>% \n",
" filter(str_detect(location, \"HFX\") & !str_detect(location, \"lost\")) %>% \n",
" plot_geo(lat = ~latitude, lon = ~longitude, color = ~detection_count, height = 900, width=1600 )%>%\n",
" add_markers(text = ~paste(location), hoverinfo = ~paste(location, ': ', detection_count,' detections')) %>%\n",
" plot_geo(lat = ~latitude, lon = ~longitude, color = ~detection_count, height = 900 )%>%\n",
" add_markers(\n",
" text = ~paste(location, ': ', detection_count,'detections', ' & ', total_residence_time_in_seconds, ' seconds of residence time'), \n",
" hoverinfo = \"text\",\n",
" size = ~c(detection_count/10)# + total_residence_time_in_seconds/3600)\n",
" )%>%\n",
" layout(title = \"Detections on the Halifax Line\",geo = geo)\n",
"\n",
"\n",
......@@ -237,7 +238,7 @@
"source": [
"mapbox <- summary_data %>% \n",
" filter(str_detect(location, \"HFX\") & !str_detect(location, \"lost\")) %>% \n",
" plot_mapbox(lat = ~latitude, lon = ~longitude, color = ~detection_count, size = , height = 900) %>%\n",
" plot_mapbox(lat = ~latitude, lon = ~longitude, color = ~detection_count , height = 900) %>%\n",
" add_markers(\n",
" text = ~paste(location, ': ', detection_count,'detections', ' & ', total_residence_time_in_seconds, ' seconds of residence time'), \n",
" hoverinfo = \"text\",\n",
......@@ -256,7 +257,10 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"source": [
"library(cowsay)\n",
"cowsay::say(\"Any questions?\",by=\"shark\",)"
]
}
],
"metadata": {
......
......@@ -40,3 +40,4 @@ dependencies:
- r-rserve
- r-cairo
- r-png
- r-leaflet
install.packages("gdistance", repos='http://cran.us.r-project.org')
install.packages("cowsay", repos='http://cran.us.r-project.org')
library(devtools)
install_git("https://gitlab.oceantrack.org/GreatLakes/glatos", branch="workshop")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment