Skip to content

Instantly share code, notes, and snippets.

@randomboolean
randomboolean / keyword_trend.gts
Created April 12, 2019 12:29
google trend of keyword "star trek"
1397347200000000// google_trend{keyword=star%20trek}{} 20.0
=1397952000000000// 20.0
=1398556800000000// 19.0
=1399161600000000// 18.0
=1399766400000000// 17.0
=1400371200000000// 22.0
=1400976000000000// 22.0
=1401580800000000// 20.0
=1402185600000000// 19.0
=1402790400000000// 18.0
@randomboolean
randomboolean / moving_ZSCORETEST.mc2
Last active April 12, 2019 13:27
Outputs a boolean GTS with ticks labeled with true where anomalies are detected. Detection is done with a moving ZSCORETEST within a custom mapper.
<%
// Store the argument that will be passed to MAP
[ 'gts' 'pre' 'post' 'occ' 'steps' ] STORE
// Build the custom mapper
<%
// Make a GTS from the moving window
LIST-> DROP [ 'cur' 'c' 'l' 't' 'lat' 'lon' 'elev' 'v' ] STORE
$t [] [] [] $v MAKEGTS
@randomboolean
randomboolean / seasonal.gts
Created April 10, 2019 16:19
seasonal test data
338738460000000// count{} 182.478
=338738520000000// 176.231
=338738580000000// 183.917
=338738640000000// 177.798
=338738700000000// 165.469
=338738760000000// 181.878
=338738820000000// 184.502
=338738880000000// 183.303
=338738940000000// 177.578
=338739000000000// 171.641
@randomboolean
randomboolean / response_time.gts
Created April 10, 2019 12:36
response time data
1554897831160464// response_time{server=harbor-7,req_type=CKAO9}{} 42.0
=1554897832160464// 38.0
=1554897837160461// 44.0
=1554897839160459// 49.0
=1554897840160463// 48.0
=1554897842160458// 47.0
=1554897843160460// 43.0
=1554897843160462// 46.0
=1554897844160457// 44.0
=1554897844160460// 50.0