6/10/2019

R Markdown Presentation & Plotly

Create a web page presentation using R Markdown that features a plot created with Plotly. Host your webpage on either GitHub Pages, RPubs, or NeoCities. Your webpage must contain the date that you created the document, and it must contain a plot created with Plotly. We would love to see you show off your creativity!

Review criteria

The rubric contains the following two questions:

  1. Does the web page feature a date and is this date less than two months before the date that you’re grading this assignment?

  2. Is the web page a presentation and does it feature an interactive plot that appears to have been created with Plotly?

Some informations about countries

Countries distinguish between metropolitan (homeland) and independent and semi-independent portions of sovereign states.

Each country is coded with a world region that roughly follows the United Nations setup.

Countries are coded with standard ISO and FIPS codes.

Data extract by Natual Earth

Including Plots

The code

library("tidyverse")
library("plotly")
library("oidnChaRts")

data_stacked_bar_chart %>%
  plot_ly(x = ~count,
          y = ~occupation,
          color = ~country_group) %>%
  add_bars() %>%
  layout(barmode = "stack", barnorm = "normal",
         margin = list(l = 240),
         yaxis = list(title = list(text = "")))

thanks <3