Difference between revisions of "Group15 Report"
Pachen.2017 (talk | contribs) |
Pachen.2017 (talk | contribs) |
||
(39 intermediate revisions by 2 users not shown) | |||
Line 25: | Line 25: | ||
Through this project, we hope that ecologists and conservationists alike will be able to gain insights into the following: | 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. | + | • Bird migration (both as a group and individual) flight path over a period of time. <br> |
− | • How differences in individual characteristics (e.g. female vs male, juvenile vs adult) affect flight behavior. | + | • How differences in individual characteristics (e.g. female vs male, juvenile vs adult) affect flight behavior. <br> |
− | • The home range a of these birds. | + | • The home range a of these birds. <br> |
− | To achieve the objectives above, we used trajectory data available in the Osprey data set. | + | To achieve the objectives above, we used trajectory data available in the Osprey data set. |
==REVIEW AND CRITICS OF PAST WORKS== | ==REVIEW AND CRITICS OF PAST WORKS== | ||
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.<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. | ||
+ | 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> | ||
+ | |||
+ | 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|350px|center]]<br> | ||
+ | [[Image:datap12.png|350px|center]]<br> | ||
</p> | </p> | ||
==DESIGN FRAMEWORK AND USER GUIDE== | ==DESIGN FRAMEWORK AND USER GUIDE== | ||
+ | The visualization that we have created contains 3 different tabs. They have been split into overview, individual view and group view. | ||
+ | [[Image:15design1.png|550px|center]]<br> | ||
===Overview=== | ===Overview=== | ||
+ | [[Image:15design2.png||1100px|center]]<br> | ||
+ | The visualization animates the flight migration of a group of birds across the months for the periods of 2015 - 2017. | ||
+ | Each dot represents the location of the bird on a particular day and each coloured line of dots represents the flight migration path of each bird. | ||
===Individual Movement=== | ===Individual Movement=== | ||
+ | [[Image:15design3.png|800px|center]]<br> | ||
+ | The individual movement tab contains 4 sub-tabs <br> | ||
+ | i) Map <br> | ||
+ | ii) Absolute direction <br> | ||
+ | iii) Relative direction<br> | ||
+ | iv) Ground speed<br> | ||
+ | |||
+ | i) The map sub tab has the following features: <br> | ||
+ | • Year selection – By clicking on the radio button, the user can select from the period 2015 – 2017. <br> | ||
+ | • Bird selection – By choosing from the drop-down list available, the user can select the bird that he wishes to study. <br> | ||
+ | • Month range – The slider here allows one to select from the months of Jan – Dec.<br> | ||
+ | • On/off highlight – Click on the radio button to reveal the highlighted points. <br> | ||
+ | • Month range highlight – Slider allows one to select the months that they want to highlight, which will appear as a red line. <br> | ||
+ | • On/off popup – Click on the radio button to display pop-up of bird name and date.<br> | ||
+ | • Select a type – 4 visualization choices are available line, polygon, point and cluster.<br> | ||
+ | Line and point – The places that the bird were in can be seen either as a blue line/ blue point.<br> | ||
+ | Polygon – shows the home range of the birds. <br> | ||
+ | Cluster – shows the number of days the birds spend in that area. <br> | ||
+ | • Graph – The graph is linked to the year and bird selected. A horizontal line parallel to the x-axis indicates that the bird is stationary at a location during that period. <br> | ||
+ | |||
+ | ii) The absolute direction sub tab has the following features: | ||
+ | [[Image:15design4.png|700px|center]]<br> | ||
+ | • Year selection – By clicking on the radio button, the user can select from the period 2015 – 2017.<br> | ||
+ | • Bird selection – By ticking on the checkbox, the user can select the bird he is interested in.<br> | ||
+ | • From the absolute angles, we can tell the cardinal direction which the bird travels in. <br> | ||
+ | • The direction bearing ranges from 0 to 360 degrees.<br> | ||
+ | • 0,90,180 and 270 indicates that the bird is travelling north, east, west and south respectively.<br> | ||
+ | • The denser the area of the triangle, the move frequent the bird travelled in that direction.<br> | ||
+ | iii) The relative direction sub tab has the following features: | ||
+ | [[Image:15design5.png||700px|center]]<br> | ||
+ | • Year selection – By clicking on the radio button, the user can select from the period 2015 – 2017.<br> | ||
+ | • Bird selection – By ticking on the checkbox, the user can select the bird he is interested in.<br> | ||
+ | • From the relative angles, we can tell the direction which the bird turns. <br> | ||
+ | • The direction bearing ranges from 0 to 180/-180 degrees.<br> | ||
+ | • 0,90, -90 and 180/-180 indicates that the bird is travelling straight, left, right and backwards respectively.<br> | ||
+ | • The denser the area of the triangle, the move frequent the bird travelled in that direction.<br> | ||
+ | |||
+ | iv) The ground speed sub tab has the following features: | ||
+ | [[Image:15design6.png|900px|center]]<br> | ||
+ | • Year selection – By clicking on the radio button, the user can select from the period 2015 – 2017.<br> | ||
+ | • Bird selection – By ticking on the checkbox, the user can select the bird he is interested in.<br> | ||
+ | • The scatter plot shows the ground speed over the months. Each point represents a day.<br> | ||
===Group View=== | ===Group View=== | ||
+ | The functions of absolute/relative angles are the same as previously described above. | ||
+ | The group view tab contains 3 sub-tabs:<br> | ||
+ | i) Absolute direction <br> | ||
+ | ii) Relative direction<br> | ||
+ | iii) Ground speed<br> | ||
+ | i) and ii) The absolute/relative direction design are the same as previously described in section 5.2. The only difference being that the drop-down list has only 2 options (age/sex). | ||
− | + | iii) The ground speed sub tab has the following features: | |
+ | [[Image:15design8.png|700px|center]]<br> | ||
+ | • Measure selection – Select from the drop-down list either age or sex. <br> | ||
+ | • The box plot displayed allows one to make comparison between the ground speed of different characteristics of the birds. <br> | ||
==DEMONSTRATION== | ==DEMONSTRATION== | ||
The purpose of this section is to demonstrate the main aspects of our application using some use cases. | The purpose of this section is to demonstrate the main aspects of our application using some use cases. | ||
===Overview=== | ===Overview=== | ||
+ | |||
+ | [[Image:dem1.gif|300px]][[Image:dem02.gif|300px]][[Image:dem03.gif|300px]][[Image:dem01.png]] | ||
+ | |||
+ | For the period of 2015 – 2017, the migratory flight path of the group of birds can be seen. | ||
+ | |||
+ | |||
+ | |||
+ | For a period of 1 year, it can be seen that the flight paths of this group of birds are similar in nature, travelling along the coastal states between North America and South America. | ||
===Individual Movement=== | ===Individual Movement=== | ||
====Map==== | ====Map==== | ||
+ | |||
+ | [[Image:dem2.png|700px|center]] | ||
+ | |||
+ | We selected the bird “Staddler”. The blue line/blue dots indicate the Staddler’s travel period from Jan 17 to Dec 17. The red line indicate that it was in South America from Jan 17 – Mar 17. | ||
+ | |||
+ | [[Image:dem3.png|700px|center]] | ||
+ | |||
+ | Staddler was at the above locations on these dates. | ||
+ | |||
+ | [[Image:dem4.png|700px|center]] | ||
+ | |||
+ | Staddler spent the most amount of time in North America, a total of 155 days on the upper right coast. Clicking on the 155 days, allows one to zoom in to arrive at the diagram below. | ||
+ | |||
+ | [[Image:dem5.png|700px|center]] | ||
+ | |||
+ | It has spent 113 days in the area of the polygon. This is the Seabrook Salt Mash, which is likely to be its home range. To revert to the previous diagram, click on the “Home” button located below the “-“ sign. | ||
+ | |||
+ | [[Image:dem6.png|600px|center]][[Image:dem61.png|600px|center]] | ||
+ | |||
+ | The red polygon represents the activity range in a day. With an intense patch of red, it has spent the longest time in the Seabrook Salt Mash area. | ||
+ | |||
+ | [[Image:dem7.png|400px|center]][[Image:dem72.png|400px|center]][[Image:dem73.png|400px|center]] | ||
+ | |||
+ | Selecting the bird “Flow”, we realized its behavior differs from that of the other birds | ||
+ | *No migration for the period of 2015. The other birds had migration for 2015 – 2017. | ||
+ | *For 2016 and 2017, it only migrated to Cuba. The other birds all migrated to South America. | ||
+ | This could be because it was born in May 2014 and was still a juvenile different from the other 4 birds which were adults. | ||
+ | |||
====Absolute Direction==== | ====Absolute Direction==== | ||
+ | |||
+ | [[Image:dem8.png|700px|center]] | ||
+ | |||
+ | It mainly flew in the south-east direction. | ||
+ | |||
====Relative Direction==== | ====Relative Direction==== | ||
+ | |||
+ | [[Image:dem9.png|700px|center]] | ||
+ | By relative direction, it turned backwards to move in the opposite direction most frequently. | ||
+ | |||
====Ground Speed==== | ====Ground Speed==== | ||
+ | |||
+ | [[Image:dem10.png|700px|center]] | ||
+ | |||
+ | Comparing the ground speeds, Flow had less activity compared to Nick. Nick had the highest ground speed in its migratory months Mar-Apr and Sep-Oct | ||
+ | |||
===Group View=== | ===Group View=== | ||
+ | [[Image:dem11.png|700px|center]] | ||
+ | |||
+ | From the box plot, we can see that the median speed of adult (1.66) is higher than juveniles (1.47). | ||
+ | |||
+ | [[Image:dem12.png|700px|center]] | ||
+ | |||
+ | From the box plot, we can see that the median speed of male (1.42) is higher than female (0.7). | ||
==DISCUSSION== | ==DISCUSSION== | ||
Line 75: | Line 231: | ||
• Ground Speed by age: The median speed of adults is higher than juveniles.<br> | • Ground Speed by age: The median speed of adults is higher than juveniles.<br> | ||
• Ground speed by sex: The median speed of females is higher than males.<br> | • Ground speed by sex: The median speed of females is higher than males.<br> | ||
+ | |||
==FUTURE WORK== | ==FUTURE WORK== | ||
+ | |||
Our current work only looks at the Osprey population in North and South America. Using the application, the study could be extended to Osprey found in other regions of the world. In addition, the application could also be used to study the flight migration of other bird types. | Our current work only looks at the Osprey population in North and South America. Using the application, the study could be extended to Osprey found in other regions of the world. In addition, the application could also be used to study the flight migration of other bird types. | ||
Line 83: | Line 241: | ||
A home range is the area in which an animal lives and moves on a periodic basis. There are various ways of calculating the home range. To build into the application different methods of deriving home range such as minimum convex polygon (MCP), kernel density estimation (KDE), and local convex hull (LoCoH). | A home range is the area in which an animal lives and moves on a periodic basis. There are various ways of calculating the home range. To build into the application different methods of deriving home range such as minimum convex polygon (MCP), kernel density estimation (KDE), and local convex hull (LoCoH). | ||
− | |||
− | |||
− | |||
− |
Latest revision as of 00:11, 14 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
The visualization that we have created contains 3 different tabs. They have been split into overview, individual view and group view.
Overview
The visualization animates the flight migration of a group of birds across the months for the periods of 2015 - 2017.
Each dot represents the location of the bird on a particular day and each coloured line of dots represents the flight migration path of each bird.
Individual Movement
The individual movement tab contains 4 sub-tabs
i) Map
ii) Absolute direction
iii) Relative direction
iv) Ground speed
i) The map sub tab has the following features:
• Year selection – By clicking on the radio button, the user can select from the period 2015 – 2017.
• Bird selection – By choosing from the drop-down list available, the user can select the bird that he wishes to study.
• Month range – The slider here allows one to select from the months of Jan – Dec.
• On/off highlight – Click on the radio button to reveal the highlighted points.
• Month range highlight – Slider allows one to select the months that they want to highlight, which will appear as a red line.
• On/off popup – Click on the radio button to display pop-up of bird name and date.
• Select a type – 4 visualization choices are available line, polygon, point and cluster.
Line and point – The places that the bird were in can be seen either as a blue line/ blue point.
Polygon – shows the home range of the birds.
Cluster – shows the number of days the birds spend in that area.
• Graph – The graph is linked to the year and bird selected. A horizontal line parallel to the x-axis indicates that the bird is stationary at a location during that period.
ii) The absolute direction sub tab has the following features:
• Year selection – By clicking on the radio button, the user can select from the period 2015 – 2017.
• Bird selection – By ticking on the checkbox, the user can select the bird he is interested in.
• From the absolute angles, we can tell the cardinal direction which the bird travels in.
• The direction bearing ranges from 0 to 360 degrees.
• 0,90,180 and 270 indicates that the bird is travelling north, east, west and south respectively.
• The denser the area of the triangle, the move frequent the bird travelled in that direction.
iii) The relative direction sub tab has the following features:
• Year selection – By clicking on the radio button, the user can select from the period 2015 – 2017.
• Bird selection – By ticking on the checkbox, the user can select the bird he is interested in.
• From the relative angles, we can tell the direction which the bird turns.
• The direction bearing ranges from 0 to 180/-180 degrees.
• 0,90, -90 and 180/-180 indicates that the bird is travelling straight, left, right and backwards respectively.
• The denser the area of the triangle, the move frequent the bird travelled in that direction.
iv) The ground speed sub tab has the following features:
• Year selection – By clicking on the radio button, the user can select from the period 2015 – 2017.
• Bird selection – By ticking on the checkbox, the user can select the bird he is interested in.
• The scatter plot shows the ground speed over the months. Each point represents a day.
Group View
The functions of absolute/relative angles are the same as previously described above.
The group view tab contains 3 sub-tabs:
i) Absolute direction
ii) Relative direction
iii) Ground speed
i) and ii) The absolute/relative direction design are the same as previously described in section 5.2. The only difference being that the drop-down list has only 2 options (age/sex).
iii) The ground speed sub tab has the following features:
• Measure selection – Select from the drop-down list either age or sex.
• The box plot displayed allows one to make comparison between the ground speed of different characteristics of the birds.
DEMONSTRATION
The purpose of this section is to demonstrate the main aspects of our application using some use cases.
Overview
For the period of 2015 – 2017, the migratory flight path of the group of birds can be seen.
For a period of 1 year, it can be seen that the flight paths of this group of birds are similar in nature, travelling along the coastal states between North America and South America.
Individual Movement
Map
We selected the bird “Staddler”. The blue line/blue dots indicate the Staddler’s travel period from Jan 17 to Dec 17. The red line indicate that it was in South America from Jan 17 – Mar 17.
Staddler was at the above locations on these dates.
Staddler spent the most amount of time in North America, a total of 155 days on the upper right coast. Clicking on the 155 days, allows one to zoom in to arrive at the diagram below.
It has spent 113 days in the area of the polygon. This is the Seabrook Salt Mash, which is likely to be its home range. To revert to the previous diagram, click on the “Home” button located below the “-“ sign.
The red polygon represents the activity range in a day. With an intense patch of red, it has spent the longest time in the Seabrook Salt Mash area.
Selecting the bird “Flow”, we realized its behavior differs from that of the other birds
- No migration for the period of 2015. The other birds had migration for 2015 – 2017.
- For 2016 and 2017, it only migrated to Cuba. The other birds all migrated to South America.
This could be because it was born in May 2014 and was still a juvenile different from the other 4 birds which were adults.
Absolute Direction
It mainly flew in the south-east direction.
Relative Direction
By relative direction, it turned backwards to move in the opposite direction most frequently.
Ground Speed
Comparing the ground speeds, Flow had less activity compared to Nick. Nick had the highest ground speed in its migratory months Mar-Apr and Sep-Oct
Group View
From the box plot, we can see that the median speed of adult (1.66) is higher than juveniles (1.47).
From the box plot, we can see that the median speed of male (1.42) is higher than female (0.7).
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.
FUTURE WORK
Our current work only looks at the Osprey population in North and South America. Using the application, the study could be extended to Osprey found in other regions of the world. In addition, the application could also be used to study the flight migration of other bird types.
Environmental data such as weather (e.g. wind speed and temperature), sea currents, daylight and night should be incorporated into the study, to better understand how the environmental conditions affects their migration.
To incorporate stopover sites in the application. Stopover sites are where birds pause during their migratory flights. These serve as areas for the birds to rest and forage. Birds often use the same stopover sites each year, knowing where their stopover sites are will allow us to better protect their habitats. Algorithmic calculations could be used to derive stopover sites.
A home range is the area in which an animal lives and moves on a periodic basis. There are various ways of calculating the home range. To build into the application different methods of deriving home range such as minimum convex polygon (MCP), kernel density estimation (KDE), and local convex hull (LoCoH).