Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4ffee3f
Showing
13 changed files
with
435 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Package: ameco | ||
Title: European Commission Annual Macro-Economic (AMECO) Database | ||
Version: 0.1 | ||
Date: 2015-10-23 | ||
Authors@R: person("Eric", "Persson", email = "expersso5@gmail.com", | ||
role = c("aut", "cre")) | ||
Description: Annual macro-economic database provided by the European Commission. | ||
License: CC0 | ||
LazyData: TRUE | ||
URL: http://github.com/expersso/ameco | ||
BugReports: http://github.com/expersso/ameco/issues | ||
Depends: R(>= 2.10.0) | ||
Suggests: knitr, rmarkdown, dplyr, ggplot2 | ||
VignetteBuilder: knitr | ||
NeedsCompilation: no | ||
Packaged: 2015-10-23 15:18:40 UTC; persson | ||
Author: Eric Persson [aut, cre] | ||
Maintainer: Eric Persson <expersso5@gmail.com> | ||
Repository: CRAN | ||
Date/Publication: 2015-10-23 18:14:18 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
36f5172410b2580a8c3a5ad587a25bb9 *DESCRIPTION | ||
df390c53434517b304ac5db487184641 *NAMESPACE | ||
415983584e7e17c892a4d837d9dd604b *R/data.R | ||
955bf4e7de42ace576ef642aaa8a8b43 *README.md | ||
590ef71e2d3cd632a89f2490a99ce3a3 *build/vignette.rds | ||
d7bd21bbe6e1bfabae68d846563aae3c *data/ameco.RData | ||
198a15036d6008e3a45de43d5012c45c *data/datalist | ||
20dd06ead0cd6dd9a61dbfe36834aa86 *inst/doc/ameco_dataset.R | ||
3c2cf3637d30ce469d3a3e97f25320d5 *inst/doc/ameco_dataset.Rmd | ||
e0456dd7101fc43eb4be4b90ab0675a9 *inst/doc/ameco_dataset.html | ||
8af17ac007b1bda190e55373f65d35d1 *man/ameco.Rd | ||
3c2cf3637d30ce469d3a3e97f25320d5 *vignettes/ameco_dataset.Rmd |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
exportPattern("^[[:alpha:]]+") |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#' European Commission Annual macro-economic database (AMECO) | ||
#' | ||
#' The dataset contains the tntire annual macrro-economic database provided by | ||
#' the European Commission. Last update: 5 May 2015. | ||
#' | ||
#' @format A data frame with eight variables: | ||
#' \describe{ | ||
#' \item{\code{code}}{Code that uniquely identifies a series.} | ||
#' \item{\code{country}}{Country.} | ||
#' \item{\code{sub.chapter}}{Groups series into larger categories to facilitate | ||
#' finding a series of interest.} | ||
#' \item{\code{title}}{Human-readable title of a series.} | ||
#' \item{\code{unit}}{Unit of observation.} | ||
#' \item{\code{cntry}}{Country ISO code.} | ||
#' \item{\code{year}}{Observation year.} | ||
#' \item{\code{value}}{Value of the given series.} | ||
#' } | ||
#' | ||
#' For further details, see | ||
#' \url{http://ec.europa.eu/economy_finance/db_indicators/ameco/index_en.htm} | ||
#' | ||
"ameco" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
AMECO Dataset | ||
------------- | ||
|
||
This package contains the entire [European Commission Annual macro-economic (AMECO) database](http://ec.europa.eu/economy_finance/db_indicators/ameco/index_en.htm) in a format amenable to analysis in R. | ||
|
||
The AMECO database was last updated: 5 May 2015. | ||
|
||
Simple example | ||
-------------- | ||
|
||
The dataset is in a clean, long format: | ||
|
||
``` r | ||
library(dplyr) | ||
library(ameco) | ||
head(ameco) | ||
``` | ||
|
||
## Source: local data frame [6 x 8] | ||
## | ||
## code country sub.chapter | ||
## (chr) (chr) (chr) | ||
## 1 EU28.1.0.0.0.NPTD European Union 01 Population | ||
## 2 EU15.1.0.0.0.NPTD European Union (15 countries) 01 Population | ||
## 3 EA19.1.0.0.0.NPTD Euro area 01 Population | ||
## 4 EA12.1.0.0.0.NPTD Euro area (12 countries) 01 Population | ||
## 5 DU15.1.0.0.0.NPTD EU15 (including D_W West-Germany) 01 Population | ||
## 6 DA12.1.0.0.0.NPTD EA12 (including D_W West-Germany) 01 Population | ||
## Variables not shown: title (chr), unit (chr), cntry (chr), year (dbl), | ||
## value (dbl) | ||
|
||
Filtering with the `sub.chapter` variable allows you to easily find the variable of interest: | ||
|
||
``` r | ||
ameco %>% | ||
dplyr::filter(sub.chapter == "01 Population") %>% | ||
.$title %>% | ||
unique() | ||
``` | ||
|
||
## [1] "Total population (National accounts)" | ||
## [2] "Total population" | ||
## [3] "Population: 0 to 14 years" | ||
## [4] "Population: 15 to 64 years" | ||
## [5] "Population: 65 years and over" | ||
|
||
Being interested in the total population of a few countries, we can easily subset the data and plot the results: | ||
|
||
``` r | ||
library(ggplot2) | ||
|
||
ameco %>% | ||
dplyr::filter(title == "Total population", | ||
year == 2015, | ||
cntry %in% c("USA", "JPN", "DEU", "FRA", "ESP", "ITA")) %>% | ||
ggplot(aes(x = reorder(country, -value), y = value / 1000)) + | ||
geom_bar(stat = "identity") + | ||
theme_bw() + | ||
labs(x = NULL, y = "Population (millions)", title = "Total population") | ||
``` | ||
|
||
![](README_files/figure-markdown_github/example-1.png) | ||
|
||
Disclaimer | ||
---------- | ||
|
||
This package is not affiliated with, nor endorsed by, the European Commission. I aim to update it whenever the AMECO database is updated. If you ever see that it is out-of-date, don't hesitate to send a pull request and/or remind me to update it. |
Binary file not shown.
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ameco |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## ----head---------------------------------------------------------------- | ||
library(dplyr) | ||
library(ameco) | ||
head(ameco) | ||
|
||
## ----find_var------------------------------------------------------------ | ||
ameco %>% | ||
dplyr::filter(sub.chapter == "01 Population") %>% | ||
.$title %>% | ||
unique() | ||
|
||
## ----example, fig.width = 7, fig.height = 4------------------------------ | ||
library(ggplot2) | ||
|
||
ameco %>% | ||
dplyr::filter(title == "Total population", | ||
year == 2015, | ||
cntry %in% c("USA", "JPN", "DEU", "FRA", "ESP", "ITA")) %>% | ||
ggplot(aes(x = reorder(country, -value), y = value / 1000)) + | ||
geom_bar(stat = "identity") + | ||
theme_bw() + | ||
labs(x = NULL, y = "Population (millions)", title = "Total population") | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
title: "AMECO Dataset" | ||
author: "Eric Persson" | ||
date: "`r Sys.Date()`" | ||
output: rmarkdown::html_vignette | ||
vignette: > | ||
%\VignetteIndexEntry{AMECO Dataset} | ||
%\VignetteEngine{knitr::rmarkdown} | ||
%\VignetteEncoding{UTF-8} | ||
--- | ||
|
||
## Introduction | ||
|
||
This package contains the entire [European Commission Annual macro-economic | ||
(AMECO) | ||
database](http://ec.europa.eu/economy_finance/db_indicators/ameco/index_en.htm) | ||
in a format amenable to analysis in R. | ||
|
||
The AMECO database was last updated: 5 May 2015. | ||
|
||
## Simple example | ||
|
||
The dataset is in a clean, long format: | ||
|
||
```{r head} | ||
library(dplyr) | ||
library(ameco) | ||
head(ameco) | ||
``` | ||
|
||
Filtering with the `sub.chapter` variable allows you to easily find the variable | ||
of interest: | ||
|
||
```{r find_var} | ||
ameco %>% | ||
dplyr::filter(sub.chapter == "01 Population") %>% | ||
.$title %>% | ||
unique() | ||
``` | ||
|
||
Being interested in the total population of a few countries, we can easily | ||
subset the data and plot the results: | ||
|
||
```{r example, fig.width = 7, fig.height = 4} | ||
library(ggplot2) | ||
ameco %>% | ||
dplyr::filter(title == "Total population", | ||
year == 2015, | ||
cntry %in% c("USA", "JPN", "DEU", "FRA", "ESP", "ITA")) %>% | ||
ggplot(aes(x = reorder(country, -value), y = value / 1000)) + | ||
geom_bar(stat = "identity") + | ||
theme_bw() + | ||
labs(x = NULL, y = "Population (millions)", title = "Total population") | ||
``` | ||
|
||
## Disclaimer | ||
|
||
This package is not affiliated with, nor endorsed by, the European Commission. I | ||
aim to update it whenever the AMECO database is updated. If you ever see that it | ||
is out-of-date, don't hesitate to send a pull request and/or remind me to update | ||
it. |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
% Generated by roxygen2 (4.1.1): do not edit by hand | ||
% Please edit documentation in R/data.R | ||
\docType{data} | ||
\name{ameco} | ||
\alias{ameco} | ||
\title{European Commission Annual macro-economic database (AMECO)} | ||
\format{A data frame with eight variables: | ||
\describe{ | ||
\item{\code{code}}{Code that uniquely identifies a series.} | ||
\item{\code{country}}{Country.} | ||
\item{\code{sub.chapter}}{Groups series into larger categories to facilitate | ||
finding a series of interest.} | ||
\item{\code{title}}{Human-readable title of a series.} | ||
\item{\code{unit}}{Unit of observation.} | ||
\item{\code{cntry}}{Country ISO code.} | ||
\item{\code{year}}{Observation year.} | ||
\item{\code{value}}{Value of the given series.} | ||
} | ||
|
||
For further details, see | ||
\url{http://ec.europa.eu/economy_finance/db_indicators/ameco/index_en.htm}} | ||
\usage{ | ||
ameco | ||
} | ||
\description{ | ||
The dataset contains the tntire annual macrro-economic database provided by | ||
the European Commission. Last update: 5 May 2015. | ||
} | ||
\keyword{datasets} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
title: "AMECO Dataset" | ||
author: "Eric Persson" | ||
date: "`r Sys.Date()`" | ||
output: rmarkdown::html_vignette | ||
vignette: > | ||
%\VignetteIndexEntry{AMECO Dataset} | ||
%\VignetteEngine{knitr::rmarkdown} | ||
%\VignetteEncoding{UTF-8} | ||
--- | ||
|
||
## Introduction | ||
|
||
This package contains the entire [European Commission Annual macro-economic | ||
(AMECO) | ||
database](http://ec.europa.eu/economy_finance/db_indicators/ameco/index_en.htm) | ||
in a format amenable to analysis in R. | ||
|
||
The AMECO database was last updated: 5 May 2015. | ||
|
||
## Simple example | ||
|
||
The dataset is in a clean, long format: | ||
|
||
```{r head} | ||
library(dplyr) | ||
library(ameco) | ||
head(ameco) | ||
``` | ||
|
||
Filtering with the `sub.chapter` variable allows you to easily find the variable | ||
of interest: | ||
|
||
```{r find_var} | ||
ameco %>% | ||
dplyr::filter(sub.chapter == "01 Population") %>% | ||
.$title %>% | ||
unique() | ||
``` | ||
|
||
Being interested in the total population of a few countries, we can easily | ||
subset the data and plot the results: | ||
|
||
```{r example, fig.width = 7, fig.height = 4} | ||
library(ggplot2) | ||
ameco %>% | ||
dplyr::filter(title == "Total population", | ||
year == 2015, | ||
cntry %in% c("USA", "JPN", "DEU", "FRA", "ESP", "ITA")) %>% | ||
ggplot(aes(x = reorder(country, -value), y = value / 1000)) + | ||
geom_bar(stat = "identity") + | ||
theme_bw() + | ||
labs(x = NULL, y = "Population (millions)", title = "Total population") | ||
``` | ||
|
||
## Disclaimer | ||
|
||
This package is not affiliated with, nor endorsed by, the European Commission. I | ||
aim to update it whenever the AMECO database is updated. If you ever see that it | ||
is out-of-date, don't hesitate to send a pull request and/or remind me to update | ||
it. |