Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propuesta de mejoras #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
^\.github$
^docs$
^_pkgdown\.yml$
^LICENSE\.md$
^documentation$
^funs$
^logo$
^pkgdown$
3 changes: 3 additions & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.html
R-version
depends.Rds
48 changes: 48 additions & 0 deletions .github/workflows/roscron-check-standard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
error-on: '"error"'
13 changes: 7 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ Package: enseResp
Type: Package
Title: Information on the Spanish Health Survey
Version: 0.1.0
Author: Edu Gonzalo Almorox
Maintainer: Edu Gonzalo Almorox <[email protected]>
Authors@R:
person("Edu", "Gonzalo Almorox", , "[email protected]", role = c("aut", "cre", "cph"))
Description: This package provides information in the Spanish Health Survey. It contains three
samples: adults, households and kids.
License: MIT License
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.1
URL: https://github.com/edugonzaloalmorox/enseResp
BugReports: https://github.com/edugonzaloalmorox/enseResp/issues
LazyDataCompression: xz
RoxygenNote: 7.2.3
URL: https://github.com/rOpenSpain/enseResp
BugReports: https://github.com/rOpenSpain/enseResp/issues
Depends:
R (>= 2.10)
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
YEAR: 2020
COPYRIGHT HOLDER: Edu Gonzalo Almorox
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) [2020] [Edu Gonzalo Almorox]
Copyright (c) 2020 Edu Gonzalo Almorox

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion R/adults_19.R
Original file line number Diff line number Diff line change
Expand Up @@ -459,5 +459,5 @@
#' \item{\code{CMD2}}{}
#' \item{\code{CMD3}}{}
#'}
#' @NA NULL
#' @details DETAILS
"adults_19"
10 changes: 6 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
dev = "ragg_png",
dpi = 300,
out.width = "100%"
)
```

# enseResp <img src='man/figures/logo.png' align="right" height="138.5" />
# enseResp <img src="man/figures/logo.png" align="right" width="120"/>

**Author**: Edu Gonzalo Almorox

<!-- badges: start -->

`r badger::badge_devel("edugonzaloalmorox/enseResp", "blue")``r usethis::use_lifecycle_badge("experimental")`
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
`r badger::badge_devel("rOpenSpain/enseResp", "blue")`
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
<!-- badges: end -->

`enseResp` is a R package to tidily access healthcare data from the [Spanish Health Survey](https://www.mscbs.gob.es/estadEstudios/estadisticas/bancoDatos.htm) (SHS) released by the [Spanish Health Ministry](https://www.mscbs.gob.es/home.htm). The main goal of `enseResp` is to provide data ready for analysis for researchers or other stakeholders interested in exploring health microdata in Spain. The current version of `enseResp` provides information about the SNS editions of 2017/19, 2011/12 and 2006/07 and compiles the surveys associated with the adult, children and household samples.
Expand Down Expand Up @@ -153,5 +155,5 @@ obesity = obesity %>%

# Issues and bugs

If you find issues or bugs while using `enseResp` report the bug [here](https://github.com/edugonzaloalmorox/enseResp/issues) or reach me out on
If you find issues or bugs while using `enseResp` report the bug [here](https://github.com/rOpenSpain/enseResp/issues) or reach me out on
[Twitter](https://twitter.com/EdudinGonzalo)
89 changes: 37 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# enseResp <img src='man/figures/logo.png' align="right" height="138.5" />
# enseResp <img src="man/figures/logo.png" align="right" width="120"/>

**Author**: Edu Gonzalo Almorox

<!-- badges: start -->

[![](https://img.shields.io/badge/devel%20version-0.1.0-blue.svg)](https://github.com/edugonzaloalmorox/enseResp)
[![](https://img.shields.io/badge/devel%20version-0.1.0-blue.svg)](https://github.com/rOpenSpain/enseResp)
[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
<!-- badges: end -->

`enseResp` is a R package to tidily access healthcare data from the
Expand All @@ -19,7 +19,6 @@ Survey](https://www.mscbs.gob.es/estadEstudios/estadisticas/bancoDatos.htm)
Ministry](https://www.mscbs.gob.es/home.htm). The main goal of
`enseResp` is to provide data ready for analysis for researchers or
other stakeholders interested in exploring health microdata in Spain.

The current version of `enseResp` provides information about the SNS
editions of 2017/19, 2011/12 and 2006/07 and compiles the surveys
associated with the adult, children and household samples.
Expand All @@ -40,15 +39,15 @@ This package contains surveys formatted to be convenient for being
accessed and analysed. The current version of the package is composed of
the following datsets:

- `adults_19`: Dataset for adults survey for 2017/19
- `children_19`: Dataset for children survey for 2017/19
- `household_19`: Dataset for household survey for 2017/19
- `adults_12`: Dataset for adults survey for 2011/12
- `children_12`: Dataset for children survey for 2011/12
- `household_12`: Dataset for household survey for 2011/12
- `adults_06`: Dataset for adults survey for 2006/07
- `children_06`: Dataset for children survey for 2006/07
- `household_06`: Dataset for household survey for 2006/07
- `adults_19`: Dataset for adults survey for 2017/19
- `children_19`: Dataset for children survey for 2017/19
- `household_19`: Dataset for household survey for 2017/19
- `adults_12`: Dataset for adults survey for 2011/12
- `children_12`: Dataset for children survey for 2011/12
- `household_12`: Dataset for household survey for 2011/12
- `adults_06`: Dataset for adults survey for 2006/07
- `children_06`: Dataset for children survey for 2006/07
- `household_06`: Dataset for household survey for 2006/07

This is a basic example of how to obtain a dataset. For example, the
survey of adults corresponding to 2017-19 survey.
Expand All @@ -66,7 +65,7 @@ library(dplyr)
#> intersect, setdiff, setequal, union

enseResp::adults_19
#> # A tibble: 23,089 x 455
#> # A tibble: 23,089 × 455
#> CCAA IDENTHOGAR A7_2a SEXOa EDADa ACTIVa PROXY_0 PROXY_1 PROXY_2 PROXY_2b
#> <chr> <chr> <chr> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <chr>
#> 1 16 00001011 01 2 084 3 1 NA NA <NA>
Expand All @@ -85,21 +84,7 @@ enseResp::adults_19
#> # F6 <dbl>, F7 <dbl>, F8_2 <chr>, F9_2 <chr>, F10 <dbl>, F11 <dbl>,
#> # F12 <dbl>, F13 <chr>, F14a <dbl>, F14b <dbl>, F15 <dbl>, F16 <dbl>,
#> # F17 <chr>, F18a_2 <chr>, F18b_2 <chr>, F19a_2 <dbl>, F19b_2 <chr>,
#> # F20 <dbl>, G21 <dbl>, G22 <dbl>, G23 <dbl>, G24 <dbl>, G25a_1 <dbl>,
#> # G25b_1 <dbl>, G25c_1 <dbl>, G25a_2 <dbl>, G25b_2 <dbl>, G25c_2 <dbl>,
#> # G25a_3 <dbl>, G25b_3 <dbl>, G25c_3 <dbl>, G25a_4 <dbl>, G25b_4 <dbl>,
#> # G25c_4 <dbl>, G25a_5 <dbl>, G25b_5 <dbl>, G25c_5 <dbl>, G25a_6 <dbl>,
#> # G25b_6 <dbl>, G25c_6 <dbl>, G25a_7 <dbl>, G25b_7 <dbl>, G25c_7 <dbl>,
#> # G25a_8 <dbl>, G25b_8 <dbl>, G25c_8 <dbl>, G25a_9 <dbl>, G25b_9 <dbl>,
#> # G25c_9 <dbl>, G25a_10 <dbl>, G25b_10 <dbl>, G25c_10 <dbl>, G25a_11 <dbl>,
#> # G25b_11 <dbl>, G25c_11 <dbl>, G25a_12 <dbl>, G25b_12 <dbl>, G25c_12 <dbl>,
#> # G25a_13 <dbl>, G25b_13 <dbl>, G25c_13 <dbl>, G25a_14 <dbl>, G25b_14 <dbl>,
#> # G25c_14 <dbl>, G25a_15 <dbl>, G25b_15 <dbl>, G25c_15 <dbl>, G25a_16 <dbl>,
#> # G25b_16 <dbl>, G25c_16 <dbl>, G25a_17 <dbl>, G25b_17 <dbl>, G25c_17 <dbl>,
#> # G25a_18 <dbl>, G25b_18 <dbl>, G25c_18 <dbl>, G25a_19 <dbl>, G25b_19 <dbl>,
#> # G25c_19 <dbl>, G25a_20 <dbl>, G25b_20 <dbl>, G25c_20 <dbl>, G25a_21 <dbl>,
#> # G25b_21 <dbl>, G25c_21 <dbl>, G25a_22 <dbl>, G25b_22 <dbl>, G25c_22 <dbl>,
#> # …
#> # F20 <dbl>, G21 <dbl>, G22 <dbl>, G23 <dbl>, G24 <dbl>, G25a_1 <dbl>, …
```

