From the course: Rust for Data Engineering
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Simple charting of data structures in Rust - Rust Tutorial
From the course: Rust for Data Engineering
Simple charting of data structures in Rust
- [Instructor] Okay, in today's coding session, I'm going to demonstrate how to visualize data using this rasciigraph library in Rust. You can see here from the official documentation, pretty straightforward, you put in a vector, and it's able to with a few configuration options, print out a nice little ASCII graph here. So if I go over to my code here and we look at this main here, I again go to the dependencies and add this. Next up, what I do is I configure a plot and a Config. What I'm going to do in this particular example is look at several cities. So Lisbon, Madrid, Paris, Berlin, Copenhagen, Stockholm, and Moscow. And I create a vector that shows the distance from each of those cities. So Lisbon to Lisbon is zero Lisbon to Madrid is 502 kilometers. Lisbon to Paris is 1,053 kilometers, and so on, and so on. Now what I do is I print this all out using this library and it's pretty straightforward to have it work.…
Contents
-
-
-
-
Analyzing UFC fighter network using graph centrality in Rust4m 12s
-
(Locked)
Storing unique fruits using HashSet in Rust3m 18s
-
(Locked)
Maintaining sorted and unique fruits using BTreeSet in Rust2m 35s
-
(Locked)
Creating a fig-priority fruit salad using BinaryHeap in Rust2m 42s
-
(Locked)
PageRank algorithm for sports data4m 12s
-
(Locked)
Showing shortest path with Dijkstra3m 27s
-
(Locked)
Detecting strongly connected components: A deep dive into Kosaraju's algorithm4m 14s
-
(Locked)
Simple charting of data structures in Rust2m 26s
-
-
-
-
-
-
-
-
-
-