What to Expect in This Course

Get an overview of this course and learn why Rust is well-suited for data science.

Is Rust suitable for data science?

Many people consider Rust, or any other system language, unsuitable for data science. Rust is a strongly typed language, meaning that every value in Rust must be of a certain declared type, and there’s no flexibility in handling data. However, we might be surprised to see how far we can go without explaining anything to the compiler about the data we’re using.

The compiler uses hints embedded in our code to understand what data type it’s working with, without us explicitly telling it what to do.

However, when those hints fail, we must declare which types we are using. Let’s consider the following example:

let value1: f32 = "42.0".parse().expect("Not a number!");
let value2 = 2.0;
println!("{}", value1 / value2);

Rust is so strongly tied to data and data types that it feels natural to use it for data science.

However, when we hear about data science, we might think of R or Python instead. These languages do have most of the tools we need. But when it is time to port real-world models, problems start to arise.

When prototyping a concept, an interpreted language like Python is a faster solution than Rust. But, when dealing with real-world prototypes, C and Rust are the only languages that can handle the requirements for robustness, speed, and security.

It’s better to build a model entirely within one language instead of learning to model in one language and then exporting to another. That is why Rust has a bright future as a data science language.

What this course is about

Data science is a collection of multidisciplinary strategies used to extract new knowledge and insights from data. Its ultimate goal is to enable informed decision-making by discovering patterns and predicting outcomes. In this intermediate-level course, we’ll cover the data structures, algorithms, and strategies needed to interface Rust with real-world data.

Real-world data is simply data we might encounter in the real world. That is, it is not a made-up example. However, even when presenting real-world data, the results can seem contrived. For example, we could choose to use a simple data set instead of a harder one, which would not represent the real-world situation accurately. What we mean by real-world data then, is data that is unprocessed, uncontrived, and almost random.

This course is meant to provide us with good strategies for handling both simple and complex tasks.

We’ll start with a quick review of Rust data structures. Then we’ll look at algorithms with a focus on functional programming. Finally, we’ll learn five useful skills related to data and data science.

This course won’t delve too deep into data science, although we’ll see a lot of it. Rather, it is a much-needed introduction to data science from a Rust standpoint. In other words, this course provides the prerequisites for diving deeper into data science.

Who can take this course?

This is an intermediate Rust course, we assume you already know the basics of the Rust language. We provide some other introductory-level Rust courses, so make sure to check out our catalog if you need some quick review!

If you already know some Rust and want to know more about how to apply it to real-world data, this course is for you! We’ll cover multiple topics, from simple data structures to handling real-world data in Rust.

What we’ll review

To prepare for learning about data structures later in the course, we’ll spend some time on the fundamentals of Rust data structures—Arrays and Slices, Vectors and Strings, HashMaps, and HashSets. We’ll also review structs, which have a prominent role in Rust.

Then, we’ll spend a few lessons on Functional Programming in Rust, focusing specifically on Functions, Closures, Iterators, Higher-Order Functions. This section will lay the foundation for most of what will come in later on.

Fundamental data skills

This course covers the basic skills needed to handle data in Rust.

There are five skills that are fundamental. They are:

  1. Inputting data

Data is everywhere around us, but most of the time it is not readily accessible. Being able to not only collect this data but clean the data is a fundamental strategy for data science.

  1. Storing data

Once the data is collected, we need some strategies and methodology to store that data. This section deals mostly with databases.

  1. Serving data

Databases are great tools for storing and retrieving data. But many people do not know how to query databases to access the information they need. So we also need to know how to present the data in an understandable format. This section focuses on presenting over the internet.

  1. Analyzing data

This section covers both basic and advanced tools for data analysis. This section is not exhaustive. Covering everything there is to know about data analysis would require a course unto itself, and even then it would be incomplete. However, this section will impart a sound knowledge of the foundations of data analysis with Rust.

  1. Data visualization and storytelling

This section covers the basic tools of data visualization (data viz). It also presents some strategies for transforming dull charts into a meaningful source of insight through storytelling.

At the end of each section, there is at least one project that applies what we’ve learned into a real-world example.

So let’s dive in and begin learning how to use the secret powers of Rust for data science.