anchor.diff:  	
   
   
  -	+	
  
positive.code: 	sinus_random_data(15,U1R2Stream2,1000),
  	
  	%% Create streams for resource3 for user1
  	{ok, {{_Version13, 200, _ReasonPhrase13}, _Headers13, Body13}} = httpc:request(post, {"http://localhost:8000/streams", [],"application/json", "{\"resource_id\":\""++ U1Resource3 ++"\",\"name\":\"Stream1\",\"tags\":\"[temperature,celsius,Sala]\",\"description\":\"Temperature in Celsius in Sala\",\"private\":\"false\",\"type\":\"Temperature\",\"unit\":\"celsius\",\"accuracy\":0.95,\"min_val\":-50.0,\"max_val\":50.0,\"active\":\"true\",\"user_ranking\":10.0,\"subscribers\":16,\"last_updated\":\"2013-10-05T010502.0000\", \"creation_date\":\"2013-10-01\",\"history_size\": 5000,\"location\":\"59.9167,16.6000\"}"}, [], []),
  	{ok, {{_Version14, 200, _ReasonPhrase14}, _Headers14, Body14}} = httpc:request(post, {"http://localhost:8000/streams", [],"application/json", "{\"resource_id\":\""++ U1Resource3 ++"\",\"name\":\"Stream2\",\"tags\":\"[temperature,kelvin,Sala]\",\"description\":\"Temperature in Kelvin in Sala\",\"private\":\"false\",\"type\":\"Temperature\",\"unit\":\"kelvin\",\"accuracy\":0.95,\"min_val\":150.0,\"max_val\":350.0,\"active\":\"true\",\"user_ranking\":10.0,\"subscribers\":155,\"last_updated\":\"2013-10-07T010909.0000\", \"creation_date\":\"2013-10-01\",\"history_size\": 10000,\"location\":\"59.9167,16.6000\"}"}, [], []),
  	U1R3Stream1 = lib_json:get_field(Body13,"_id"),
  	U1R3Stream2 = lib_json:get_field(Body14,"_id"),
  	
  
negative.code: 	Value = math:sin(Amount/10.0) + (random:uniform()/10.0),
  	UsedValue = float_to_list(Value,[{decimals,3}]),
  	%% Unsure if this is how the datapoints should look
  	JSON = "{\"stream_id\":\""++ lib_json:to_string(StreamId)++"\",\"timestamp\":\"" ++ TimeStamp ++ "\",\"value\":"++ UsedValue ++"}",
  	{ok, {{_Version, _Code, _ReasonPhrase}, _Headers, _Body}} = httpc:request(post, {"http://localhost:8000/streams/" ++ lib_json:to_string(StreamId) ++ "/data", [],"application/json", JSON}, [], []),
  	timer:sleep(Delay),
  	sinus_random_data(Amount-1,StreamId,Delay).
  
  