- Navigate to folder in
data_raw
- Add code to read in CSV/similar to
process_data_sets_*.R
and give DATA_SET_NAME
- Clean data set if needed
- Open README.md if exists in folder
- Open Meta tab to Data to feed R pkg documentation Google Sheet and add DATA_SET_NAME to
DATA_SET_NAME
column
- Copy
TITLE
andLINK
from README.md - Get
nrow(DATA_SET_NAME)
andncol(DATA_SET_NAME)
and copy intoNUM_ROWS
andNUM_COLS
columns - Determine
OBSUNIT
and fill in column - Find source in README.md or look over article linked at https://github.com/fivethirtyeight/data
- Add DATA_SET_NAME to
DATA_SET_NAME
column in Variables data tab of Data to feed R pkg documentation Google Sheet
- Run
get_names <- function(x) {cat(names(x), sep = "\n")}; get_names(x)
withx = DATA_SET_NAME
- Copy values into
VARNAME
column - Copy md table from README.md into
VAR_DESC_FULL
VAR_DESC
is automatically created using Excel formula:=IF(C2="","", TRIM(RIGHT(C2,LEN(C2)-FIND("|",C2) - 1)))
- Source
data-raw/create_doc.R
- Run
devtools::use_data(DATA_FRAME, overwrite = TRUE)
code to create Rdata file inprocess_data_sets_*.R
- Build & Reload package using Command + Shift + B (on Mac)
- Also creates R documentation if settings checked