Skip to content

Commit ac5cd00

Browse files
committed
Add renv and fix DOI badge
1 parent e5574fe commit ac5cd00

14 files changed

+9037
-13
lines changed

.Rprofile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source("renv/activate.R")

.vscode/ltex.dictionary.en-US.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
DATASUS
2+
Gini
3+
csv
4+
rds
5+
osfr
6+
IBGE
7+
tidyverse
8+
rOpenSci
9+
Çetinkaya-Runde
10+
Grolemund
11+
Tidyverse
12+
https
13+
eval
14+
brandr
15+
dplyr
16+
orbis
17+
plotr
18+
readr
19+
tidyr
20+
dir
21+
delim
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
11
DASH_RULE
2+
EN_QUOTES
3+
SENTENCE_WHITESPACE
4+
EN_QUOTES
5+
SUPPORT
6+
POLICY
7+
AVAILABLE
8+
PASSIVE_VOICE
9+
LEGEND
10+
DESIGN
11+
LIBRARY
12+
WORD_CONTAINS_UNDERSCORE
13+
ARROWS
14+
MORFOLOGIK_RULE_EN_US
15+
COMMA_PARENTHESIS_WHITESPACE
16+
UPPERCASE_SENTENCE_START
17+
WHITESPACE_RULE
18+
UNLIKELY_OPENING_PUNCTUATION
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{"rule":"UPPERCASE_SENTENCE_START","sentence":"^\\Qsource(here::here(\"R\", \"_setup.\\E$"}
2+
{"rule":"MORFOLOGIK_RULE_EN_US","sentence":"^\\QThe data used in this report were sourced from the [DATASUS](https://datasus.saude.gov.br/) platform, which provides data on the [Gini Index](https://en.wikipedia.org/wiki/Gini_coefficient) of per capita household income by Brazilian municipality for the years 1991, 2000, and 2010 [@datasusa].\\E$"}
3+
{"rule":"THREE_NN","sentence":"^\\QThe data munging followed the data science workflow outlined by @wickham2023e, as illustrated in [@fig-wickham-at-al-2024-figure-1].\\E$"}
4+
{"rule":"MORFOLOGIK_RULE_EN_US","sentence":"^\\QAll processes were made using the [Quarto](https://quarto.org/) publishing system [@allaire], the [R programming language](https://www.r-project.org/) [@rcoreteama] and several R packages.\\E$"}
5+
{"rule":"POSSESSIVE_APOSTROPHE","sentence":"^\\QThe [tidyverse](https://www.tidyverse.org/) and [rOpenSci](https://ropensci.org/) peer-reviewed package ecosystem and other R packages adherents of the tidy tools manifesto [@wickham2023c] were prioritized.\\E$"}
6+
{"rule":"THREE_NN","sentence":"^\\QData science workflow created by Wickham, Çetinkaya-Runde, and Grolemund.\\E$"}
7+
{"rule":"ARROWS","sentence":"^\\Qfile <- here::here(\"data\", paste0(\"raw.csv\"))\\E$"}
8+
{"rule":"ELLIPSIS","sentence":"^\\Qdata <-\n data |>\n dplyr::mutate(\n dplyr::across(\n .cols = dplyr::starts_with(\"x\"),\n .fns = ~ dplyr::case_when(\n .x == \"...\"\\E$"}
9+
{"rule":"LC_AFTER_PERIOD","sentence":"^\\Q)\n ),\n dplyr::across(\n .cols = dplyr::starts_with(\"x\"),\n .fns = as.numeric\n )\n ) |>\n tidyr::pivot_longer(\n cols = starts_with(\"x\"),\n names_to = \"year\",\n values_to = \"gini_index\"\n ) |>\n dplyr::mutate(\n year =\n year |>\n stringr::str_remove(\"x\") |>\n as.integer(),\n municipality_code =\n municipality |>\n stringr::str_extract(\"\\\\d*\") |>\n as.integer(),\n municipality =\n municipality |>\n stringr::str_remove(\"\\\\d*\") |>\n stringr::str_trim()\n ) |>\n dplyr::relocate(\n year,\n municipality_code,\n .before = municipality\n )\n```\\E$"}
10+
{"rule":"UPPERCASE_SENTENCE_START","sentence":"^\\Qdatasus-gini-index\\E$"}

