Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tidepool/data-tools

Package Overview
Dependencies
Maintainers
6
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tidepool/data-tools

Export data from the Tidepool API to various file formats

  • 2.4.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
Created
Source

@tidepool/data-tools

Node streams to work with Tidepool API data

Installation

$ npm install @tidepool/data-tools

Example

import TidepoolDataTools from '@tidepool/data-tools';

// Set up the processing stream
const processingStream = readStream
      .pipe(TidepoolDataTools.jsonParser())
      .pipe(TidepoolDataTools.tidepoolProcessor());

// Now attach multiple parallel output streams
processingStream
        .pipe(TidepoolDataTools.xlsxStreamWriter(xlsxStream));

processingStream
        .pipe(someOtherOutputStream);

Methods

TidepoolDataTools.jsonParser()

Convenience function to return a JSONStream.parse('*').
See also the JSONStream NPM Module.

TidepoolDataTools.tidepoolProcessor()

Returns a through stream that processes the JSON Object data according the the config.

TidepoolDataTools.xlsxStreamWriter(outputStream)

Writes an xlsx Workbook to outputStream with different Worksheets according to the config.

Command Line Usage

@tidepool/data-tools includes a command-line tool

Install globally:

$ npm i -g @tidepool/data-tools && tidepool-data-tools --help
Usage: tidepool-data-tools [options] [command]

Options:
  -V, --version      output the version number
  -h, --help         output usage information

Commands:
  convert [options]  Convert data between different formats

$ tidepool-data-tools convert --help
Usage: tidepool-data-tools [options]

Options:
  -V, --version                            output the version number
  -i, --input-tidepool-data <file>         csv, xlsx, or json file that contains Tidepool data
  -c, --config <file>                      a JSON file that contains the field export configuration
  --salt <salt>                            salt used in the hashing algorithm (default: "no salt specified")
  -o, --output-data-path <path>            the path where the data is exported (default: "./example-data/export")
  -f, --output-format <format>             the path where the data is exported (default: ["all"])
  --start-date [date]                      filter data by startDate
  --end-date [date]                        filter data by endDate
  --merge-wizard-data                      option to merge wizard data with bolus data. Default is true
  --filterByDatesExceptUploadsAndSettings  upload and settings data can occur before and after start and end dates, so include ALL upload and settings data in export
  -h, --help                               output usage information

License

Licensed under the BSD-2-Clause License

FAQs

Package last updated on 12 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc