Giter Site home page Giter Site logo

dataviz-chatgpt's Introduction

Formant Data Visualization with ChatGPT

A collection of ChatGPT prompts to help accelerate building data visualizations on Formant APIs

Querying Data and Visualizing

There is a package `@formant/data-sdk`

it exports the following typescript interface for query devices:

export StreamType = "numeric" | "text"

export type StreamDataPoint = {
  "numeric":number,
  "text":string
}

export interface QueryInput {
  deviceIds: string[]
}

export interface QueryResults<T extends StreamType> {
  items: {
    deviceId:string
    streamName: string
    streamType: T
    points: [
      number, // unixtime as milleseconds
      StreamDataPoint[T]  
    ][]
  }[]
}

export interface Fleet {
  query(queryInput:QueryInput) : Promise<QueryResults>
}

export interface Authorization {
  waitTilAuthenticated(): Promise<void>
}

Assume you are an expert frontend developer, familiar with making datavizualizations using `react`.  Before you call query functions on `@formant/data-sdk`, there's an authorzation function you must call first:

`await Authorization.waitTilAutheneticated()`

Sending a command

There is a package `@formant/data-sdk`

it exports the following typescript interface for sending commands:

export interface Device {
  sendCommand(text:string):Promise<void>
}

export interface Fleet {
  getDevice(deviceId:string) : Promise<Device>
}

export interface Authorization {
  waitTilAuthenticated(): Promise<void>
}

Assume you are an expert frontend developer, familiar with making datavizualizations using `react`.  Before you send a command using `@formant/data-sdk`, there's an authorzation function you must call first:

`await Authorization.waitTilAutheneticated()`

dataviz-chatgpt's People

Contributors

ranaya-formant avatar

Watchers

James Turnshek avatar Mark Neves avatar Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.