kaitlyngaynor / gorongosa-shiny

Code for Gorongosa Camera Trap Shiny App
https://kaitlyngaynor.shinyapps.io/gorongosa-shiny/
Apache License 2.0
2 stars 0 forks source link

Polygons are 'tearing' with certain data subsets #13

Closed kaitlyngaynor closed 4 years ago

kaitlyngaynor commented 4 years ago

https://github.com/kaitlyngaynor/gorongosa-camera-traps/blob/351e770ef5b3a38b32ecc6568d51c9fd046b1050/shiny-rai/server.R#L58

Makes for accidentally beautiful polygons but they are not retaining their hex shape. See here: https://gis.stackexchange.com/questions/37204/what-is-the-cause-of-tearing-of-polygons-artifacts-using-r-ggplot-and-geom?lq=1

kaitlyngaynor commented 4 years ago

Fixed issue by using "left_join" instead of "merge" when combining hex dataframe and reactive RAI dataframe. hexes.df.rai <- reactive({left_join(hexes.df, rai_species(), by = c("id" = "Camera"))})