.vscode/settings.json

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,48 @@
1818
"titleBar.inactiveBackground": "#00690999",
1919
"titleBar.inactiveForeground": "#e7e7e799"
2020
},
21-
"peacock.color": "#006909"
21+
"peacock.color": "#006909",
22+
"cSpell.words": [
23+
"allaire",
24+
"brandr",
25+
"Carvalho",
26+
"Çetinkaya",
27+
"Científico",
28+
"cnpq",
29+
"Conselho",
30+
"danielvartan",
31+
"DATASUS",
32+
"datasusa",
33+
"Desenvolvimento",
34+
"dplyr",
35+
"geobr",
36+
"getenv",
37+
"ggplot",
38+
"Gini",
39+
"Grolemund",
40+
"httr",
41+
"IBGE",
42+
"IPEA",
43+
"langid",
44+
"lightbox",
45+
"Nacional",
46+
"orbis",
47+
"osfr",
48+
"plotr",
49+
"rcoreteama",
50+
"readr",
51+
"rstats",
52+
"Runde",
53+
"stringr",
54+
"sustentarea",
55+
"syndemic",
56+
"techreport",
57+
"Tecnológico",
58+
"tidyr",
59+
"tidyverse",
60+
"Vartanian",
61+
"vdcfs",
62+
"wickham",
63+
"xlim"
64+
]
2265
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ A BibTeX entry for LaTeX users is
5454

