---
title: "R Notebook"
output: html_notebook
---

```{r}
library(jsonlite)
library(tidyverse)
```

```{r}
jsonlite::fromJSON("survey.json") %>% write_csv("color-survey.csv")
```


```{r, fig.height=4, fig.width=2}
jsonlite::fromJSON("survey.json") %>%
  mutate(id = row_number()) %>% 
  pivot_longer(blue:black, names_to="color", values_to="sentiment") %>%
  ggplot(aes(x=sentiment, y=color, fill=color)) +
  geom_tile() +
  scale_fill_identity() +
  coord_flip()
```





```{r}
library(colorspace)
```

```{r}
swatchplot(c("#f5f5f5","#EE744B","#9F1401"))
```



```{r}
swatchplot(c("#f5f5f5","#878FD3","#07489C"))
```

```{r}
colors <- c(
  "#67090C","#861E19","#A23429","#BC4D3B","#D36751","#E68469","#F5A285","#FEC2A4"
)
specplot(colors)
```
















