jimjam-slam / ggflags

A flag geom for ggplot2. Tweaks the original by using round flags (great for plotting as points).
91 stars 14 forks source link

WIP proposed use of {rsvg} (continued) #31

Open jimjam-slam opened 9 months ago

jimjam-slam commented 9 months ago

Looks like the two branches are the same apart from store_flags.r and lflags.rda, so I'm not sure why one works and one doesn't =_=

jimjam-slam commented 8 months ago

It seems like the .rda file being produced with the new store_flags.R code on feature-newflags is not loading back in properly—it doesn't produce an error, but no objects populate the environment.

new_env <- new.env(parent = emptyenv())
load("lflags.rda", envir = new_env)
ls(new_env)
# character(0)
jimjam-slam commented 8 months ago

Got a trip from runapp colleagues: the store_flags script needs to store an object named lflags into lflags.rda, not .flaglist (as the rest of the package now refers to ggflags::lflags, not .flaglist. So I'll update it and see how we go!

jimjam-slam commented 8 months ago

I haven't included the new flag rda file yet, but commit 0832c6d fixes the store_flag script and the package DESCRIPTION to make the new flags load properly.

I had to add compression, as librsvg currently replaces the vector mask with a base64-encoded one that is huge. Not sure how to get around that other than manually patching the vector mask back in.

Also, the masks still aren't rendering, giving us square flags 🙁

jimjam-slam commented 1 month ago

I won't close this yet, but consider #36 the active PR for now.