5555
[![License: CC0-1.0](https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg)](http://creativecommons.org/publicdomain/zero/1.0/)
5656

57-
The content is licensed under [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/), placing these materials in the public domain. You may freely copy, modify, distribute, and use this work, even for commercial purposes, without permission or attribution.
57+
This content is licensed under [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/), placing these materials in the public domain. You may freely copy, modify, distribute, and use this work, even for commercial purposes, without permission or attribution.
5858

5959
## Acknowledgments
6060

docs/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ <h1 class="title"></h1>
216216

217217

218218

219-
</header><!-- badges: start --><p><a href="https://www.repostatus.org/#inactive"><img src="https://img.shields.io/badge/Repo%20Status-Inactive-A6A82D.svg" class="img-fluid" alt="Project Status: Inactive – The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows."></a> <a href="https://doi.org/10.17605/OSF.IO/UCMS6"><img src="https://img.shields.io/badge/OSF-10.17605/OSF.IO/UCMS6-1284C5.svg" class="img-fluid" alt="OSF DOI"></a> <a href="http://creativecommons.org/publicdomain/zero/1.0/"><img src="https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg" class="img-fluid" alt="License: CC0-1.0"></a> <!-- badges: end --></p>
219+
</header><!-- badges: start --><p><a href="https://www.repostatus.org/#inactive"><img src="https://img.shields.io/badge/Repo%20Status-Inactive-A6A82D.svg" class="img-fluid" alt="Project Status: Inactive – The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows."></a> <a href="https://doi.org/10.17605/OSF.IO/WHJ92"><img src="https://img.shields.io/badge/OSF-10.17605/OSF.IO/WHJ92-1284C5.svg" class="img-fluid" alt="OSF DOI"></a> <a href="http://creativecommons.org/publicdomain/zero/1.0/"><img src="https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg" class="img-fluid" alt="License: CC0-1.0"></a> <!-- badges: end --></p>
220220
<section id="overview" class="level2"><h2 class="anchored" data-anchor-id="overview">Overview</h2>
221221
<p>This report provides a reproducible pipeline for processing <a href="https://datasus.saude.gov.br/">DATASUS</a> data on the <a href="https://en.wikipedia.org/wiki/Gini_coefficient">Gini Index</a> of per capita household income by Brazilian municipality for the years 1991, 2000, and 2010. The main goal is to provide a transparent and reliable workflow for processing these data, supporting research and informed public policy decisions.</p>
222222
</section><section id="data-availability" class="level2"><h2 class="anchored" data-anchor-id="data-availability">Data Availability</h2>
@@ -241,7 +241,7 @@ <h1 class="title"></h1>
241241
</section><section id="code-style" class="level3"><h3 class="anchored" data-anchor-id="code-style">Code Style</h3>
242242
<p>The Tidyverse <a href="https://style.tidyverse.org/">code style guide</a> and <a href="https://design.tidyverse.org/">design principles</a> were followed to ensure consistency and enhance readability.</p>
243243
</section><section id="reproducibility" class="level3"><h3 class="anchored" data-anchor-id="reproducibility">Reproducibility</h3>
244-
<p>The pipeline is fully reproducible and can be run again at any time. See the <a href="hhttps://github.com/danielvartan/datasus-gini-index/blob/main/README.md">README</a> file in the code repository to learn how to run them.</p>
244+
<p>The pipeline is fully reproducible and can be run again at any time. See the <a href="https://github.com/danielvartan/datasus-gini-index/blob/main/README.md">README</a> file in the code repository to learn how to run them.</p>
245245
</section></section><section id="setting-the-environment" class="level2"><h2 class="anchored" data-anchor-id="setting-the-environment">Setting the Environment</h2>
246246
<div class="cell">
247247
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://danielvartan.github.io/brandr/">brandr</a></span><span class="op">)</span></span>
@@ -354,7 +354,7 @@ <h1 class="title"></h1>
354354
<span> <span class="va">municipality</span> <span class="op">|&gt;</span></span>
355355
<span> <span class="fu">stringr</span><span class="fu">::</span><span class="fu"><a href="https://stringr.tidyverse.org/reference/str_remove.html">str_remove</a></span><span class="op">(</span><span class="st">"\\d*"</span><span class="op">)</span> <span class="op">|&gt;</span></span>
356356
<span> <span class="fu">stringr</span><span class="fu">::</span><span class="fu"><a href="https://stringr.tidyverse.org/reference/str_trim.html">str_trim</a></span><span class="op">(</span><span class="op">)</span></span>
357-
<span> <span class="op">)</span><span class="op">|&gt;</span></span>
357+
<span> <span class="op">)</span> <span class="op">|&gt;</span></span>
358358
<span> <span class="fu">dplyr</span><span class="fu">::</span><span class="fu"><a href="https://dplyr.tidyverse.org/reference/relocate.html">relocate</a></span><span class="op">(</span></span>
359359
<span> <span class="va">year</span>,</span>
360360
<span> <span class="va">municipality_code</span>,</span>
@@ -625,7 +625,7 @@ <h1 class="title"></h1>
625625
<div style="text-align: left;">
626626
<p><a href="http://creativecommons.org/publicdomain/zero/1.0/"><img src="https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg" class="img-fluid"></a></p>
627627
</div>
628-
<p>The content is licensed under <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0 Universal</a>, placing these materials in the public domain. You may freely copy, modify, distribute, and use this work, even for commercial purposes, without permission or attribution.</p>
628+
<p>This content is licensed under <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0 Universal</a>, placing these materials in the public domain. You may freely copy, modify, distribute, and use this work, even for commercial purposes, without permission or attribution.</p>
629629
</section><section id="references" class="level2 unnumbered"><h2 class="unnumbered anchored" data-anchor-id="references">References</h2>
630630
<div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0" data-line-spacing="2" role="list">
631631
<div id="ref-allaire" class="csl-entry" role="listitem">

docs/search.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"href": "index.html#tidying-the-data",
5454
"title": "",
5555
"section": "Tidying the Data",
56-
"text": "Tidying the Data\n\ndata &lt;-\n data |&gt;\n dplyr::mutate(\n dplyr::across(\n .cols = dplyr::starts_with(\"x\"),\n .fns = ~ dplyr::case_when(\n .x == \"...\" ~ NA,\n TRUE ~ .x |&gt; stringr::str_replace_all(\",\", \".\")\n )\n ),\n dplyr::across(\n .cols = dplyr::starts_with(\"x\"),\n .fns = as.numeric\n )\n ) |&gt;\n tidyr::pivot_longer(\n cols = starts_with(\"x\"),\n names_to = \"year\",\n values_to = \"gini_index\"\n ) |&gt;\n dplyr::mutate(\n year =\n year |&gt;\n stringr::str_remove(\"x\") |&gt;\n as.integer(),\n municipality_code =\n municipality |&gt;\n stringr::str_extract(\"\\\\d*\") |&gt;\n as.integer(),\n municipality =\n municipality |&gt;\n stringr::str_remove(\"\\\\d*\") |&gt;\n stringr::str_trim()\n )|&gt;\n dplyr::relocate(\n year,\n municipality_code,\n .before = municipality\n )\n\n\ndata |&gt; dplyr::glimpse()\n#&gt; Rows: 16,695\n#&gt; Columns: 4\n#&gt; $ year &lt;int&gt; 1991, 2000, 2010, 1991, 2000, 2010, 1991, 2000, 2…\n#&gt; $ municipality_code &lt;int&gt; 110001, 110001, 110001, 110037, 110037, 110037, 1…\n#&gt; $ municipality &lt;chr&gt; \"Alta Floresta D'Oeste\", \"Alta Floresta D'Oeste\",…\n#&gt; $ gini_index &lt;dbl&gt; 0.5983, 0.5868, 0.5893, NA, 0.5080, 0.5491, NA, 0…"
56+
"text": "Tidying the Data\n\ndata &lt;-\n data |&gt;\n dplyr::mutate(\n dplyr::across(\n .cols = dplyr::starts_with(\"x\"),\n .fns = ~ dplyr::case_when(\n .x == \"...\" ~ NA,\n TRUE ~ .x |&gt; stringr::str_replace_all(\",\", \".\")\n )\n ),\n dplyr::across(\n .cols = dplyr::starts_with(\"x\"),\n .fns = as.numeric\n )\n ) |&gt;\n tidyr::pivot_longer(\n cols = starts_with(\"x\"),\n names_to = \"year\",\n values_to = \"gini_index\"\n ) |&gt;\n dplyr::mutate(\n year =\n year |&gt;\n stringr::str_remove(\"x\") |&gt;\n as.integer(),\n municipality_code =\n municipality |&gt;\n stringr::str_extract(\"\\\\d*\") |&gt;\n as.integer(),\n municipality =\n municipality |&gt;\n stringr::str_remove(\"\\\\d*\") |&gt;\n stringr::str_trim()\n ) |&gt;\n dplyr::relocate(\n year,\n municipality_code,\n .before = municipality\n )\n\n\ndata |&gt; dplyr::glimpse()\n#&gt; Rows: 16,695\n#&gt; Columns: 4\n#&gt; $ year &lt;int&gt; 1991, 2000, 2010, 1991, 2000, 2010, 1991, 2000, 2…\n#&gt; $ municipality_code &lt;int&gt; 110001, 110001, 110001, 110037, 110037, 110037, 1…\n#&gt; $ municipality &lt;chr&gt; \"Alta Floresta D'Oeste\", \"Alta Floresta D'Oeste\",…\n#&gt; $ gini_index &lt;dbl&gt; 0.5983, 0.5868, 0.5893, NA, 0.5080, 0.5491, NA, 0…"
5757
},
5858
{
5959
"objectID": "index.html#adding-state-and-region-data",
@@ -116,7 +116,7 @@
116116
"href": "index.html#license",
117117
"title": "",
118118
"section": "License",
119-
"text": "License\n\n\n\nThe content is licensed under CC0 1.0 Universal, placing these materials in the public domain. You may freely copy, modify, distribute, and use this work, even for commercial purposes, without permission or attribution."
119+
"text": "License\n\n\n\nThis content is licensed under CC0 1.0 Universal, placing these materials in the public domain. You may freely copy, modify, distribute, and use this work, even for commercial purposes, without permission or attribution."
120120
},
121121
{
122122
"objectID": "index.html#references",

docs/sitemap.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>https://sustentarea.github.io/datasus-gini-index/index.html</loc>
5-
<lastmod>2025-05-04T08:58:17.337Z</lastmod>
5+
<lastmod>2025-05-04T20:42:52.840Z</lastmod>
66
</url>
77
</urlset>

index.qmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ source(here::here("R", "_setup.R"))
88
<!-- badges: start -->
99
[![Project Status: Inactive – The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows.](https://img.shields.io/badge/Repo%20Status-Inactive-A6A82D.svg)](https://www.repostatus.org/#inactive)
1010
[![OSF
11-
DOI](https://img.shields.io/badge/OSF-10.17605/OSF.IO/UCMS6-1284C5.svg)](https://doi.org/10.17605/OSF.IO/UCMS6)
11+
DOI](https://img.shields.io/badge/OSF-10.17605/OSF.IO/WHJ92-1284C5.svg)](https://doi.org/10.17605/OSF.IO/WHJ92)
1212
[![License: CC0-1.0](https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg)](http://creativecommons.org/publicdomain/zero/1.0/)
1313
<!-- badges: end -->
1414

@@ -50,7 +50,7 @@ The Tidyverse [code style guide](https://style.tidyverse.org/) and [design princ
5050

5151
### Reproducibility
5252

53-
The pipeline is fully reproducible and can be run again at any time. See the [README](hhttps://github.com/danielvartan/datasus-gini-index/blob/main/README.md) file in the code repository to learn how to run them.
53+
The pipeline is fully reproducible and can be run again at any time. See the [README](https://github.com/danielvartan/datasus-gini-index/blob/main/README.md) file in the code repository to learn how to run them.
5454

5555
## Setting the Environment
5656

@@ -186,7 +186,7 @@ data <-
186186
municipality |>
187187
stringr::str_remove("\\d*") |>
188188
stringr::str_trim()
189-
)|>
189+
) |>
190190
dplyr::relocate(
191191
year,
192192
municipality_code,
@@ -483,7 +483,7 @@ A BibTeX entry for LaTeX users is
483483
[![](https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg)](http://creativecommons.org/publicdomain/zero/1.0/)
484484
:::
485485

486-
The content is licensed under [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/), placing these materials in the public domain. You may freely copy, modify, distribute, and use this work, even for commercial purposes, without permission or attribution.
486+
This content is licensed under [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/), placing these materials in the public domain. You may freely copy, modify, distribute, and use this work, even for commercial purposes, without permission or attribution.
487487

488488
## References {.unnumbered}
489489

0 commit comments

Comments
 (0)