Skip to content

Commit b0a673b

Browse files
final commit
1 parent d9a11ab commit b0a673b

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Data.R

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

22
# BEFORE RUN THE APP, READ PLEASE:
3-
# This file download the dataset from the world bank database by means of the API
3+
# This file download the dataset from the world bank database by means of the API
44

5+
library(WDI) # World Bank's API
56

67
rm(list=ls())
78

@@ -70,7 +71,7 @@ indicators_name <- c("GDP per capita (current US$)",
7071
#Creating the list with the variables of the dataset.
7172

7273
list <- list()
73-
pb <- progress_bar$new(format = "Connecting to the World Bank database [:bar] :percent", total = 30)
74+
pb <- progress_bar$new(format = "Downloading the World Bank database [:bar] :percent", total = 30)
7475

7576
for(i in 1:length(indicators_code)){
7677
pb$tick()

app.R

+6-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ library(markdown)
2121
library(plotly)
2222
library(shiny)
2323
library(tidyverse)
24-
library(WDI)
24+
library(WDI) # World Bank's API
2525
library(wbstats)
2626
library(progress)
2727
library(Hmisc)
@@ -39,10 +39,12 @@ library(htmltools)
3939

4040
#BEFORE RUN THE APP, READ PLEASE:
4141

42-
# The script "Data.R" downloads the world bank dataset. However it takes too much time to connect to the database ,this is
43-
# because of the data structure. So the "env.Rdata" file is prepared to set the dataset into the environment instantly.
42+
# The script "Data.R" downloads the world bank dataset by means of the world bank API. However it takes too much time to download the database,
43+
# this is because of the data structure. So the "env.Rdata" file is prepared to set the dataset into the environment instantly.
44+
# In case of testing the download of the dataset, remove the comment from the following line:
4445

4546
# source("Data.R")
47+
4648
load("env.Rdata")
4749

4850
#-------------
@@ -52,6 +54,7 @@ t <- tags$a(href= "https://data.worldbank.org" , tags$img(src="bwlogo.png"
5254
tgit <- tags$a("GitHub",href="https://github.com/manugaco/Data_Tidying", tags$img(src="github.png",height=20,width=20))
5355
uni <- tags$a(href= "https://www.uc3m.es/Inicio" , tags$img(src="uc3m.png", heigth = 25, width = 25))
5456

57+
5558
# Define UI for application
5659
ui <- fluidPage(
5760
theme = shinytheme("superhero"),

env.Rdata

-1.77 KB
Binary file not shown.

0 commit comments

Comments
 (0)