... Troubles with the pitch part of the assignment
Hello,
i 've troubles:
1 my slides do overlap so one slide is printed over one other
2 unless the code of my app is inserted in the index.Rmd it does not work in my html5 presentation after slidify.
My code of index.Rmd
---
title : "Assignment: Course Project: Shiny Application and Reproducible Pitch"
subtitle : "Air Pollution Index (API) for major city in Malaysia"
author : Rob Sleurs
job :
framework : html5slides # {io2012, html5slides, shower, dzslides, ...}
highlighter : highlight.js # {highlight.js, prettify, highlight}
hitheme : tomorrow #
widgets : [mathjax, quiz, bootstrap] # {mathjax, quiz, bootstrap}
mode : selfcontained # {standalone, draft}
---
Air Pollution Index (API) for major city in Malaysia
========================================================
author: Rob Sleurs
date: 19/3/2020
---
Introduction
========================================================
---
R code for the Shiny app
========================================================
```{r}
library(shiny)
library(lubridate)
library(ggplot2)
Combined<-read.csv("AirploMalasya.csv")
ui<-fluidPage(
headerPanel("Major cities Air Pollutant Index 2013-2015"),
sidebarPanel(
selectInput("city",label="Select City", selected="Ipoh",
choices=list("Ipoh","Penang","Petaling Jaya")),
selectInput("year",label="Select Year", selected=2013, choices=c(2013,
2014,2015)),
selectInput("month",label="Select Month", selected=8,
choices=c(1,2,3,4,5,6,7,8,9,10,11,12))),
mainPanel(plotOutput("plot1")))
server<-function(input, output){
output$plot1<-renderPlot({
#Show city = selected city, month = selected month, year = selected year
selecteddata <- Combined[Combined$City==input$city & month(Combined$Date)==input$month & year(Combined$Date)==input$year,]
ggplot(data=selecteddata,aes(x=selecteddata$Hour, y=selecteddata$API))+geom_smooth(color="red")+labs(x="Hour", y="API Reading")+theme(axis.title= element_text(size=18), axis.text = element_text(size = 14))+
ggtitle(paste("Air Pollutant Index for", input$city))+theme(plot.title = element_text(vjust = 0.2, hjust = 0.5, size = 24, color = "Blue", face="bold"))
})}
```
---
Conclusion and links to the assignment
========================================================
---
Source-code
========================================================
thx for helping,kind regards,
Rob