Description Usage Arguments Value Examples
Use any dataframe to create your own owid style graphs. The function currently requires an internet connection to work. **Warning:** This function is in very early stages of development, may not be fully functional and may undergo major changes.
1 | owid_grapher(data, x, y, entity)
|
data |
The dataframe to be used in the graph |
x |
The column to be displayed on the x axis. Currently only a column of years is supported. |
y |
The column to be displayed on the y axis. |
entity |
The column containing the entities included in the dataset, e.g. the country column. |
If executed from within an R script then the graph will be displayed within the viewer. If executed from within an RMarkdown file the graph will be displayed within the output document (only if the output is an html document).
1 2 3 4 5 6 7 8 9 | library(dplyr)
## Not run:
owid_grapher(human_rights, x = year, y = score, entity = entity) %>%
grapher_line() %>%
grapher_map(palette = "RdYlGn") %>%
grapher_labels(title = "Human Rights Score")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.