Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in plot_net_addresses: migrate to sf from ggplot #91

Closed
embruna opened this issue Jul 23, 2024 · 2 comments · Fixed by #100
Closed

in plot_net_addresses: migrate to sf from ggplot #91

embruna opened this issue Jul 23, 2024 · 2 comments · Fixed by #100

Comments

@embruna
Copy link
Collaborator

embruna commented Jul 23, 2024

in plot_net_addresses
fortify()` was deprecated in ggplot2 3.4.4.
Please migrate to sf.

├─ggplot2::fortify(world_map)
└─ggplot2:::fortify.SpatialPolygonsDataFrame(world_map)

@embruna
Copy link
Collaborator Author

embruna commented Jul 23, 2024

  test_sf2 <- test_sf %>% 
   select(LON,LAT,id, ADMIN) %>% 
   rename(long=LON,
            lat=LAT,
            order=id,
            id=ADMIN) %>% 
     mutate(group=paste(id,".1",sep="")) %>% 
     ungroup() %>% 
     select(-geometry) %>% 
     as_tibble()
   str(test_sf2)
   head(test_sf2)
   head(world_map.points)

suggested alterantives to fortify are sf and broom

@embruna
Copy link
Collaborator Author

embruna commented Aug 14, 2024

This response to my SE questions explains how to do this without requiringsf as a dependency

@embruna embruna linked a pull request Aug 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant