Agnes

Build Status Documentation Join the chat at https://gitter.im/agnes-rs/community

agnes is a data wrangling library for Rust.

Some useful links: * Guide * API Documentation * Examples * Gitter chatroom

Overview

agnes is a statically-typed high-performance data processing library for the Rust programming language. It provides utilities for data loading, preprocessing, aggregation, annotation, and serialization. The primary goal of agnes is to to provide functionality to help in the development of robust, efficient, readable applications for your data preprocessing tasks.

Features

Design Principles

agnes was designed with the following general principles in mind:

Usage

To use, add this this to your Cargo.toml:

toml [dependencies] agnes = "0.3"

and this to your crate root:

rust extern crate agnes;

Example

As an simple example, let's build an application that reads in a data set, and displays it. A more complete example illustrating much more agnes functionality can be found in the guide here.

This example loads specific fields from a country-by-country data file, and shows off the table definition format, source specification format, and loading-from-URI functionality. This example can also be found here.

```rust

[macro_use]

extern crate agnes;

use agnes::source::csv::loadcsvfrom_uri;

// specify the GDP table (only the fields we are concerned about) tablespace![ table gdp { CountryName: String, CountryCode: String, Gdp2015: f64, } ];

fn main() { // specify the source location for our GDP fields let gdp_spec = spec![ fieldname gdp::CountryName = "Country Name"; fieldname gdp::CountryCode = "Country Code"; fieldname gdp::Gdp2015 = "2015"; ];

// load the CSV file from a URI
let gdp_view =
    load_csv_from_uri("https://wee.codes/data/gdp.csv", gdp_spec).expect("CSV loading failed.");

// print the DataView
println!("{}", gdp_view);

} ```

Changes and Future Plans

License

This work is licensed under the MIT Licence.