I’m working on an R-package to access the data of a web service. So I have to handle large data I get back from an API call. The result is encoded in JSON-format which itself results in a large list of lists (of lists).
But I want to convert these lists of lists into a data.frame or tibble. Sounds easy …. Here are the caveats I came across.
Lately I’ve had the problem that ggplot2-plots were missing in my blogdown-posts.
I discovered that this problem only occurs when I used .Rmarkdown instead of .Rmd.
How to detect the unexpected? Is the behaviour of some measured value normal or did something unexpected happen?
To answer these questions we need to detect anomalous behaviour in a time series. In this article I want to show you how we can do this with prophet.
Prophet is a library written by Facebook in python and R for prediction of time series.
So for anomaly detection we train our model according to the known values except the last n. Then we predict the last n values and compare the predictions with the truth. If they differ we call them an anomaly.
Here’s an example with some data of website usage.