-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
93 lines (56 loc) · 4.87 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
87
88
89
90
91
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# gssrdoc <img src="man/figures/gssrdoc.png" align="right" width="120" />
<!-- badges: start -->
[![R-CMD-check](https://github.com/kjhealy/gssrdoc/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/kjhealy/gssrdoc/actions/workflows/R-CMD-check.yaml)
[![gssrdoc status badge](https://kjhealy.r-universe.dev/badges/gssrdoc)](https://kjhealy.r-universe.dev/gssrdoc)
<!-- badges: end -->
Documentation for the General Social Survey Cumulative Data (1972-2022, release 2a) packaged for easy use in R. This package is a companion to the [`gssr`](https://github.com/kjhealy.gssr) package. I recommend you install both of them.
## Installation
The relatively large number of variables documented in `{gssrdoc}` means it is not suitable for hosting on [CRAN](https://cran.r-project.org/), the core R package repository. The same is true of the `{gssr}` package.
### Install via R-Universe
My [R Universe](https://kjhealy.r-universe.dev/) provides binary packages for `{gssrdoc}` and `{gssr}`. To install both packages, copy and paste the following code to the R console:
``` r
# Install 'gssrdoc' from 'ropensci' universe
install.packages('gssrdoc', repos =
c('https://kjhealy.r-universe.dev', 'https://cloud.r-project.org'))
# Also recommended: install 'gssr' as well
install.packages('gssr', repos =
c('https://kjhealy.r-universe.dev', 'https://cloud.r-project.org'))
```
Because the packages have dependencies that are on CRAN, we add CRAN as well as the R Universe to the `repos` argument.
The binary packages will install noticeably quicker than building the package from source. Plus, you can use `install.packages()` directly.
## Install direct from GitHub
You can also install gssrdoc from [GitHub](https://github.com/kjhealy/gssrdoc) with:
``` r
remotes::install_github("kjhealy/gssrdoc")
```
## Integrated Help
`{gssrdoc}` provides documentation for all GSS variables in the cumulative data file via R's help system. You can browse variables by name in the package's help file or type `?` followed by the name of the variable at the console to get a standard R help page containing information on the variable, the values it takes and (in most cases) a crosstabulation of the variable's values for each year of the GSS. This facility is particularly convenient in an IDE such as RStudio or Microsoft Visual Studio.
<img src="man/figures/fefam_help.png" />
Information about the variables is also contained in the `gss_dict` object:
```{r load-doc}
library(tibble)
library(gssrdoc)
gss_dict
```
## The GSS and COVID-19
The GSS administrators have released a [Methodological Primer](https://gss.norc.org/Documents/other/2021%20XSEC%20R1%20Methodological%20Primer.pdf) along with the [Documentation and Codebook for the 2021 survey](https://gss.norc.org/Documents/codebook/GSS%202021%20Codebook%20R1.pdf) that users should read carefully in connection with the effects of COVID-19 on data collection for the GSS.
The Primer notes:
> Since its inception, the GSS has conducted data collection via in-person interviews as its primary mode of data collection. The pandemic forced the GSS to change this design, moving from in-person to address- based sampling and a push-to-web methodology, with the bulk of the interview conducted online via a self- administered questionnaire.
In addition,
> We recommend our users include the one of the following statements when reporting on the GSS 2021 Cross-section data: _Total Survey Error Summary Perspective for the 2021 GSS Cross-section:_ Changes in opinions, attitudes, and behaviors observed in 2021 relative to historical trends may be due to actual change in concept over time and/or may have resulted from methodological changes made to the survey methodology during the COVID-19 global pandemic.
And,
> _Suggested Statement to Include in Articles and Reports That Use GSS Data:_ To safeguard the health of staff and respondents during the COVID-19 pandemic, the 2021 GSS data collection used a mail-to-web methodology instead of its traditional in-person interviews. Research and interpretation done using the data should take extra care to ensure the analysis reflects actual changes in public opinion and is not unduly influenced by the change in data collection methods. For more information on the 2021 GSS methodology and its implications, please visit https://gss.norc.org/Get-The-Data
## Further details
The package is documented at <http://kjhealy.github.io/gssrdoc/>. The GSS homepage is at <http://gss.norc.org/>. While `{gssrdoc}` package incorporates the publicly-available GSS cumulative data file, this package is not associated with or endorsed by the National Opinion Research Center or the General Social Survey.