rustfare: toolbox for R language for open welfare data from Russian Federation

Markus Kainu
July 9, 2013

rustfare-package

  • The rustfare package pools together tools for searching, extracting, and formatting welfare data on Russian Federation from different data providers.
  • The rustfare functions are named according to data provider or the data set.
  • Currently there is data available from: Rosstat Regional Statistics, OECD, Quality of Governance -institute and World Bank

Installation

library(devtools)
install_github(repo = "rustfare", username = "muuankarski")
library(rustfare)

Data sources included

Rosstat Regional Statistics

Function IndicatorRosstat() returns a dataset with available indicators and metadata in Russian and English

library(rustfare)
ind <- IndicatorRosstat()

To dowload the data you may use GetRosstat()-function that requires two arguments,

  1. indicator (from the listing above),
  2. level (federal/federal_district/region)
library(rustfare)
dat <- GetRosstat("infant_mortality_rate",
                   "federal_district")

Rosstat Regional Statistics

library(rustfare) # load rustfare for obtaining the data
library(ggplot2) # load ggplot2 for plotting
dat <- GetRosstat("infant_mortality_rate",
                   "federal_district")
ggplot(dat, aes(x=year,y=value,color=region_en)) +
  geom_point() + 
  geom_line() +
  geom_text(data = subset(dat, year == 2010), 
            aes(x=year,y=value,
                color=region_en,label=region_en),
            size=3, hjust=1) +
  theme(legend.position="none")

Rosstat Regional Statistics

Infant mortality rates at federal district level

Quality of Governance Institute

The QoG Institute was founded in 2004 by Professor Bo Rothstein and Professor Sören Holmberg. It is an independent research institute within the Department of Political Science at the University of Gothenburg. We conduct and promote research on the causes, consequences and nature of Good Governance and the Quality of Government (QoG) - that is, trustworthy, reliable, impartial, uncorrupted and competent government institutions.

The main objective of our research is to address the theoretical and empirical problem of how political institutions of high quality can be created and maintained. A second objective is to study the effects of Quality of Government on a number of policy areas, such as health, the environment, social policy, and poverty. We approach these problems from a variety of different theoretical and methodological angles.

Quality of Governance Institute

library(rustfare)
dat <- GetQog(country = c("Russia","China"), # country,countries
              indicator=c("undp_hdi","fh_polity2")) # indicator(s)
library(ggplot2)
ggplot(dat, aes(x=year,y=value,color=cname)) + 
  geom_point() + geom_line() +
  geom_text(data = subset(dat, year == 2003), 
            aes(x=year,y=value,color=cname,label=cname)) +
  facet_wrap(~indicator, scales="free") +
  theme(legend.position="none")

Quality of Governance Institute

plot of chunk qog2

Plotting regional data on map with projection using ggplot2

There is a RosstatMapPlot-function in rustfare that takes measure, year and level as arguments.

Infant mortality rate at regional level

library(rustfare)
RosstatMapPlot("infant_mortality_rate",2010,"region")

plot of chunk rosstatmap1

Average pension size at federal district level

library(rustfare)
RosstatMapPlot("average_size_of_pensions",2010,"federal_district")

plot of chunk rosstatmap2