Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
Natanaelsl committed May 10, 2024
1 parent 196de7e commit cb27db3
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 44 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
^docs$
^pkgdown$
^\.github$
^doc$
^Meta$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
.quarto
docs
inst/doc
/doc/
/Meta/
88 changes: 44 additions & 44 deletions vignettes/RGF.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Para começar, carregaremos alguns pacotes necessários. Como estou dentro do pa


```{r setup, message = FALSE, warning=FALSE}
# library(RREORGFdataR)
# library(dplyr)
# library(ggplot2)
library(RREORGFdataR)
library(dplyr)
library(ggplot2)
```

## Exemplo
Expand All @@ -43,45 +43,45 @@ Dessa forma, podemos extrair do Anexo 1 (3º quadrimestre) de 2017 a 2023 os val
Verifique o exemplo [aqui](https://natanaelsl.com.br/project/rreorgf_pkg/).

```{r, message=FALSE, fig.align='center', out.width="\\linewidth", fig.width=7, fig.height=3}
# RREORGFdataR::RGFdata(cod.ibge = 1,
# ano = c(2017:2023),
# poder = 'E',
# periodo = 3,
# anexo = 1
# )
#
# `RGF-Anexo_01` %>%
# filter(rotulo == "União",
# cod_conta == "DespesaComPessoalTotal",
# coluna == "VALOR") %>%
# ggplot2::ggplot(aes(x = exercicio)) +
# ggplot2::geom_col(aes(y = valor), fill = "#004c4c") +
# ggplot2::geom_text(
# aes(y = valor, label = round(valor/1000000000, 0)),
# fontface = "bold",
# vjust = 1.4,
# size = 5,
# colour = "white"
# ) +
# ggplot2::labs(
# x = "Exercício", y = "",
# title = 'Despesa com Pessoal Total - Executivo - União (Nominal, em Bilhões)',
# caption = "\nFonte: Elaborado com RREORGFdataR."
# ) +
# ggplot2::scale_x_continuous(n.breaks = 7) +
# ggplot2::theme_classic() +
# ggplot2::theme(
# legend.position = "none",
# text = element_text(size = 12),
# axis.line = element_blank(),
# legend.title = element_text(size = 14, face = "bold"),
# legend.text = element_text(size = 12),
# axis.text.y = element_blank(),
# axis.text.x = element_text(angle = 60, vjust = .95, hjust = 1, size = 10),
# axis.ticks.y = element_blank(),
# legend.background = element_blank(),
# axis.title.x = element_text(size = 12),
# axis.title.y = element_text(size = 12),
# plot.caption.position = "panel"
# )
RREORGFdataR::RGFdata(cod.ibge = 1,
ano = c(2017:2023),
poder = 'E',
periodo = 3,
anexo = 1
)
`RGF-Anexo_01` %>%
filter(rotulo == "União",
cod_conta == "DespesaComPessoalTotal",
coluna == "VALOR") %>%
ggplot2::ggplot(aes(x = exercicio)) +
ggplot2::geom_col(aes(y = valor), fill = "#004c4c") +
ggplot2::geom_text(
aes(y = valor, label = round(valor/1000000000, 0)),
fontface = "bold",
vjust = 1.4,
size = 5,
colour = "white"
) +
ggplot2::labs(
x = "Exercício", y = "",
title = 'Despesa com Pessoal Total - Executivo - União (Nominal, em Bilhões)',
caption = "\nFonte: Elaborado com RREORGFdataR."
) +
ggplot2::scale_x_continuous(n.breaks = 7) +
ggplot2::theme_classic() +
ggplot2::theme(
legend.position = "none",
text = element_text(size = 12),
axis.line = element_blank(),
legend.title = element_text(size = 14, face = "bold"),
legend.text = element_text(size = 12),
axis.text.y = element_blank(),
axis.text.x = element_text(angle = 60, vjust = .95, hjust = 1, size = 10),
axis.ticks.y = element_blank(),
legend.background = element_blank(),
axis.title.x = element_text(size = 12),
axis.title.y = element_text(size = 12),
plot.caption.position = "panel"
)
```

0 comments on commit cb27db3

Please sign in to comment.