Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
danielvartan committed Aug 8, 2024
0 parents commit a842355
Show file tree
Hide file tree
Showing 52 changed files with 10,586 additions and 0 deletions.
1 change: 1 addition & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source("renv/activate.R")
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# See <https://git-scm.com/docs/gitignore>.

_freeze/
.quarto/
.Rapp.history
.RData
.Renviron
.Rhistory
.Rproj.user
.Ruserdata
.secrets
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2024 Daniel Vartanian

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
37 changes: 37 additions & 0 deletions R/_dev.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# # For development use only (comment the code after use (Ctrl + Shift + C)).
#
# .rs.restartR()
# .libPaths()
# cffr::cff_validate()
# knitr::clean_cache()
# lintr::use_lintr()
# lintr::lint_dir("R")
# normalizePath(readClipboard(), "/", mustWork = FALSE)
# renv::init()
# renv::equip()
# renv::activate()
# renv::deactivate()
# renv::status()
# renv::dependencies("R/quarto-setup.R")
# renv::install()
# renv::update()
# renv::restore()
# renv::snapshot()
# renv::clean(actions = "unsed.packages")
# rutils:::bbt_scan_citation_keys()
# rutils:::bbt_write_quarto_bib()
# rutils:::set_quarto_speel_check()
# rutils:::gather_words_from_spell_check(pattern = "\\.qmd$|\\.Rmd$")
# rutils:::spell_check_quarto(dir = "", pattern = "\\.qmd$|\\.Rmd$")
# rutils:::update_quarto_wordlist(dir = "", pattern = "\\.qmd$|\\.Rmd$")
# rutils:::clean_quarto_mess()
# rutils:::quarto_status("drafting")
# spelling::spell_check_files("index.qmd")
# urlchecker::url_check()
# urlchecker::url_update()

# googlesheets4::gs4_auth(cache = ".secrets", email = "[email protected]")

# # Quarto (see <https://quarto.org/docs/projects/quarto-projects.html>)
#
# quarto render
62 changes: 62 additions & 0 deletions R/quarto-setup.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
## Based on <https://github.com/hadley/r4ds/blob/main/_common.R>.

# Load libraries

# library(here, quietly = FALSE, verbose = FALSE)
# library(knitr, quietly = FALSE, verbose = FALSE)
# library(rutils, quietly = FALSE, verbose = FALSE)

library(downlit, quietly = FALSE, verbose = FALSE)
library(httpuv, quietly = FALSE, verbose = FALSE)
library(magrittr, quietly = FALSE, verbose = FALSE)
library(ggplot2, quietly = FALSE, verbose = FALSE)
library(xml2, quietly = FALSE, verbose = FALSE)

# Set variables -----

set.seed(2024)

# Set knitr -----

knitr::clean_cache()

knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
root.dir = here::here()
)

# Set general options -----

options(
dplyr.print_min = 6,
dplyr.print_max = 6,
pillar.max_footer_lines = 2,
pillar.min_chars = 15,
stringr.view_n = 6,
pillar.bold = TRUE,
width = 77 # 80 - 3 for #> comment
)

# Set `ggplot2` -----

ggplot2::theme_set(
ggplot2::theme_gray()
)

# Set `googlesheets4` -----

googlesheets4::gs4_auth(cache = ".secrets", email = "[email protected]")

# Run `rbbt` -----

# (2024-06-05)
# This function only works with BetterBibTeX (BBT) for Zotero version v6.7.140
# or lower.

rutils:::bbt_write_quarto_bib(
bib_file = here::here("references.bib"),
dir = "",
pattern = "\\.qmd$",
wd = here::here()
)
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# estela

<!-- badges: start -->
[![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://www.repostatus.org/badges/latest/inactive.svg)](https://www.repostatus.org/#inactive)
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://choosealicense.com/licenses/mit/)
<!-- badges: end -->

This repository contains an analysis focused on plotting data related to the food consumption of Brazilian children aged 2 to 4 years, as monitored by Brazil's Food and Nutrition Surveillance System ([SISVAN](https://sisaps.saude.gov.br/sisvan/)) in 2019. The report is available [here](https://danielvartan.github.io/estela/).
3 changes: 3 additions & 0 deletions WORDLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SISVAN
ultraprocessed
UPF
56 changes: 56 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
editor: source

execute:
cache: false
freeze: false

project:
type: website
output-dir: docs
render: [index.qmd]

title: "SISVAN 2019"
author: "Daniel Vartanian"
# name: "Daniel Vartanian"
# orcid: 0000-0001-7782-759X
# url: https://linktr.ee/danielvartan
# email: [email protected]
# corresponding: true
# affiliation:
# - name: University of São Paulo
# - Country: Brazil
# - url: https://www.usp.br
keyword: >
data science. data visualization. child health. child-nutrition. malnutrition.
nutritional-epidemiology. global-syndemic. unified-health-system. brazil.
date: today
date-format: "YYYY-MM-DD"

website:
repo-url: https://github.com/danielvartan/estela/
site-url: https://danielvartan.github.io/estela/
issue-url: https://github.com/danielvartan/estela/issues/
repo-branch: main
repo-actions: [edit, issue]
search: false
navbar:
title: false
background: dark
left:
- icon: github
href: https://github.com/danielvartan/estela
aria-label: GitHub

format:
html:
locale: en
language: en-us
code-fold: show
code-link: true
tbl-cap-location: top
callout-appearance: simple
csl: csl/english-apa-author-date.csl
theme: [cosmo, scss/web.scss]

google-scholar: false
bibliography: references.bib
Loading

0 comments on commit a842355

Please sign in to comment.