knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(jsonlite) library(shiny) library(lab5group8)
This package is an excercise in building a package, working with web-API's, and creating an app using Shiny. Specifically, this package contains two functions population.R and app.R.
You can create an object of the class population with the following command:
popul <- population$new()
It has two methods:
popul$municipalities()
returns a list of all municipalities in the dataset.
popul$population_data("Stockholm")
returns a dataframe with the year and the population size in that year for a specified municipality. In this case Stockholm.
You can run the shiny app by running this command:
runGitHub("Jorisvdoorn/lab5group8", "<your github username>", subdir = "R/")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.