Closed quqixun closed 4 months ago
I found the same issue. I've tried to have a look at the process and I found out that at line 82 of gt_load_png_as_traffic_raster.R the procedure creates a list of colours found in the image. a new column is added at the list named "hex_noff" which is filled with hex colours whith an exeption: white loose two F (#FFFF instead of #FFFFFF). Line 82 adds this column ("hex_noff") replacing "FF" with "". I haven't got a solution, I hope that this analysis may help finding one :)
I found the same issue. I've tried to have a look at the process and I found out that at line 82 of gt_load_png_as_traffic_raster.R the procedure creates a list of colours found in the image. a new column is added at the list named "hex_noff" which is filled with hex colours whith an exeption: white loose two F (#FFFF instead of #FFFFFF). Line 82 adds this column ("hex_noff") replacing "FF" with "". I haven't got a solution, I hope that this analysis may help finding one :)
Thanks for pointing this out. I forked the repo and modified code to save html and png to custom location instead of tempdir. It is not a solution, but data can be preserved before finding one.
I've modified the procedure: I've deleted the modification of the hex colour (keeping all F for white) and everything seesms to work now :)
I've modified the procedure: I've deleted the modification of the hex colour (keeping all F for white) and everything seesms to work now :)
It's a good idea. I modified gt_load_png_as_traffic_raster.R to keep all F for white as you suggested:
## Color Values
color_df <- rimg[] %>%
unique() %>%
as.data.frame() %>%
dplyr::rename(hex = ".") %>%
dplyr::mutate(hex_noff = str_replace_all(.data$hex, "FF$", "FF"))
Then it works. Thanks a lot.
Rencently, I got these errors:
How to fix it? Thanks.