analyticsLibrary.Core
2.0.0-beta.pr-6.2
See the version list below for details.
dotnet add package analyticsLibrary.Core --version 2.0.0-beta.pr-6.2
NuGet\Install-Package analyticsLibrary.Core -Version 2.0.0-beta.pr-6.2
<PackageReference Include="analyticsLibrary.Core" Version="2.0.0-beta.pr-6.2" />
<PackageVersion Include="analyticsLibrary.Core" Version="2.0.0-beta.pr-6.2" />
<PackageReference Include="analyticsLibrary.Core" />
paket add analyticsLibrary.Core --version 2.0.0-beta.pr-6.2
#r "nuget: analyticsLibrary.Core, 2.0.0-beta.pr-6.2"
#:package analyticsLibrary.Core@2.0.0-beta.pr-6.2
#addin nuget:?package=analyticsLibrary.Core&version=2.0.0-beta.pr-6.2&prerelease
#tool nuget:?package=analyticsLibrary.Core&version=2.0.0-beta.pr-6.2&prerelease
analyticsLibrary
A family of focused .NET 8 packages for reading and writing CSV and fixed-width files, performing statistical operations, running sort and search algorithms, and working with Excel, Access, and Hadoop data sources.
Version 2.0.0 is a breaking-change release. The monolithic analyticsLibrary 1.x package has been split into focused packages. SQL Server, Oracle, SAS, and Sybase provider support has been removed. See the Migration Guide below.
Table of Contents
- Package Overview
- Namespace Reference
- Installation
- Quick Starts
- Functionality
- Repository Layout
- Build and Test
- Release Process
- Contributing
- Migration Guide
Package Overview
| Package | Purpose | Primary Namespace | Key Dependencies |
|---|---|---|---|
analyticsLibrary.Core |
CSV, fixed-width, shared data objects, helpers | analyticsLibrary.Core |
none |
analyticsLibrary.Algorithms |
Merge sort, quick sort, search | analyticsLibrary.Algorithms |
Core |
analyticsLibrary.Statistics |
Covariance, dot product, histogram, normalize, stddev, variance | analyticsLibrary.Statistics |
Core |
analyticsLibrary.Excel |
Excel file read/write via EPPlus | analyticsLibrary.Excel |
Core, EPPlus 5.8.14, System.Data.OleDb (Windows) |
analyticsLibrary.Access |
Access database file support | analyticsLibrary.Access |
Core, System.Data.OleDb (Windows) |
analyticsLibrary.Hadoop |
Hadoop/ODBC data access | analyticsLibrary.Hadoop |
Core, System.Data.Odbc |
analyticsLibrary |
Transition metapackage (references all above) | — | all above |
Platform note:
analyticsLibrary.ExcelandanalyticsLibrary.Accessdepend onSystem.Data.OleDb, which is Windows-only at runtime. These packages compile on all platforms but can only execute on Windows.
Namespace Reference
| Namespace | Package | Contents |
|---|---|---|
analyticsLibrary.Core |
analyticsLibrary.Core |
csv, fixedWidthFile, data, table, column, dataTypeHelper, dataTypeEnum, extensions, analytics, loopDateRange, presentation, login, utility, indexObject, typedIndex |
analyticsLibrary.Algorithms |
analyticsLibrary.Algorithms |
sorting (merge sort, quick sort), searching |
analyticsLibrary.Statistics |
analyticsLibrary.Statistics |
extensions (standardDeviation, variance, covariance, normalize, histogram, dot, norm) |
analyticsLibrary.Excel |
analyticsLibrary.Excel |
excelLibrary, extensions, columnLettersEnum, sheetColumnAttribute |
analyticsLibrary.Access |
analyticsLibrary.Access |
access |
analyticsLibrary.Hadoop |
analyticsLibrary.Hadoop |
hadoop |
Installation
Install only the packages you need for a leaner dependency graph.
# Core CSV and data helpers
dotnet add package analyticsLibrary.Core
# Sort and search algorithms
dotnet add package analyticsLibrary.Algorithms
# Statistics
dotnet add package analyticsLibrary.Statistics
# Excel file operations (Windows runtime only)
dotnet add package analyticsLibrary.Excel
# Access database support (Windows runtime only)
dotnet add package analyticsLibrary.Access
# Hadoop/ODBC support
dotnet add package analyticsLibrary.Hadoop
# Everything (transition metapackage)
dotnet add package analyticsLibrary
Quick Starts
Read a CSV file
using analyticsLibrary.Core;
var file = new csv("data.csv");
foreach (var row in file.data)
{
Console.WriteLine(string.Join(", ", row.values));
}
Write a CSV file
using analyticsLibrary.Core;
var header = new[] { "Name", "Score" };
var rows = new[]
{
new object[] { "Alice", 95 },
new object[] { "Bob", 87 },
};
rows.writeCsv("output.csv", header, ',');
Standard deviation and normalization
using analyticsLibrary.Statistics;
double[] scores = { 70, 80, 85, 90, 95 };
double stddev = scores.standardDeviation();
double[] normalized = scores.normalize(); // maps min to 0.0, max to 1.0
Sort a list
using analyticsLibrary.Algorithms;
int[] values = { 5, 3, 8, 1, 9 };
int[] sorted = values.mergeSort(); // ascending
int[] desc = values.quickSort(descending: true); // descending
Parse a SAS date string
using analyticsLibrary.Core;
DateTime? date = "01JAN2020:00:00:00.000".fromSasEpochDate();
Functionality
CSV and Fixed-Width Files (analyticsLibrary.Core)
- Read CSV files with configurable delimiters and optional headers via the
csvclass. - Write
IEnumerable<object[]>to CSV usingwriteCsvextension methods. - Parse individual CSV lines with
fromCsvand serialize object arrays withtoCsv. - Read fixed-width files with
fixedWidthFileandfixedWidthFileStream. loopDateRangeiterates over a date range with configurable step intervals.
Statistics (analyticsLibrary.Statistics)
All methods are extension methods on double[] or IEnumerable<double>:
| Method | Description |
|---|---|
standardDeviation() |
Population standard deviation |
variance() |
Population variance |
covariance() |
Sample covariance matrix (rows = observations, cols = variables) |
normalize(min, max) |
Maps values to [min, max], default [0, 1] |
histogram(steps) |
Returns bucket counts for the given number of bins |
dot(other) |
Dot product of two double[] vectors |
norm() |
Euclidean norm (L2) of a vector |
Algorithms (analyticsLibrary.Algorithms)
mergeSort<T>()— stable recursive merge sort; supports ascending and descending order forint,double,float,decimal, andstring.quickSort<T>()— in-place quick sort; same type support as merge sort.sorting.pickFunction<T>()— returns the comparison delegate for a given type; useful for supplying a custom comparator.
Core Helpers (analyticsLibrary.Core)
dataTypeHelper.dataTypeFromString(string)— maps SQL/ODBC type name strings (e.g."varchar","int") todataTypeEnumvalues.analytics—compress(),titleCase(),wordReplace()string extension methods.extensions.fromSasEpochDate()— parses a SAS datetime string inddMMMyyyy:hh:mm:ss.fffformat.
Excel (analyticsLibrary.Excel, Windows)
- Read and write Excel workbooks and individual worksheets as
DataSet/DataTable. - Target individual cells in an existing workbook.
Access (analyticsLibrary.Access, Windows)
- Open and query Access
.mdb/.accdbdatabase files via OleDb.
Hadoop (analyticsLibrary.Hadoop)
- Read data from Hadoop clusters via an ODBC connection string.
Repository Layout
.github/
workflows/
ci.yml # PR: build, test, pack, upload beta artifacts
release.yml # Tag/dispatch: build, test, pack, deploy to NuGet
src/
analyticsLibrary.Core/
analyticsLibrary.Algorithms/
analyticsLibrary.Statistics/
analyticsLibrary.Excel/
analyticsLibrary.Access/
analyticsLibrary.Hadoop/
analyticsLibrary/ # transition metapackage
analyticsLibraryInstaller/
release files/
tests/
analyticsLibrary.Core.Tests/
analyticsLibrary.Statistics.Tests/
analyticsLibrary.Algorithms.Tests/
docs/
epics/
epic-001-remodel.plan.md
Directory.Packages.props # centralized NuGet version management
Analytics Library.sln
Build and Test
Requirements: .NET 8 SDK or later.
# Restore dependencies
dotnet restore
# Build all projects (Release)
dotnet build -c Release
# Run all unit tests
dotnet test -c Release
# Pack NuGet packages into ./nupkgs
dotnet pack -c Release -o ./nupkgs
Release Process
Beta packages (pull requests)
Opening or updating a pull request against main triggers ci.yml. The workflow builds, tests, packs beta packages versioned 2.0.0-beta.pr-<pr>.<run>, and uploads them as workflow artifacts. Beta packages are only pushed to NuGet.org when the NUGET_API_KEY secret is available and the PR is not from a fork.
Release packages
Push a version tag (e.g. v2.0.0) or trigger release.yml manually via workflow dispatch. The workflow:
- Builds and tests the solution from the tagged commit.
- Packs all seven packages.
- Verifies all expected
.nupkgfiles are present. - Deploys to NuGet.org under the
nuget-releaseGitHub Environment, which requires explicit approval before the deploy step runs.
Store the NuGet API key as a repository secret named NUGET_API_KEY. Never commit credentials.
Contributing
- Keep packages focused. Core must not depend on Excel, Access, Hadoop, or provider-specific packages.
- Add tests for all new public logic before submitting a PR. Tests live in
tests/. - EPPlus is intentionally pinned to 5.8.14 (the last release under the PolyForm Noncommercial License). EPPlus 6+ requires a commercial license. Do not upgrade without a license review.
System.Data.OleDbandSystem.Data.Accessare Windows-only at runtime. Keep them isolated toanalyticsLibrary.ExcelandanalyticsLibrary.Access.- Package versions are centrally managed in
Directory.Packages.props. Add new dependencies there first.
Migration Guide
From analyticsLibrary 1.x to 2.0.0
Removed packages and namespaces
| Removed namespace | Removed package reference | Reason |
|---|---|---|
analyticsLibrary.dbObjects.sqlDb |
System.Data.SqlClient, EntityFramework, SimpleImpersonation |
SQL Server support removed |
analyticsLibrary.oracle |
Oracle.ManagedDataAccess.Core |
Oracle support removed |
analyticsLibrary.sas |
OO_DBMS.ADODBCoreWrapper |
SAS support removed |
analyticsLibrary.sybase |
— | Sybase support removed |
Steps to migrate
- Remove
analyticsLibrary1.x from your project. - Add the focused 2.x packages you need (see Installation).
- Update
usingdirectives to the new namespaces:analyticsLibrary.library→analyticsLibrary.CoreanalyticsLibrary.cs→analyticsLibrary.AlgorithmsanalyticsLibrary.statistics→analyticsLibrary.StatisticsanalyticsLibrary.excelLibrary→analyticsLibrary.ExcelanalyticsLibrary.access→analyticsLibrary.AccessanalyticsLibrary.hadoop→analyticsLibrary.Hadoop
- Remove any references to the deleted namespaces (
sqlDb,oracle,sas,sybase) and their package references listed above. - If you called
fromSasDate(), rename it tofromSasEpochDate().
Target framework: Projects must target net8.0 or later. netcoreapp3.1 is no longer supported.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on analyticsLibrary.Core:
| Package | Downloads |
|---|---|
|
analyticsLibrary
Transition metapackage that references all analyticsLibrary 2.x packages: Core, Algorithms, Statistics, Excel, Access, and Hadoop. Install individual packages for leaner dependency graphs. |
|
|
analyticsLibrary.Excel
Excel file read/write (.xlsx/.xls/.xlsb) for the analyticsLibrary family. Uses NPOI (Apache-2.0) for .xlsx/.xls reading and writing, and ExcelDataReader (MIT) for .xlsb reading. No commercial license required. Writing .xlsb is not supported. |
|
|
analyticsLibrary.Hadoop
Hadoop and ODBC data access helpers for the analyticsLibrary family. Provides helpers for reading data from Hadoop clusters via ODBC. Driver availability varies by operating system. |
|
|
analyticsLibrary.Algorithms
Search and sort algorithms for the analyticsLibrary family. Provides generic merge sort, quick sort, and binary search helpers for common .NET types including int, double, float, decimal, and string. |
|
|
analyticsLibrary.Statistics
Statistical helpers for the analyticsLibrary family. Provides extension methods for covariance, dot product, histogram, normalization, standard deviation, and variance over double and integer arrays. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-beta.pr-9.13 | 55 | 5/11/2026 |
| 2.0.0-beta.pr-9.12 | 62 | 5/11/2026 |
| 2.0.0-beta.pr-9.10 | 60 | 5/11/2026 |
| 2.0.0-beta.pr-6.6 | 72 | 5/10/2026 |
| 2.0.0-beta.pr-6.5 | 79 | 5/9/2026 |
| 2.0.0-beta.pr-6.4 | 72 | 5/9/2026 |
| 2.0.0-beta.pr-6.3 | 75 | 5/9/2026 |
| 2.0.0-beta.pr-6.2 | 72 | 5/6/2026 |
2.0.0: Remodeled from the monolithic analyticsLibrary package. SQL Server, Oracle, SAS, and Sybase provider support removed. Targets net8.0.