-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
87 lines (64 loc) · 1.79 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# anfavea
<!-- [![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental) -->
Dados da [ANFAVEA](http://www.anfavea.com.br/) no `R`.
## Installation
``` r
devtools::install_github("tomasbarcellos/anfavea")
```
## Example
### Emprego
```{r tidyvese, include=FALSE}
library(tidyverse)
```
```{r example}
library(anfavea)
library(tidyverse)
theme_set(
theme_classic() +
theme(legend.position = "bottom")
)
empregos %>%
filter(valor > 0) %>%
ggplot(aes(mes, valor, col = tipo)) +
geom_line(size = 1) +
ggtitle("Empregos na producao automotiva desde 1985")
```
### Exportacoes
```{r}
exportacoes %>%
filter(mes >= as.Date("2000-01-01"), tipo != "total") %>%
ggplot(aes(mes, valor, fill = tipo)) +
geom_area(size = 1, stat = "identity", position = "fill") +
ggtitle("Evolucao da participacao das exportacoes desde 2000")
```
### Licenciamento e producao
```{r}
veiculos %>%
filter(valor > 0, mes >= as.Date("2000-01-01"),
variavel == "Licenciamento Importados") %>%
ggplot(aes(mes, valor, col = veiculo)) +
geom_line(size = 1) +
ggtitle("Evolucao do licenciamento de veiculos importados desde 2000")
```
### Maquinas
```{r}
maquinas %>%
filter(valor > 0, mes >= as.Date("2000-01-01"),
variavel == "Produção", maquina != "TRATORES DE RODAS") %>%
ggplot(aes(mes, valor, col = maquina)) +
geom_line(size = 1) +
ggtitle("Evolucao da producao de maquinas desde 2000") +
guides(col = guide_legend(nrow = 2, byrow = TRUE))
```