This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' --- | |
#' title: Different legend styles for centered ternary color scales | |
#' author: Jonas Schöley, Ilya Kashnitsky | |
#' output: | |
#' pdf_document | |
#' --- | |
#+echo=FALSE | |
knitr::opts_chunk$set(warning=FALSE, message=FALSE, | |
fig.width = 15, fig.height = 15) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BUBBLE-GRID-MAPS | |
# Jonas Schöley (cc-by) | |
library(eurostat) # eurostat data | |
library(tidyverse) # tidy data transformation | |
library(lubridate) # date and time support | |
library(sf) # simple features GIS | |
# download eurostat data of population counts by NUTS-3 region | |
euro_pop <- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Comparing bubble-grid with choropleth map | |
# Jonas Schöley | |
# Init -------------------------------------------------------------------- | |
library(eurostat) # eurostat data | |
library(rnaturalearth) # worldwide map data | |
library(tidyverse) # tidy data transformation | |
library(lubridate) # date and time support | |
library(sf) # simple features GIS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disaggregation of 2D histogram of Poisson-counts with irregular bins | |
# based upon the penalized composite link mixed model | |
# | |
# Jonas Schöley, based on code from | |
# Deirdre I.R. Douma: The Penalized Composite Link Mixed Model. | |
# see further references in code | |
# Given is a matrix of observed counts over 2 dimensions (here | |
# year and age, i.e. a so-called Lexis surface). | |
# Each entry in the matrix corresponds to a rectangular region on the |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
region_iso sex age ex_diff_mean_2020 ex_diff_mean_2021 ex_diff_q0.025_2020 ex_diff_q0.025_2021 ex_diff_q0.975_2020 ex_diff_q0.975_2021 bbi_q0.5_2020 bbi_q0.5_2021 bbi_q0.025_2020 bbi_q0.025_2021 bbi_q0.975_2020 bbi_q0.975_2021 region_position region_code_iso3166_2_alpha3 region_code_iso3166_1 region_code_iso3166_1_alpha3 region_code_stmf calendar_stmf region_code_hmd region_code_wpp region_code_coverage region_name region_name_short region_level country_name hemisphere continent year death_total_nweeksmiss as_of e0avgdiff1619_q0.5 e0avgdiff1619_q0.025 e0avgdiff1619_q0.975 | |
AT T 0 -0.75726295307785 0.109872939746115 -0.867486087753811 -0.00873775031377946 -0.640273398677998 0.228466890627553 -4.19661664163826 0.14435079615867 -11.6911032794272 -0.0129431229215541 -2.74793040709203 0.287786153797217 14 AUT AT AUT AUT iso_week_date AUT 40 Austria Austria AUT 0 Austria n Europe 2021 0 52 0.169764067500815 0.141474494918143 0.204577126571475 | |
BE T 0 -1.18765648644931 1.13996997057471 -1.29402467005087 1.034239584327 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ASFR Solver | |
# Given target fertility parameters determine suitable ASFRs | |
# | |
# Jonas Schöley <[email protected]> | |
# | |
# This script determines a set of age specific fertility rates under | |
# the following constraints: | |
# a) a total fertility rate | |
# b) a mean age at first birth | |
# c) a set of proportional deviations from initial (reference) rates |