A high-performance CSV analysis tool built with Rust and WebAssembly. This project provides statistical analysis and visualization capabilities for CSV data directly in the browser.
- Fast CSV parsing using Rust and WebAssembly
- Linear regression analysis
- Interactive data visualization
- Basic statistical calculations
- Browser-based processing (no server required)
- Pure vanilla JavaScript implementation
Upload any CSV file and:
- Select columns for analysis
- View basic statistics (mean, median, standard deviation)
- See linear regression results
- Visualize data with interactive charts
- Clone the repository:
git clone https://github.com/jeffasante/rustviz
cd rustviz
- Build the WebAssembly module:
cargo install wasm-pack
wasm-pack build --target web
- Serve the project:
# Using Python
python -m http.server 8000
# Or using Node.js
npx http-server
- Open
http://localhost:8000
in your browser
rustviz/
├── Cargo.toml # Rust dependencies and configuration
├── pkg # WebAssembly modules and JavaScript bindings
│ └── (*.wasm, *.js) # Wasm packages
├── src/
│ └── lib.rs # Rust implementation
├── www/
│ ├── index.html # Web interface
│ ├── style.css # Styling
│ └── main.js # JavaScript implementation
└── README.md
- Upload a CSV file using the file input
- Select X and Y columns for analysis
- View statistics and visualization
- Download or export results as needed
x,y
1,2.1
2,4.2
3,5.9
4,8.1
5,9.8
// Parse CSV data
parse_csv(csv_content: &str) -> Result<JsValue, JsValue>
// Get numerical values from a column
get_column_values(csv_content: &str, column_name: &str) -> Result<Vec<f64>, JsValue>
// Calculate basic statistics
calculate_stats(values: &[f64]) -> Result<JsValue, JsValue>
// Perform linear regression
linear_regression(x_values: &[f64], y_values: &[f64]) -> Result<JsValue, JsValue>
// Complete analysis
analyze_data(x_column: &str, y_column: &str, csv_content: &str) -> Result<JsValue, JsValue>
- Duplicate the project and create your own copy.
- Create a dedicated branch for your feature (
git checkout -b feature/new-feature
). - Save your changes (
git commit -m 'Add new functionality'
). - Push to the branch (
git push origin feature/new-feature
) - Open a pull request to integrate your work
This project is licensed under the Apache 2.0 License - see the LICENSE file for details
- wasm-bindgen for Rust/WebAssembly bindings
- Chart.js for visualization
- Rust CSV crate for CSV parsing
- Add support for more statistical analyses
- Implement data export features
- Add more visualization options
- Support for larger datasets
- Column type detection
- Custom CSV delimiter support
- Support other files.
For support, please open an issue in the GitHub repository or contact Email