echo
is a command that outputs the strings it is being passed as arguments
echo 'Hello World'
Hello World
`%>%` <- magrittr::`%>%` | |
dates_seq <- seq.Date(from = as.Date("2018-11-24"), to = as.Date("2018-11-30"), by = "day") | |
df <- lapply(dates_seq, function(i){ | |
cmd <- paste("curl -X GET https://api.carbonintensity.org.uk/intensity/", i, | |
"T00:00Z/", i, | |
"T23:30Z | jq --raw-output '.data[] | [.from, .intensity.actual] | @tsv'", | |
sep = "") |
province_vec <- coronavirus %>% | |
dplyr::filter(type == "confirmed", Country.Region == "Mainland China") %>% | |
dplyr::group_by(Province.State) %>% | |
dplyr::summarise(total = sum(cases, na.rm = TRUE)) %>% | |
dplyr::arrange(-total) %>% | |
dplyr::select(province = Province.State) | |
coronavirus %>% | |
dplyr::filter(type == "confirmed", Country.Region == "Mainland China") %>% |
# Creating a tree-map plot for the total covid19 confirmed cases in Italy | |
#------------------------------------------------------------------------ | |
# Required packages | |
library(covid19italy) | |
library(dplyr) | |
library(plotly) | |
# Check for updates | |
update_data() |
library(plotly) | |
data(mtcars) | |
plot_ly(data = mtcars, x = ~ hp, y = ~ mpg) | |
plot_ly(x = ~ mtcars[,"hp"], y = mtcars[, "mpg"]) | |
var1 <- "hp" | |
var2 <- "mpg" |
#--------------------------------------------------------- | |
# Creating a trajectory plot for covid19 confirmed cases | |
# Required packages - dplyr, tidyr, and plotly packages | |
# Data - coronavirus package | |
#--------------------------------------------------------- | |
# To get the most update data use the Github version | |
#devtools::install_github("RamiKrispin/coronavirus") | |
library(coronavirus) | |
`%>%` <- magrittr::`%>%` |