Description Usage Arguments Details Value Examples
The function generates a figure often used by Dagens Næringsliv (DN), a Norwegian newspaper specializing in business news, to present data on RevPAR and changes in RevPAR for diferent regions/cities.
1 2 | ggnewsPlot(df, outputReady = FALSE, customFont = FALSE,
header = c("City", "RevPAR", "Change from same period last year"))
|
df |
input data.frame containg place, revpar and change in decimals. |
outputReady |
Logical. If TRUE, uses device size and is better suited for ouputs. Default is FALSE - fixed aspect ration. |
customFont |
Logical. If TRUE, use the font family Montserrat (if available). Default is 'sans' |
header |
Vector. Set header above columns. Takes a vector of length 3 with strings. |
This function is early development. Expect revisions.
ggplot object
1 2 3 4 5 | exampleFrame <- data.frame(Sted = c("Tromsø", "Stanvager", "Bodø", "Trondheim", "Bergen", "Lillehammer", "Gardermoen", "Haugesund", "Kristiansund", "Oslo", "Kristiansand"),
RevPAR = c(925, 432, 605, 526, 391, 463, 601, 367, 370, 613, 335),
Endring = c(0.153, 0.137, 0.036, 0.014, 0.008, -0.005, -0.029, -0.054, -0.074, -0.082, -0.179))
ggnewsPlot(exampleFrame)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.