knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

API

This package extracts data from the API of https://www.apixu.com. When using this package one can either create an account and request a personal key, or use the default key provided. With a shiny application the extracted data is then presented to the user in an interactive way, in which the user can specify the city of interest and number of days to be forecasted.

The package

This R package consits of three R scripts: (1) get_data.R, which extracts the data from the apixu and stores it as a data.frame, (2) ui.R, which specifies the user interface of the shiny app, (3) server.R, which computes output values and connects to the server.

Data

The package includes one function called get_data(city, days) which returns a list with information about the specified location, current weather and the number of days to be forecasted as specified in the function. An example of the output of this function is shown below for the city Bangalore in India.

Example

library(rLab5)
get_data("Bangalore", 1)
## Shiny App
library(rLab5)
shiny::runGitHub(repo = "anubhav-dikshit/rLab5", subdir = "inst/examples")


anubhav-dikshit/rLab5 documentation built on May 14, 2019, 7:17 p.m.