PhilipDaubmeier.CompactTimeSeries 1.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package PhilipDaubmeier.CompactTimeSeries --version 1.2.0
NuGet\Install-Package PhilipDaubmeier.CompactTimeSeries -Version 1.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PhilipDaubmeier.CompactTimeSeries" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PhilipDaubmeier.CompactTimeSeries --version 1.2.0
#r "nuget: PhilipDaubmeier.CompactTimeSeries, 1.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PhilipDaubmeier.CompactTimeSeries as a Cake Addin
#addin nuget:?package=PhilipDaubmeier.CompactTimeSeries&version=1.2.0

// Install PhilipDaubmeier.CompactTimeSeries as a Cake Tool
#tool nuget:?package=PhilipDaubmeier.CompactTimeSeries&version=1.2.0

CompactTimeSeries

CompactTimeSeries is an in-memory time series library for space-efficient storing, processing, resampling and compressing of time series data.

NuGet

PM> Install-Package PhilipDaubmeier.CompactTimeSeries

When should I use it?

If you need to deal with mostly equidistant time series with a large number of values, e.g. sensor readings that are equally spaced in time, and need to process them in memory. The main classes of this library, which implement ITimeSeries<T> allow for convenient random access read/write to a time series via time-based indexers.

If you need fast persisting/loading of such time series data, this library will not help you - just use a time series database like Influx, Graphite, CrateDB etc.

Usage

// Create a time series for today with 1 second spacing, which will result in 86400 values
var span = new TimeSeriesSpan(DateTime.Now.Date, DateTime.Now.Date.AddDays(1), TimeSeriesSpan.Spacing.Spacing1Sec);
var timeseries = new TimeSeriesStream<int>(span);

// Write to the time series via time-based indexer: the time bucket for the current second will be written
timeseries[DateTime.Now] = 42;

// Enumerate the time series values and timestamps like an IEnumerable<KeyValuePair<DateTime, T?>>
foreach (var timestampedValue in timeseries)
    DoSomething(timestampedValue);

For more usage examples you can also have a look at the unit tests.

Platform Support

CompactTimeSeries is compiled for .NET Core 2.2.

License

The MIT License (MIT)

Copyright (c) 2019 Philip Daubmeier

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.2 is compatible.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 2.2

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.7.0 440 6/27/2021
1.6.1 454 4/17/2020
1.6.0 422 4/14/2020
1.5.0 483 3/29/2020
1.4.0 510 10/16/2019
1.3.0 439 10/8/2019
1.2.0 514 4/13/2019

1.2.0 - Added EventTimeSeriesStream for non-equidistant time series
1.1.0 - Added TimeSeriesResampler
1.0.0 - Initial version after completing unit tests and refactoring class structure