Jump to content
Ornithology Exchange



I am currently using FLightR to analyze some geolocator data, and am trying to visualize the error around the migration route that is estimated by the package. I am attempting to plot the mean latitude and longitude from the results with both the 1st and 3rd quartiles and the 95% confidence interval (CI). Essentially, I am trying to merge the figures produced by the map.FLightR.ggmap() function and the plot_lon_lat() function.

I have tried plotting the migration route with error bars, as well as plotting the quartiles and confidence intervals as lines in ggplot2. Unfortunately I have found the error bars to be very messy, making it difficult to discern where the mean coordinates are and where the quartiles and CI differ. Additionally, the plotting of the quartiles and CI values as lines is a confusing representation of the uncertainty in the location estimates as they often cross the mean coordinates when the bird switches direction.

To attempt to create a range around the migration route that shows the error I also ran an if else function that switched the upper and lower latitude ranges when the bird changes direction to keep the CI or quartile line from crossing the route. Unfortunately, this solution seemed a bit too sensitive and caused more jogs in the upper and lower CI and quantiles than I started with! 

Would anyone have any recommendations on how to plot the 1st and 3rd quartiles and upper and lower confidence intervals on a migration route? 

Any recommendations would be appreciated! 

Thank you, 

Share this post

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  Hi Amelie,

Yeah, this is not an easy one and not a FLightR related question - uncertainties in space and time a hard to plot together. You may want to look at the animation. I could provide some code for it.

I could try programming something if there will be a good idea on what to do.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now