Skip to content

Commit

Permalink
add database vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
sbfnk committed May 17, 2024
1 parent 7f69ecf commit f12fda0
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions vignettes/database.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: "Current database"
output:
bookdown::html_vignette2:
fig_caption: yes
code_folding: show
pkgdown:
as_is: true
vignette: >
%\VignetteIndexEntry{Current database}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---

```{r echo = FALSE}
library("DT")
library("epiparameter")
db <- epidist_db()
tbl <- lapply(db, function(x) {
data.frame(
disease = x$disease,
pathogen = x$pathogen,
epi_dist = x$epi_dist,
url = paste0('<a href="https://doi.org', x$citation$doi, '">' , x$citation$doi, '</a>')
)
})
tb <- do.call(rbind, tbl)
## sort by disease then pathogen
tb <- tb[order(tb$disease, tb$pathogen), ]
datatable(
tb,
rownames = FALSE,
colnames = c("Disease", "Pathogen", "Distribution", "Reference"),
escape = FALSE,
options = list(pageLength = 50)
)
```

0 comments on commit f12fda0

Please sign in to comment.