Skip to content
Merged
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
Binary file removed .DS_Store
Binary file not shown.
42 changes: 42 additions & 0 deletions R/journal_table.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: "Journals"
author: "Hao Ye"
date: "May 10, 2018"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(googlesheets)
library(dplyr)
library(lubridate)
library(DT)
```

```{r get data, include = FALSE}
# The Google Sheets API (which is used by the R package `googlesheets`) requires
# that the spreadsheet be "Published to the Web" (under the file menu).
# I've made a copy of the original and published the `Journals` sheet here:

# journal_db_url <- "https://docs.google.com/spreadsheets/d/1QTLR5NZbB6h4HpiHYOkQsEyBMzhcMN2Y8AVULLMFYBo/edit?usp=sharing"
# journal_db <- gs_url(journal_db_url)

# key is supposed to be reliable than URL
journal_db_key <- "1QTLR5NZbB6h4HpiHYOkQsEyBMzhcMN2Y8AVULLMFYBo"
journal_data <- journal_db_key %>%
gs_key() %>%
gs_read(ws = "Journals")
```

```{r clean data, include = FALSE}
journal_data$"Date reviewed" <- as.Date(parse_date_time(journal_data$"Date reviewed",
orders = c("m/d/y", "d b y")))
```

```{r generate table, echo = FALSE}
journal_data %>%
datatable(filter = "top") %>%
formatDate("Date reviewed", method = "toDateString")
```


3 changes: 3 additions & 0 deletions R/render_html.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rmarkdown::render(here::here("R", "journal_table.Rmd"))
file.rename(here::here("R", "journal_table.html"),
here::here("static", "journal_table.html"))
Binary file removed static/.DS_Store
Binary file not shown.
Binary file removed static/images/.DS_Store
Binary file not shown.
Binary file removed static/images/model-1/.DS_Store
Binary file not shown.
Binary file removed static/images/model-2/.DS_Store
Binary file not shown.
2,930 changes: 2,930 additions & 0 deletions static/journal_table.html

Large diffs are not rendered by default.