Different output from someone else

Hello all!

The short version of this story is basically I do the same code someone else had, but I get a fundamental difference in my output image.

In this link here, the user at the end plots out the paths of bike rides, and you can see all the blue arrows on the map (scroll towards the last fifth or so of the webpage).

However, when I do it, I just get the map image but no arrows. I am however, using R 4.2.2 desktop, so not R Studio. And for my CRAN, I picked the cloud. Would that be the reason quite possibly I am not getting the right output?

If you feel this is not enough and knowing more about what I did may be of value, then I literally use the same code as in the link except I change the variable names to the ones I use for the dataframe:

coordinates_table <- all_tripdata_clean %>% 
filter(start_lng != end_lng & start_lat != end_lat) %>%
group_by(start_lng, start_lat, end_lng, end_lat, member_casual, rideable_type) %>%
summarise(total = n(),.groups="drop") %>%
filter(total > 250)

#Then we create two sub tables for each user type
casual <- coordinates_table %>% filter(member_casual == "casual")
member <- coordinates_table %>% filter(member_casual == "member")

#Lets store bounding box coordinates for ggmap:
chi_bb <- c(
  left = -87.700424,
  bottom = 41.790769,
  right = -87.554855,
  top = 41.990119

#Here we store the stamen map of Chicago
chicago_stamen <- get_stamenmap(
  bbox = chi_bb,
  zoom = 12,
  maptype = "toner"

ggmap(chicago_stamen,darken = c(0.8, "white")) +
    geom_curve(member, mapping = aes(x = start_lng, y = start_lat, xend = end_lng, yend = end_lat, alpha= total, color=rideable_type), size = 0.5, curvature = .2,arrow = arrow(length=unit(0.2,"cm"), ends="first", type = "closed")) +  
    coord_cartesian() +
    labs(title = "Most popular routes by annual members",x=NULL,y=NULL, caption = "Data by Motivate International Inc") +

Thanks as always fam! This community is going to get me through my first R Data Analysis.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.