Skip to content

Add Data Save Functionality #14

Closed
Closed

Description

@kylemath

buttons to save csv files

Activity

  1. korymath commented on Dec 2, 2019

    @korymath
    Collaborator

    Here is the easy way to do it:
    https://github.com/urish/eeg-explorer/blob/master/src/app/recorder/recorder.component.ts#L41

    https://github.com/urish/eeg-explorer/blob/90d5b730a4331dcf40438959a23c7ece99551f04/src/app/recorder/recorder.component.ts#L41

    This requires the whole data set to be stored in the browser.

    The other option, and the one that might reduce latency, is to publish the data to a Pub/Sub service, or a server that is running to store the data asynchronously from the client code.

    Store to bigtable: https://cloud.google.com/bigtable/docs/samples-nodejs-hello

  2. kylemath commented on Dec 3, 2019

    @kylemath
    OwnerAuthor

    question becomes, what to record,
    then the question becomes, let the user decide,
    so have a chart of raw data
    then a toggle for filter with input points for cutoffs
    they can record at any time and record what is currently being plotted through the pipes

    then we have spectra, that is probably a scroll down, but it is useful to watch the spectra and raw data coincidentally and view the changes as filters are introduced,

    then the spectra has options to modify the parameters of the fft, and whatever is being shown can be recorded

    Then we divide into 5 bins of frequency and show the bar graphs, those can be recorded

    lets start with the first one, raw data

  3. self-assigned this
    on Dec 5, 2019
  4. korymath commented on Dec 5, 2019

    @korymath
    Collaborator

    I will work on the minimum viable product of a client saving their data in the front end. We do not want to store THIER data on our servers, so we can keep it all client side for now.

  5. changed the title [-]Data recording options[/-] [+]Data Recording and Saving[/+] on Dec 6, 2019
  6. changed the title [-]Data Recording and Saving[/-] [+]Add Data Save Functionality[/+] on Dec 6, 2019
  7. korymath commented on Dec 6, 2019

    @korymath
    Collaborator

    Building a csv data array and then downloading with: https://www.npmjs.com/package/react-csv

  8. korymath commented on Dec 12, 2019

    @korymath
    Collaborator

    StreamSaver: https://www.npmjs.com/package/streamsaver

    window.onunload = () => {
      writableStream.abort()
      // also possible to call abort on the writer you got from `getWriter()`
      writer.abort()
    }
     
    window.onbeforeunload = evt => {
      if (!done) {
        evt.returnValue = `Are you sure you want to leave?`;
      }
    }
    
  9. korymath commented on Dec 24, 2019

    @korymath
    Collaborator

    This can be closed with the merging of #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions