Difference between revisions of "Group15 Report"
Pachen.2017 (talk | contribs) |
|||
Line 38: | Line 38: | ||
==DATA CLEANING, PREPARATION AND MODELING== | ==DATA CLEANING, PREPARATION AND MODELING== | ||
<p> | <p> | ||
− | The dataset has some duplicate rows which has the same individual-local-identifier and timestamp, so it can’t be imported into R by move package, so we firstly dropped them through python. The code shows as blow. | + | The dataset has some duplicate rows which has the same individual-local-identifier and timestamp, so it can’t be imported into R by move package, so we firstly dropped them through python. The code shows as blow.<br> |
+ | |||
+ | [[Image:datap1.png|center]]<br> | ||
We used move package in R which is different from other teams. For the move package, we used it to read our data. | We used move package in R which is different from other teams. For the move package, we used it to read our data. | ||
+ | After imported the data by move, the data shows the format as below in R.<br> | ||
+ | |||
+ | [[Image:datap2.png|center]]<br> | ||
+ | |||
+ | We need to transform the data as dataframe, then we used filter, group_by and summarise function in tidyverse package to make some preprocess. And we merged the dataset with the reference-data to get the sex and age data. We grouped the location data by day and got the average for our map visualization. | ||
+ | |||
+ | [[Image:datap3.png|center]]<br> | ||
+ | |||
+ | After simple data preparation, we calculated the absolute and relative direction using amt package which is one of our main packages. The original data display as below.<br> | ||
+ | |||
+ | [[Image:datap4.png|center]]<br> | ||
+ | |||
+ | We used the mk_track function in amt package to transform the data into the specific format. The code and result display as below.<br> | ||
− | + | [[Image:datap5.png|center]]<br> | |
− | + | Then we need to transform the coordinates to the type that calculation of direction needs by using transform_coords() fuction, then we use direction_abs(), direction_rel() to calculate the absolute direction and relative direction, and step_lengths(), nsd() to calculate the Step Length and Net Squared Displacement (squared distance from a starting location). After visualizing them all, we selected absolute and relative direction into our dashboard because the plots of Step Length and Net Squared Displacement were quite similar to the ground-speed scatter plot and timeseries chart of location we drew.<br> | |
− | + | [[Image:datap6.png|center]]<br> | |
− | < | + | Next, we need to calculate the home range to create polygon by day on our map. The process of creating dataframe named trk is similar to above. |
+ | We used the hr_mcp()(minimum convex polygon) and hr_isopleths()(to get the isopleths) in amt package to get the coordinates of home range polygon, the hr_kde()(Kernel Density Estimation) and hr_mcp() both for the homerange calculation. Due to limitation of time, we only put result by using hr_mcp() into our dashboard. We set levels to 0.95, which means the range includes 95% of the data. The column named “a” contains our polygon data. It is the spatial polygons dataframe data.<br> | ||
− | + | [[Image:datap7.png|center]]<br> | |
− | |||
− | [[Image: | ||
+ | We used the match to transform the abbreviation into numbers, so we can filter month by number in our dashboard.<br> | ||
− | + | [[Image:datap8.png|center]]<br> | |
− | + | The coordinates of polygon can’t be directly used in leaflet, so we created a function called trans_poly() to transform our data. | |
+ | The dat1 is the data filtered from mcps.dat_poly. For each one in poly, we used the trans_poly() to transform then use the addPolygons() to the leaflet.<br> | ||
− | + | [[Image:datap10.png|center]]<br> | |
− | + | For the data about sex and age, we did the similar things.<br> | |
+ | Below are the packages that we used:<br> | ||
− | + | [[Image:datap11.png|center]]<br> | |
− | [[Image: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | < | + | </p> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ==DESIGN FRAMEWORK AND USER GUIDE== | |
− | + | ===Overview=== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ===Individual Movement=== | |
− | |||
− | |||
− | |||
− | |||
===Group View=== | ===Group View=== | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ||
− | |||
− | |||
− | |||
==DEMONSTRATION== | ==DEMONSTRATION== |
Revision as of 19:17, 13 August 2018
Proposal | Poster | Application | Report | Project Groups |
Contents
MOTIVATION
Animal migration has long received much attention as a research topic in biology. Information about animal movement serves to allow us to understand animal behavior and their interactions with each other and the environment. In addition, it allows us to address environmental challenges such as climate and land use change.
Understanding animal migration helps conservationists to conserve these animals through the protection of their habitats and their resources.
We utilize trajectory data to provide an interactive visual analytics approach for valuable insights into the migration of these animals.
OBJECTIVES
We present an interactive visual approach to explore and analyze animal movement data. We applied this approach to a data set of Osprey bird migration flows.
Through this project, we hope that ecologists and conservationists alike will be able to gain insights into the following:
• Bird migration (both as a group and individual) flight path over a period of time. • How differences in individual characteristics (e.g. female vs male, juvenile vs adult) affect flight behavior. • The home range a of these birds.
To achieve the objectives above, we used trajectory data available in the Osprey data set.
REVIEW AND CRITICS OF PAST WORKS
There are plenty of studies on animal migration, each which comes with its own different set of visualization tools. These are customized tools which have been designed by the researchers of the studies in the course of the study. The links to some of these tools are no longer working and they do not allow for upload of user data set, further limiting its widespread adoption for other animal migration studies.
Our application makes use of RStudio, a free popular open software and Shiny which make interactive web applications for visualizing data. In order to use the application, the researchers can easily download the required software from the internet. They can make use of their own animal movement data to extract the migration flows which they wish to analyze.
DATA CLEANING, PREPARATION AND MODELING
The dataset has some duplicate rows which has the same individual-local-identifier and timestamp, so it can’t be imported into R by move package, so we firstly dropped them through python. The code shows as blow.
We used move package in R which is different from other teams. For the move package, we used it to read our data.
After imported the data by move, the data shows the format as below in R.
We need to transform the data as dataframe, then we used filter, group_by and summarise function in tidyverse package to make some preprocess. And we merged the dataset with the reference-data to get the sex and age data. We grouped the location data by day and got the average for our map visualization.
After simple data preparation, we calculated the absolute and relative direction using amt package which is one of our main packages. The original data display as below.
We used the mk_track function in amt package to transform the data into the specific format. The code and result display as below.
Then we need to transform the coordinates to the type that calculation of direction needs by using transform_coords() fuction, then we use direction_abs(), direction_rel() to calculate the absolute direction and relative direction, and step_lengths(), nsd() to calculate the Step Length and Net Squared Displacement (squared distance from a starting location). After visualizing them all, we selected absolute and relative direction into our dashboard because the plots of Step Length and Net Squared Displacement were quite similar to the ground-speed scatter plot and timeseries chart of location we drew.
Next, we need to calculate the home range to create polygon by day on our map. The process of creating dataframe named trk is similar to above.
We used the hr_mcp()(minimum convex polygon) and hr_isopleths()(to get the isopleths) in amt package to get the coordinates of home range polygon, the hr_kde()(Kernel Density Estimation) and hr_mcp() both for the homerange calculation. Due to limitation of time, we only put result by using hr_mcp() into our dashboard. We set levels to 0.95, which means the range includes 95% of the data. The column named “a” contains our polygon data. It is the spatial polygons dataframe data.
We used the match to transform the abbreviation into numbers, so we can filter month by number in our dashboard.
The coordinates of polygon can’t be directly used in leaflet, so we created a function called trans_poly() to transform our data.
The dat1 is the data filtered from mcps.dat_poly. For each one in poly, we used the trans_poly() to transform then use the addPolygons() to the leaflet.
For the data about sex and age, we did the similar things.
Below are the packages that we used:
DESIGN FRAMEWORK AND USER GUIDE
Overview
Individual Movement
Group View
DEMONSTRATION
The purpose of this section is to demonstrate the main aspects of our application using some use cases.
Overview
Individual Movement
Map
Absolute Direction
Relative Direction
Ground Speed
Group View
DISCUSSION
Our application has been designed to study animal movement using bird migration as an example. Utilizing trajectory data from the Osprey data set, we developed our application to include the following visualizations:
• Group movement of birds
• Individual movement of birds
• Home range of birds
• Directions the birds traveled in
The user will be able to derive findings from the visualizations. Findings from our use cases includes the following:
• Flight patterns of the birds: From March – April, the birds travel from South America to North America and vice versa from September – October.
• Ground Speed by age: The median speed of adults is higher than juveniles.
• Ground speed by sex: The median speed of females is higher than males.