Add example for integrating external CSV files
Change-Id: I7bd3ad4a53b80acb19176e0bef5a39ab5de5623a
diff --git a/Readme.md b/Readme.md
index e795074..723c8f3 100644
--- a/Readme.md
+++ b/Readme.md
@@ -99,7 +99,7 @@
## Examples
-### ggplot
+### Plot with ggplot
```R
library(matomor)
library(tidyverse)
@@ -115,7 +115,7 @@
```
![](./man/figures/Readme-Example-1.png)<!-- -->
-### highcharter
+### Plot with highcharter
```R
library(matomor)
library(tidyverse)
@@ -131,6 +131,27 @@
```
![](./man/figures/Readme-Example-2.png)<!-- -->
+### Integration of non-matomo data in CSV format
+```R
+library(matomor)
+library(tidyverse)
+library(highcharter)
+library(idsThemeR)
+
+serviceC_usage <- read.csv('./inst/exdata/serviceC_usage.csv') %>%
+ mutate(service="C", date=as.Date(date)) %>%
+ filter(date >= as.Date("2019-09-01"))
+
+# matomoUtl <- "https://stats.xxx.org/"
+
+getVisitsSummary(matomoUrl, siteId = c(13,14), period="month", date="2019-09-01,2020-11-01", removeLast=T) %>%
+ mutate(service = case_when(site_id == 13 ~ "A", site_id == 14 ~ "B")) %>%
+ bind_rows(serviceC_usage) %>%
+ hchart("spline", hcaes(date, nb_visits, group=service)) %>%
+ hc_add_theme(hc_theme_ids_light())
+```
+![](./man/figures/Readme-Example-3.png)<!-- -->
+
## Development and License
**Authors**: [Marc Kupietz](http://www1.ids-mannheim.de/zfo/personal/kupietz/)
diff --git a/inst/exdata/serviceC_usage.csv b/inst/exdata/serviceC_usage.csv
new file mode 100644
index 0000000..92cefee
--- /dev/null
+++ b/inst/exdata/serviceC_usage.csv
@@ -0,0 +1,23 @@
+date,nb_visits,nb_actions
+2019-01-01,7870,12190
+2019-02-01,7171,12031
+2019-03-01,6951,12418
+2019-04-01,6031,10762
+2019-05-01,5733,10788
+2019-06-01,6589,187172
+2019-07-01,9863,24742
+2019-08-01,5330,12063
+2019-09-01,5567,8971
+2019-10-01,6811,10720
+2019-11-01,9792,15290
+2019-12-01,5304,8905
+2020-01-01,7961,95210
+2020-02-01,5787,9795
+2020-03-01,7150,91973
+2020-04-01,8143,339520
+2020-05-01,8130,261307
+2020-06-01,6867,10302
+2020-07-01,7575,12347
+2020-08-01,4786,8157
+2020-09-01,6837,11147
+2020-10-01,6775,9916
diff --git a/man/figures/Readme-Example-3.png b/man/figures/Readme-Example-3.png
new file mode 100644
index 0000000..0f9e568
--- /dev/null
+++ b/man/figures/Readme-Example-3.png
Binary files differ