timeseries-url-indexed.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. const config = `
  2. <View>
  3. <Header value="Time Series from CSV"
  4. style="font-weight: normal"/>
  5. <TimeSeriesLabels name="label" toName="ts">
  6. <Label value="Run" background="#5b5"/>
  7. <Label value="Walk" background="#55f"/>
  8. </TimeSeriesLabels>
  9. <TimeSeries name="ts" valueType="url"
  10. timeColumn="time" value="$csv"
  11. sep="," overviewChannels="velocity">
  12. <Channel column="velocity" strokeColor="#1f77b4"/>
  13. <Channel column="acceleration" strokeColor="#ff7f0e"/>
  14. </TimeSeries>
  15. </View>
  16. `;
  17. const data = {
  18. csv: "https://htx-pub.s3.amazonaws.com/datasets/timeseries/time-series-velocity-acceleration.csv",
  19. };
  20. const result = [
  21. {
  22. value: {
  23. start: 4,
  24. end: 23,
  25. instant: false,
  26. timeserieslabels: ["Run"],
  27. },
  28. id: "Oek-tTCZ6_",
  29. from_name: "label",
  30. to_name: "ts",
  31. type: "timeserieslabels",
  32. origin: "manual",
  33. },
  34. {
  35. value: {
  36. start: 52,
  37. end: 69,
  38. instant: false,
  39. timeserieslabels: ["Walk"],
  40. },
  41. id: "U0S2_cORxv",
  42. from_name: "label",
  43. to_name: "ts",
  44. type: "timeserieslabels",
  45. origin: "manual",
  46. },
  47. ];
  48. const title = "TimeSeries csv loaded by url with index column";
  49. module.exports = { config, data, result, title };