0

We want to perform data analysis on IOT data which is stored into our SQL Server database. The data itself is generated by IOT devices and some are using hysteresis based logging for data compression. Which means that it only logs a value when the data for that particular property has changed.

As an example, here's how it looks inside the database: enter image description here The Float and Timestamp are actually the interesting values we're looking for. The rest is meta data. AssetTypePropertyId is linked to the name of a certain property. Which describes what the value is actually about.

We can reshape this data into a 2d matrix, making it already more useable. However, since the data is compressed with hysteresis logging we need to 'recreate' the missing values.

To give an example we want to go from this 2d dataset: enter image description here

To a set which has all the gaps filled in:

enter image description here
This is generated under the assumption that the previous value is valid as long as no new value has been logged for it.

My question: How can this transformation be done in R?

Peter
  • 14,221
  • 15
  • 70
  • 110
  • FWIW pictures are only data when the tag is about image processing. I suspect you'd get more/faster help if this was actual data. – hrbrmstr Oct 11 '18 at 12:02
  • You mean attach some csv files with the data would help? Or is there a better way? I couldn't find a simple way to include a table or anything in the markdown editor is what I mean. – Peter Oct 11 '18 at 12:09

0 Answers0