-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
67 lines (46 loc) · 1.46 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r message=FALSE, warning=FALSE, include=FALSE}
knitr::opts_chunk$set(
message = FALSE,
warning = FALSE,
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "80%"
)
```
# togglvis
<!-- badges: start -->
<!-- badges: end -->
## Installation
You can install the latest version of togglvis from [CRAN](https://CRAN.R-project.org) with:
``` r
install.packages("remotes")
remotes::install_github("karissawhiting/togglvis")
```
## Example
This is a basic example showing how to get data from the
[{togglr}](https://github.com/ThinkR-open/togglr) API and process and visualize it.
You will need to set up an account on [toggl](https://toggl.com/) and get an API token.
See [{togglr}](https://github.com/ThinkR-open/togglr) for easy instructions on how to set API key.
Note: You can also download data as a csv directly from the [toggl](https://toggl.com/).
```{r example}
library(togglvis)
library(dplyr)
library(togglr)
```
```{r, echo=FALSE}
load(here::here("data-raw", "report.RData"))
```
Get summary report data using [{togglr}](https://github.com/ThinkR-open/togglr) app, or download data from toggl web browser.
```{r, eval = FALSE}
# See togglr documentation for how to set up the API key
report <- togglr::get_detailled_report()
```
```{r cars}
processed_report <- process_report(report)
time_bar_chart(processed_report)
```