## Variables information
Expand All @@ -120,18 +105,18 @@ enseResp::adults_19_info %>%
head(10) %>% kable()
```

| variable\_ine | descripcion\_del\_campo |
|:--------------|:-----------------------------------------------------------------------------------------------|
| CCAA | Comunidad Autónoma de residencia |
| IDENTHOGAR | Número de identificación del hogar: Sección + Vivienda + Hogar |
| A7\_2a | Número de orden del adulto seleccionado |
| SEXOa | Identificación del adulto seleccionado: Sexo |
| EDADa | Identificación del adulto seleccionado: Edad |
| ACTIVa | Identificación del adulto seleccionado: Actividad económica actual |
| PROXY\_0 | ¿El informante es la persona seleccionada? |
| PROXY\_1 | Informante proxy: ¿Cuál es el motivo por el que la persona seleccionada no facilita sus datos? |
| PROXY\_2 | Informante proxy: ¿Es miembro del hogar el informante? |
| PROXY\_2b | Informante proxy: Número de orden del miembro del hogar |
| variable_ine | descripcion_del_campo |
|:-------------|:-----------------------------------------------------------------------------------------------|
| CCAA | Comunidad Autónoma de residencia |
| IDENTHOGAR | Número de identificación del hogar: Sección + Vivienda + Hogar |
| A7_2a | Número de orden del adulto seleccionado |
| SEXOa | Identificación del adulto seleccionado: Sexo |
| EDADa | Identificación del adulto seleccionado: Edad |
| ACTIVa | Identificación del adulto seleccionado: Actividad económica actual |
| PROXY_0 | ¿El informante es la persona seleccionada? |
| PROXY_1 | Informante proxy: ¿Cuál es el motivo por el que la persona seleccionada no facilita sus datos? |
| PROXY_2 | Informante proxy: ¿Es miembro del hogar el informante? |
| PROXY_2b | Informante proxy: Número de orden del miembro del hogar |

## Variables values

Expand All @@ -151,15 +136,15 @@ enseResp::adults_19_labels %>%
kable()
```

