Home / Companies / Couchbase / Blog / Post Details
Content Deep Dive

Graph Time Series Data From the Comfort of Your Terminal

Blog post from Couchbase

Post Details
Company
Date Published
Author
Laurent Doguin, Developer Advocate, Couchbase
Word Count
1,860
Language
English
Hacker News Points
-
Summary

The author of the text has successfully imported temperature data for several cities over the years into Couchbase, transformed it into time series, and plotted the data using a terminal plotting library called youplot. The author used the `UNNEST` function to transform each document in the dataset into individual documents with separate fields for date, city, and temperature. They then used the `_timeseries` function to filter the data by city and time range, and the `ARRAY_AGG` function to aggregate the temperatures for each city. The author also created a .nu file that defines a reusable function called `tempGraph` that takes a time range and an array of cities as input and generates a plot of the temperature data for those cities over the specified time period.