Open arunge opened 2 months ago
@isomemo I have a question regarding the logic that should be used to define the vector field.
In the example from the link there is data that contains speed components in each direction:
library(gcookbook) # For the isabel data set
isabel
#> x y z vx vy vz t
#> 1 -83.00000 41.70000 0.035 NA NA NA NA
#> 2 -83.00000 41.55571 0.035 NA NA NA NA
#> 3 -83.00000 41.41142 0.035 NA NA NA NA
#> 156248 -62.12625 24.09679 18.035 -11.39709 -5.315139 0.009657148 -66.99567
#> 156249 -62.12625 23.95251 18.035 -11.37965 -5.275015 0.040921956 -67.00032
#> 156250 -62.12625 23.80822 18.035 -12.16637 -5.435891 0.030216325 -66.98057
#> speed
#> 1 NA
#> 2 NA
#> 3 NA
#> ...<156,244 more rows>...
#> 156248 12.57555
#> 156249 12.54281
#> 156250 13.32552
The function geom_segment
requires values for xend
and yend
:
islice <- filter(isabel, z == min(z))
ggplot(islice, aes(x = x, y = y)) +
geom_segment(aes(xend = x + vx/50, yend = y + vy/50),
size = 0.25) # Make the line segments 0.25 mm thick
latitude, longitude, estimates
.+
,
latitude, longitude, estimateAfterApplyingOperation
What values should be used for xend
and yend
here if we want to apply geom_segment
? We can also discuss this in our next meeting.
@arunge we should discuss to better understand the problem!
@isomemo As discussed, you want to check if there is a different package that already contains the calculation to determine the length of the arrows (they should describe e.g. spread over time). So we will return to this issue later.