Commit 15a47d97 authored by Alex Nunes's avatar Alex Nunes

Minor changes to the network analysis

parent 1ebc2fc2
......@@ -44,7 +44,8 @@
" latitude = mean(mean_latitude), \n",
" longitude=mean(mean_longitude), \n",
" to_latitude=mean(to_latitude),\n",
" to_longitude=mean(to_longitude)\n",
" to_longitude=mean(to_longitude),\n",
" res_time_seconds = mean(res_time_sec)\n",
" ) %>% \n",
"rename(from=location) %>%\n",
"na.omit() -> network_analysis_data\n",
......@@ -54,7 +55,8 @@
" summarise(\n",
" latitude = mean(latitude), \n",
" longitude = mean(longitude),\n",
" n = sum(moves)\n",
" visits = sum(moves),\n",
" res_time_seconds = mean(res_time_seconds)\n",
" ) \n",
"\n",
"\n"
......@@ -90,8 +92,8 @@
" ) %>%\n",
" add_markers(\n",
" data=receivers,\n",
" x = ~longitude, y = ~latitude, text = ~paste(from, \":\", n),\n",
" size = ~n, hoverinfo = \"text\", alpha = 0.9, color=~n\n",
" x = ~longitude, y = ~latitude, text = ~paste(from, \":\", visits, ' visits & ', res_time_seconds, ' seconds of residence time on average'),\n",
" size = ~res_time_seconds, hoverinfo = \"text\", alpha = 0.5, color=~visits\n",
" ) %>%\n",
" layout(\n",
" title = 'Walleye Salmon Network Plot',\n",
......
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