Introduction

In this page, I provide the support information of previous article for estimating the number of possible girl friends in London.

In advance, please check the porpose of analysis, background story and data source below.

https://mrunadon.github.io/DrakeEquation/

If you have a question, send me a direct message via twitter(@MrUnadon) or email(whitesnow[at]gmail.com).

Author Information

Libraries

library(tidyverse)
library(rstan)
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())
library(shinystan)
library(ggmcmc)
library(bayesplot)
library(formattable)
library(DT)

Data

Population Data(UK): Available from below

https://en.actualitix.com/country/gbr/united-kingdom-population-by-country.php

# You can also get the csv data from my github(original source)
dat <- read.csv('https://raw.githubusercontent.com/MrUnadon/mrunadon.github.io/master/images/UKpopulation.csv', fileEncoding = "utf-8", header = F)

# for tidy data
tidydat <- dat %>%
  tidyr::separate(col = V1, into=c("year","Population")) %>%
  dplyr::mutate(t = c(1:length(year))) %>%
  dplyr::mutate_if(is.character, as.numeric)

# HTML table
  #formattable::formattable(tidydat)
DT::datatable(tidydat)

Data Visualization

ggplot2::ggplot(data = tidydat,
                mapping = aes(x = year, y = Population)) +
  geom_point(colour = "darkgreen") +
  geom_line(colour = "darkgreen", alpha = 0.5) +
  labs(title = "UK Population 1960-2014")