Spivey.Health
1.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Spivey.Health --version 1.0.1
NuGet\Install-Package Spivey.Health -Version 1.0.1
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="Spivey.Health" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Spivey.Health --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Spivey.Health, 1.0.1"
#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 Spivey.Health as a Cake Addin #addin nuget:?package=Spivey.Health&version=1.0.1 // Install Spivey.Health as a Cake Tool #tool nuget:?package=Spivey.Health&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Spivey.Health
A c# package to efficiently store health data imported from different sources, so that you can analyze it. For example, heart, nutrition and other measurements from Apple Health export files.
Related Packages
- AppleHealthFileReader can be used to read an Apple Health export zip file that contains all of your health data in XML format. That data can then be transformed into normalized Spivey.Health DataLists.
Usage
Produce Scatter Plot and Aggregate Minimum by Day
DateTime startDate = new DateTime(2023, 3, 20);
DateTime endDate = new DateTime(2023, 3, 22);
string labelX = "Label X";
string labelY = "Label Y";
string typeX = "Type X";
string typeY = "Type Y";
var dataListX = new DataList<double>
{
Values = new DataValue<double>[]
{
new DataValue<double> { Date = startDate, Value = 1 },
new DataValue<double> { Date = startDate.AddDays(1), Value = 2 },
new DataValue<double> { Date = startDate.AddDays(1), Value = 3 },
new DataValue<double> { Date = startDate.AddDays(1), Value = 4 },
new DataValue<double> { Date = endDate, Value = 5 },
}
};
var dataListY = new DataList<double>
{
Values = new DataValue<double>[]
{
new DataValue<double> { Date = startDate, Value = 10 },
new DataValue<double> { Date = startDate.AddDays(1), Value = 20 },
new DataValue<double> { Date = startDate.AddDays(1), Value = 30 },
new DataValue<double> { Date = startDate.AddDays(1), Value = 40 },
new DataValue<double> { Date = endDate, Value = 50 },
}
};
var result = ScatterPlotDataGenerator<double>.AggregateByDay(startDate, endDate, labelX, typeX, dataListX, labelY, typeY, dataListY, AggregateOperator.Min);
Result | Date | X | Y | |------------|---|----| | 3/20/2023 | 1 | 10 | | 3/21/2023 | 2 | 20 | | 3/22/2023 | 5 | 50 |
Produce Scatter Plot and Aggregate Sum by Day and Average by Month
DateTime startDate = new DateTime(2023, 3, 30);
DateTime endDate = new DateTime(2023, 4, 1);
string labelX = "Label X";
string labelY = "Label Y";
string typeX = "Type X";
string typeY = "Type Y";
var dataListX = new DataList<double>
{
Values = new DataValue<double>[]
{
new DataValue<double> { Date = startDate, Value = 1 },
new DataValue<double> { Date = startDate.AddDays(1), Value = 2 },
new DataValue<double> { Date = startDate.AddDays(1), Value = 3 },
new DataValue<double> { Date = startDate.AddDays(1), Value = 4 },
new DataValue<double> { Date = endDate, Value = 6 },
}
};
var dataListY = new DataList<double>
{
Values = new DataValue<double>[]
{
new DataValue<double> { Date = startDate, Value = 10 },
new DataValue<double> { Date = startDate.AddDays(1), Value = 20 },
new DataValue<double> { Date = startDate.AddDays(1), Value = 30 },
new DataValue<double> { Date = startDate.AddDays(1), Value = 40 },
new DataValue<double> { Date = endDate, Value = 51 },
}
};
var result = ScatterPlotDataGenerator<double>.AggregateByMonth(startDate, endDate, labelX, typeX, dataListX, labelY, typeY, dataListY, dayAggregateOperator: AggregateOperator.Sum, monthAggregateOperator: AggregateOperator.Average);
Result | Date | X | Y | |------------|---|----| | 3/1/2023 | 5 | 50 | | 4/1/2023 | 6 | 51 |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- 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.