SlideShare a Scribd company logo
A React-Based Library
Kristina Robinson
Software Engineering Manager, InfluxData
January 2021
Visualize Your
Time-Stamped Data
Using Giraffe
© 2021 InfluxData. All rights reserved.
2
•
•
© 2021 InfluxData. All rights reserved.
3
•
•
•
•
•
•
•
▪
▪
▪
© 2021 InfluxData. All rights reserved.
4
•
const fluxResultCSV =
`#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTi
me:RFC3339,double,string,string,string,string
#group,false,false,true,true,false,false,true,true,true,true
#default,_result,,,,,,,,,
,result,table,_start,_stop,_time,_value,_field,_measurement,exa
mple,location
,,0,2020-03-25T20:58:15.731129Z,2020-04-24T20:58:15.731129Z,202
0-04-03T18:31:33.95Z,29.9,value,temperature,index.html,browser
,,0,2020-03-25T20:58:15.731129Z,2020-04-24T20:58:15.731129Z,202
0-04-03T18:55:23.863Z,28.7,value,temperature,index.html,browser
,,0,2020-03-25T20:58:15.731129Z,2020-04-24T20:58:15.731129Z,202
0-04-03T19:50:52.357Z,15,value,temperature,index.html,browser
© 2021 InfluxData. All rights reserved.
5
© 2021 InfluxData. All rights reserved.
6
© 2021 InfluxData. All rights reserved.
7
© 2021 InfluxData. All rights reserved.
8
© 2021 InfluxData. All rights reserved.
9
© 2021 InfluxData. All rights reserved.
10
© 2021 InfluxData. All rights reserved.
11
© 2021 InfluxData. All rights reserved.
12
© 2021 InfluxData. All rights reserved.
13
© 2021 InfluxData. All rights reserved.
14
•
•
•
•
•
•
•
•
© 2021 InfluxData. All rights reserved.
15
const body = { query: query,
dialect: { header: true,
delimiter: ',',
quoteChar: '"',
commentPrefix: "#",
annotations: ["datatype","group","default"]},
type: 'flux'}
const headers = new Headers()
headers.append('Authorization', `Token ${Constants.Influx.TOKEN}`)
headers.append('Content-Type', 'application/json')
var request = new
Request(`${Constants.Influx.URL}/api/v2/query?org=${Constants.Influx.ORG}`,
method: 'POST',
headers: headers,
body: JSON.stringify(body)})
© 2021 InfluxData. All rights reserved.
16
const { InfluxDB, flux } = require('@influxdata/influxdb-client')
// vars to connect to bucket in influxdb
const baseURL = process.env.INFLUX_URL // url of your cloud instance
const influxToken = process.env.INFLUX_TOKEN; // all access token from the UI
const orgID = process.env.ORG_ID // export your org id;
const bucket = process.env.BUCKET_NAME //export the name of your bucket
// connect to influxdb
const influxDB = new InfluxDB({ url: baseURL, token: influxToken })
const queryApi = influxDB.getQueryApi(orgID)
let clientQuery = flux``+query
queryApi.queryLines(clientQuery, {
next(line) { csv = `${csv}${line}n`; },
complete() { res.end(JSON.stringify({ csv: csv })) }, })
© 2021 InfluxData. All rights reserved.
17
•
•
// fluxResultsCSV is annotated CSV
const dataFromFlux = fromFlux(fluxResultCSV)
const config = {
table: dataFromFlux.table,
layers: [lineLayer],
}
OR
const config = {
fluxResponse,
layers: [lineLayer],
}
•
const lineLayer = {
type: "line",
x: "_time",
y: "_value",
}
© 2021 InfluxData. All rights reserved.
18
•
•
•
© 2021 InfluxData. All rights reserved.
19
• Settings Templates
• Step 2
• Lookup
•
•
• Data Dashboards Speedtest Dashboard
•
© 2021 InfluxData. All rights reserved.
20
Q & A
© 2021 InfluxData. All rights reserved.
22
•
•
•
•
•
© 2021 InfluxData. All rights reserved.
23
•
•
•
•
•
•
© 2021 InfluxData. All rights reserved.
24
•
•
•
•
Thank You

More Related Content

ODP
SEKTOR NG AGRIKULTURA
PPTX
3kakapusan
PPTX
QUARTER 1-WEEK 3-MUSIC AND ARTS-MATATAG.pptx
PPTX
SONG GAME for adventist youth program.pptx
PPTX
PAGSULAT NG AWITING BAYAN-AWTPUT 1.pptx
PPTX
Sustainable Development
PPT
News Writing Basics
PPTX
Infographics: Functional, Expository and Persuasive Texts
SEKTOR NG AGRIKULTURA
3kakapusan
QUARTER 1-WEEK 3-MUSIC AND ARTS-MATATAG.pptx
SONG GAME for adventist youth program.pptx
PAGSULAT NG AWITING BAYAN-AWTPUT 1.pptx
Sustainable Development
News Writing Basics
Infographics: Functional, Expository and Persuasive Texts

What's hot (20)

DOCX
G9 dll (kabanata 16 23)
PPTX
GRAMMATICAL-SIGNALS-POWERPOINT-PRESENTATION-IN-ENGLISH-8-edited (1).pptx
PPTX
Tips in Delivering an Impromptu Speech
DOCX
Cause and effect relationships
PPSX
Campus Journalism - News Writing
PPTX
MODAL VERBS
PPTX
ARALIN 1 AKO AY PITONG TAONG GULANG.pptx
DOCX
Declamation Rubric for Grade 10
DOCX
DLL-_Grade-7-November-2022.docx
PDF
03- st louis-reviewer
PPTX
Filipino 8 Uri ng Pangatnig
PPTX
Cite-Evidence-to-Support-a-General-Statement-GRADE-7-BUBOS-CHRISTINE.pptx
PDF
425023319-Copyreading-Filipino
DOCX
Transition words lesson plan
PPTX
PAGSUSULIT-3.pptx
DOCX
Daily Learning Log intended for Grade 8
DOC
Grade 9 english dll q2 q4
PPTX
FILIPINO 10_Suring-basa.pptx
PPTX
Social-Moral-and-Economic-Issues.pptx
PPTX
ARALIN 1.8 PAGSULAT NG TALATA.pptx
G9 dll (kabanata 16 23)
GRAMMATICAL-SIGNALS-POWERPOINT-PRESENTATION-IN-ENGLISH-8-edited (1).pptx
Tips in Delivering an Impromptu Speech
Cause and effect relationships
Campus Journalism - News Writing
MODAL VERBS
ARALIN 1 AKO AY PITONG TAONG GULANG.pptx
Declamation Rubric for Grade 10
DLL-_Grade-7-November-2022.docx
03- st louis-reviewer
Filipino 8 Uri ng Pangatnig
Cite-Evidence-to-Support-a-General-Statement-GRADE-7-BUBOS-CHRISTINE.pptx
425023319-Copyreading-Filipino
Transition words lesson plan
PAGSUSULIT-3.pptx
Daily Learning Log intended for Grade 8
Grade 9 english dll q2 q4
FILIPINO 10_Suring-basa.pptx
Social-Moral-and-Economic-Issues.pptx
ARALIN 1.8 PAGSULAT NG TALATA.pptx
Ad

Similar to Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Giraffe Library (20)

PPTX
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
PDF
Russ Savage [Ngrok] | InfluxDB QuickStart | InfluxDays NA 2021
PDF
InfluxDB 101 - Concepts and Architecture | Michael DeSa | InfluxData
PDF
Virtual training intro to InfluxDB - June 2021
PDF
Intro to InfluxDB
PPTX
Barbara Nelson [InfluxData] | How Can I Put That Dashboard in My App? | Influ...
PPTX
Tim Hall [InfluxData] | InfluxDB Roadmap | InfluxDays Virtual Experience Lond...
PDF
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData
PPTX
Paul Dix [InfluxData] | InfluxDays Keynote: Future of InfluxDB | InfluxDays N...
PDF
InfluxDB Live Product Training
PPTX
Intro to InfluxDB 2.0 and Your First Flux Query by Sonia Gupta
PPTX
InfluxDB 101 – Concepts and Architecture by Michael DeSa, Software Engineer |...
PDF
Time Series Tech Stack for the IoT Edge
PDF
Best Practices: How to Analyze IoT Sensor Data with InfluxDB
PDF
Intro to Time Series
PDF
Timeseries - data visualization in Grafana
PDF
Introduction to InfluxDB 2.0 & Your First Flux Query by Sonia Gupta, Develope...
PPTX
InfluxDB Roadmap: What’s New and What’s Coming
PDF
Devoxx france 2015 influx db
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Russ Savage [Ngrok] | InfluxDB QuickStart | InfluxDays NA 2021
InfluxDB 101 - Concepts and Architecture | Michael DeSa | InfluxData
Virtual training intro to InfluxDB - June 2021
Intro to InfluxDB
Barbara Nelson [InfluxData] | How Can I Put That Dashboard in My App? | Influ...
Tim Hall [InfluxData] | InfluxDB Roadmap | InfluxDays Virtual Experience Lond...
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData
Paul Dix [InfluxData] | InfluxDays Keynote: Future of InfluxDB | InfluxDays N...
InfluxDB Live Product Training
Intro to InfluxDB 2.0 and Your First Flux Query by Sonia Gupta
InfluxDB 101 – Concepts and Architecture by Michael DeSa, Software Engineer |...
Time Series Tech Stack for the IoT Edge
Best Practices: How to Analyze IoT Sensor Data with InfluxDB
Intro to Time Series
Timeseries - data visualization in Grafana
Introduction to InfluxDB 2.0 & Your First Flux Query by Sonia Gupta, Develope...
InfluxDB Roadmap: What’s New and What’s Coming
Devoxx france 2015 influx db
Ad

More from InfluxData (20)

PPTX
Announcing InfluxDB Clustered
PDF
Best Practices for Leveraging the Apache Arrow Ecosystem
PDF
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
PDF
Power Your Predictive Analytics with InfluxDB
PDF
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
PDF
Build an Edge-to-Cloud Solution with the MING Stack
PDF
Meet the Founders: An Open Discussion About Rewriting Using Rust
PDF
Introducing InfluxDB Cloud Dedicated
PDF
Gain Better Observability with OpenTelemetry and InfluxDB
PPTX
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
PDF
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
PPTX
Introducing InfluxDB’s New Time Series Database Storage Engine
PDF
Start Automating InfluxDB Deployments at the Edge with balena
PDF
Understanding InfluxDB’s New Storage Engine
PDF
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
PPTX
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
PDF
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
PDF
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
PDF
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
PDF
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Announcing InfluxDB Clustered
Best Practices for Leveraging the Apache Arrow Ecosystem
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
Power Your Predictive Analytics with InfluxDB
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
Build an Edge-to-Cloud Solution with the MING Stack
Meet the Founders: An Open Discussion About Rewriting Using Rust
Introducing InfluxDB Cloud Dedicated
Gain Better Observability with OpenTelemetry and InfluxDB
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
Introducing InfluxDB’s New Time Series Database Storage Engine
Start Automating InfluxDB Deployments at the Edge with balena
Understanding InfluxDB’s New Storage Engine
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
MYSQL Presentation for SQL database connectivity
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Cloud computing and distributed systems.
PPT
Teaching material agriculture food technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
KodekX | Application Modernization Development
Encapsulation_ Review paper, used for researhc scholars
MYSQL Presentation for SQL database connectivity
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Cloud computing and distributed systems.
Teaching material agriculture food technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
The AUB Centre for AI in Media Proposal.docx
Review of recent advances in non-invasive hemoglobin estimation
Spectral efficient network and resource selection model in 5G networks
Building Integrated photovoltaic BIPV_UPV.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Digital-Transformation-Roadmap-for-Companies.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Chapter 3 Spatial Domain Image Processing.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
KodekX | Application Modernization Development

Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Giraffe Library

  • 1. A React-Based Library Kristina Robinson Software Engineering Manager, InfluxData January 2021 Visualize Your Time-Stamped Data Using Giraffe
  • 2. © 2021 InfluxData. All rights reserved. 2 • •
  • 3. © 2021 InfluxData. All rights reserved. 3 • • • • • • • ▪ ▪ ▪
  • 4. © 2021 InfluxData. All rights reserved. 4 • const fluxResultCSV = `#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTi me:RFC3339,double,string,string,string,string #group,false,false,true,true,false,false,true,true,true,true #default,_result,,,,,,,,, ,result,table,_start,_stop,_time,_value,_field,_measurement,exa mple,location ,,0,2020-03-25T20:58:15.731129Z,2020-04-24T20:58:15.731129Z,202 0-04-03T18:31:33.95Z,29.9,value,temperature,index.html,browser ,,0,2020-03-25T20:58:15.731129Z,2020-04-24T20:58:15.731129Z,202 0-04-03T18:55:23.863Z,28.7,value,temperature,index.html,browser ,,0,2020-03-25T20:58:15.731129Z,2020-04-24T20:58:15.731129Z,202 0-04-03T19:50:52.357Z,15,value,temperature,index.html,browser
  • 5. © 2021 InfluxData. All rights reserved. 5
  • 6. © 2021 InfluxData. All rights reserved. 6
  • 7. © 2021 InfluxData. All rights reserved. 7
  • 8. © 2021 InfluxData. All rights reserved. 8
  • 9. © 2021 InfluxData. All rights reserved. 9
  • 10. © 2021 InfluxData. All rights reserved. 10
  • 11. © 2021 InfluxData. All rights reserved. 11
  • 12. © 2021 InfluxData. All rights reserved. 12
  • 13. © 2021 InfluxData. All rights reserved. 13
  • 14. © 2021 InfluxData. All rights reserved. 14 • • • • • • • •
  • 15. © 2021 InfluxData. All rights reserved. 15 const body = { query: query, dialect: { header: true, delimiter: ',', quoteChar: '"', commentPrefix: "#", annotations: ["datatype","group","default"]}, type: 'flux'} const headers = new Headers() headers.append('Authorization', `Token ${Constants.Influx.TOKEN}`) headers.append('Content-Type', 'application/json') var request = new Request(`${Constants.Influx.URL}/api/v2/query?org=${Constants.Influx.ORG}`, method: 'POST', headers: headers, body: JSON.stringify(body)})
  • 16. © 2021 InfluxData. All rights reserved. 16 const { InfluxDB, flux } = require('@influxdata/influxdb-client') // vars to connect to bucket in influxdb const baseURL = process.env.INFLUX_URL // url of your cloud instance const influxToken = process.env.INFLUX_TOKEN; // all access token from the UI const orgID = process.env.ORG_ID // export your org id; const bucket = process.env.BUCKET_NAME //export the name of your bucket // connect to influxdb const influxDB = new InfluxDB({ url: baseURL, token: influxToken }) const queryApi = influxDB.getQueryApi(orgID) let clientQuery = flux``+query queryApi.queryLines(clientQuery, { next(line) { csv = `${csv}${line}n`; }, complete() { res.end(JSON.stringify({ csv: csv })) }, })
  • 17. © 2021 InfluxData. All rights reserved. 17 • • // fluxResultsCSV is annotated CSV const dataFromFlux = fromFlux(fluxResultCSV) const config = { table: dataFromFlux.table, layers: [lineLayer], } OR const config = { fluxResponse, layers: [lineLayer], } • const lineLayer = { type: "line", x: "_time", y: "_value", }
  • 18. © 2021 InfluxData. All rights reserved. 18 • • •
  • 19. © 2021 InfluxData. All rights reserved. 19 • Settings Templates • Step 2 • Lookup • • • Data Dashboards Speedtest Dashboard •
  • 20. © 2021 InfluxData. All rights reserved. 20
  • 21. Q & A
  • 22. © 2021 InfluxData. All rights reserved. 22 • • • • •
  • 23. © 2021 InfluxData. All rights reserved. 23 • • • • • •
  • 24. © 2021 InfluxData. All rights reserved. 24 • • • •