| valores\_ine | valores | variable\_ine |
|:-------------|:-------------------------------------------------------------------------------------|:--------------|
| 1 | Sentado/a la mayor parte de la jornada | T111 |
| 2 | De pie la mayor parte de la jornada sin efectuar grandes desplazamientos o esfuerzos | T111 |
| 3 | Caminando, llevando algún peso, efectuando desplazamientos frecuentes | T111 |
| 4 | Realizando tareas que requieren gran esfuerzo físico | T111 |
| 5 | No aplicable | T111 |
| 8 | No sabe | T111 |
| 9 | No contesta | T111 |
| valores_ine | valores | variable_ine |
|:------------|:-------------------------------------------------------------------------------------|:-------------|
| 1 | Sentado/a la mayor parte de la jornada | T111 |
| 2 | De pie la mayor parte de la jornada sin efectuar grandes desplazamientos o esfuerzos | T111 |
| 3 | Caminando, llevando algún peso, efectuando desplazamientos frecuentes | T111 |
| 4 | Realizando tareas que requieren gran esfuerzo físico | T111 |
| 5 | No aplicable | T111 |
| 8 | No sabe | T111 |
| 9 | No contesta | T111 |

## Example analysis

Expand Down Expand Up @@ -228,5 +213,5 @@ obesity = obesity %>%
# Issues and bugs

If you find issues or bugs while using `enseResp` report the bug
[here](https://github.com/edugonzaloalmorox/enseResp/issues) or reach me
out on [Twitter](https://twitter.com/EdudinGonzalo)
[here](https://github.com/rOpenSpain/enseResp/issues) or reach me out on
[Twitter](https://twitter.com/EdudinGonzalo)
Binary file modified data/adults_06.rda
Binary file not shown.
Binary file modified data/adults_06_info.rda
Binary file not shown.
Binary file modified data/adults_06_labels.rda
Binary file not shown.
Binary file modified data/adults_12.rda
Binary file not shown.
Binary file modified data/adults_12_info.rda
Binary file not shown.
Binary file modified data/adults_12_labels.rda
Binary file not shown.
Binary file modified data/adults_19.rda
Binary file not shown.
Binary file modified data/adults_19_info.rda
Binary file not shown.
Binary file modified data/adults_19_labels.rda
Binary file not shown.
Binary file modified data/children_06.rda
Binary file not shown.
Binary file modified data/children_06_info.rda
Binary file not shown.
Binary file modified data/children_06_labels.rda
Binary file not shown.
Binary file modified data/children_12.rda
Binary file not shown.
Binary file modified data/children_12_info.rda
Binary file not shown.
Binary file modified data/children_12_labels.rda
Binary file not shown.
Binary file modified data/children_19.rda
Binary file not shown.
Binary file modified data/children_19_info.rda
Binary file not shown.
Binary file modified data/children_19_labels.rda
Binary file not shown.
Binary file modified data/house_06_labels.rda
Binary file not shown.
Binary file modified data/household_06.rda
Binary file not shown.
Binary file modified data/household_06_info.rda
Binary file not shown.
Binary file modified data/household_12.rda
Binary file not shown.
Binary file modified data/household_12_info.rda
Binary file not shown.
Binary file modified data/household_12_labels.rda
Binary file not shown.
Binary file modified data/household_19.rda
Binary file not shown.
Binary file modified data/household_19_info.rda
Binary file not shown.
Binary file modified data/household_19_labels.rda
Binary file not shown.
Binary file modified data/regional_map.rda
Binary file not shown.
Loading