knitr::opts_chunk$set(echo = TRUE)
dataset_doi <- readLines(here::here("data/dataset_doi"))[1]
# name for the file that will hold your data. Ex: "va_ct_vdoe_2019_2021_3rd_grade_mean_median_read_score" dat_file_name <- "YOUR_DATA_FILE_NAME" # the source code file where you produced the dataset source(here::here("data-raw/YOUR_CODE_FILE_NAME")) # name of the variable containing the dataset in your sourced file assign(dat_file_name, YOUR_DATASET_VAR_NAME)
dat_file_path <- here::here(paste0("data/", dat_file_name, ".csv.xz")) readr::write_csv(get(dat_file_name), xzfile(dat_file_path, compression = 9))
dataverse::add_dataset_file( file = dat_file_path, dataset = dataset_doi, key = Sys.getenv("DATAVERSE_KEY"), server = Sys.getenv("DATAVERSE_SERVER"), description = dat_file_name )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.