lingtypology icon indicating copy to clipboard operation
lingtypology copied to clipboard

WCS New

Open kirillkoncha opened this issue 4 years ago • 1 comments

kirillkoncha avatar Dec 07 '21 06:12 kirillkoncha

I think there is a problem with hex codes

library(lingtypology)
df <- wcs.feature("WCS")

library(tidyverse)
df %>% 
  mutate(letters = str_extract(grid_coordinates, "\\w"),
         digits = str_extract(grid_coordinates, "\\d{1,2}")) %>% 
  mutate(digits = as.double(digits),
         letters = factor(letters, levels = rev(LETTERS[1:10]))) %>% 
  distinct(digits, letters, hex_code) %>% 
  filter(hex_code != "") %>% 
  View()
  arrange(digits, letters) %>% 
  ggplot(aes(digits, letters, fill = hex_code))+
  geom_tile(color = "black", show.legend = FALSE)

image

agricolamz avatar Mar 18 '22 06:03 agricolamz