Forecast Population

Chemba Ranganathan

November 2, 2016

Synopsis

Application Startup and Usage

When the application is loaded it has 3 panels

Once the application loads, please do the following

Output panel displays the plot and forecast data for the chosen country.

Forecast Overall Population :

selectedCountryCode <- 840
selectedForecastYears <- 2020
dataAvailableYears <- 2015

totalPopulationForselectedCountry <-
    totalPopulationEstimate[totalPopulationEstimate$CountryCode == selectedCountryCode, ]

years <-as.numeric(colnames(totalPopulationForselectedCountry[, 5:70]))

predictionYears <- seq(dataAvailableYears + 1,selectedForecastYears ,1)

## Since we are selecting only one row transpose the data set to do predictions

totalPopnTransposeData <-data.frame(t(totalPopulationForselectedCountry[, 5:70]))
totalPopnTransposeData <- cbind(totalPopnTransposeData, years)

## forecast using this data
forecastTotalPopnData <-forecast(auto.arima(totalPopnTransposeData[, 1]),
                                h = selectedForecastYears - dataAvailableYears,
                                level = c(80, 95))
##    Point Forecast    Lo 80    Hi 80    Lo 95    Hi 95
## 67       324138.6 324096.0 324181.1 324073.5 324203.7
## 68       326546.6 326349.5 326743.7 326245.2 326848.0
## 69       328993.3 328450.4 329536.3 328163.0 329823.7
## 70       331459.9 330319.8 332600.0 329716.2 333203.5
## 71       333931.3 331910.8 335951.7 330841.2 337021.3

Plot for selected country