https://github.com/datasketch/tabler
HTMLWidget to render tables from Google Sheets database
https://github.com/datasketch/tabler
Last synced: 4 months ago
JSON representation
HTMLWidget to render tables from Google Sheets database
- Host: GitHub
- URL: https://github.com/datasketch/tabler
- Owner: datasketch
- Created: 2020-11-04T21:32:36.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-11T20:57:08.000Z (almost 5 years ago)
- Last Synced: 2024-11-27T11:37:09.974Z (11 months ago)
- Language: JavaScript
- Size: 98.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - datasketch/tabler - HTMLWidget to render tables from Google Sheets database (JavaScript)
README
# tabler
HTMLWidget to render tables from Google Sheets database
## Install
```
devtools::install_github("datasketch/tabler")
```
## Usage
```r
library(shiny)
library(tabler)
ui <- shinyUI(fluidPage(
tablerOutput('tabler')
))
server <- function(input, output, session) {
output$tabler <- renderTabler(
tabler(sheetId = 'some-google-sheet-public-id')
)
}
shinyApp(ui = ui, server = server)
```
The `tabler` function accept the following parameters
| param | default | description |
|---------------------|----------|-----------------------------------------------------|
| sheetId | NULL | Public Google Sheets id |
| rowsByPage | 10 | Rows shown by page when `paginate` is set to `TRUE` |
| paginate | TRUE | Toggles pagination on or off |
| localization.langs | NULL | Translations dictionary |
| localization.locale | NULL | Set a key from the `localizations.langs` object |
| search.enable | FALSE | Render search input |
| search.fields | c() | |
| search.placeholder | NULL | Search input placeholder |
## Examples
- [Basic](./inst/example/sample.R)
- [Pagination](./inst/example/pagination.R)
- [Localization](./inst/example/localization.R)
- [Search](./inst/example/searchable.R)
## Dependencies
- [Tabulator](https://github.com/olifolkerd/tabulator)
- [gsheetreader](https://github.com/datasketch/gsheetreader)
## Roadmap
- [ ] Document `tabler` function
- [ ] Render table from dataframe