Skip to content

HazelnutParadise/insyra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Insyra

Test GolangCI-Lint Govulncheck Go version Go Report Card GoDoc MIT license

A next-generation data analysis library for Golang. Supports parallel processing, data visualization, and seamless integration with Python.

Official Website: https://insyra.hazelnut-paradise.com

logo

繁體中文版 README

Welcome to join Side Project Taiwan(Discord Server) for further discussions.

Fast, Lovely, Easy To Use.

The Insyra library is a dynamic and versatile tool designed for managing and analyzing data in Go. It offers a rich set of features for data manipulation, statistical calculations, data visualization, and more, making it an essential toolkit for developers handling complex data structures.

Note

If some functions or methods in the documentation are not working, it may be because the feature is not yet included in the latest release. Please refer to the documentation in the source code of the corresponding version in Releases.

Important

For any functions or methods not explicitly listed in Insyra documents, it indicates that the feature is still under active development. These experimental features might provide unstable results.

Please refer to our latest updates in Docs folder for more details.

We provide a mini Go IDE, Idensyra, which aims to make data analysis even more easier (though Insyra has already made it very easy).

Idensyra comes with Insyra pre-installed, and allows you to run Go code without installing Go environment!

Know more about Idensyra

Getting Started

For those new to Golang

Tip

Jump to Installation or Quick Example if you are familiar with Go.

  1. Download and install Golang from here.

  2. Set up your editor, we recommend using VSCode. Or even lighter weight, Idensyra.

  3. Open or create a folder for your project, and open it in the editor.

  4. Create a new project by running the following command:

    go mod init your_project_name
  5. Install Insyra:

    go get github.com/HazelnutParadise/insyra
  6. Create a new file, e.g., main.go, and write the following code:

    package main
    
    import (
        "fmt"
        "github.com/HazelnutParadise/insyra"
    )
    
    func main() {
        // Your code here
    }
  7. Run your project:

    go run main.go

Installation

  • To start using Insyra, install it with the following command:

    go get github.com/HazelnutParadise/insyra
  • Update Insyra to the latest version:

    go get -u github.com/HazelnutParadise/insyra

    or

    go get -u github.com/HazelnutParadise/insyra@latest

Quick Example

package main

import (
    "fmt"
    "github.com/HazelnutParadise/insyra"
)

func main() {
    dl := insyra.NewDataList(1, 2, 3, 4, 5)
    dl.Append(6)
    fmt.Println("DataList:", dl.Data())
    fmt.Println("Mean:", dl.Mean())
}

The DataList is the core structure in Insyra, enabling the storage, management, and analysis of dynamic data collections. It offers various methods for data manipulation and statistical analysis.

For a complete list of methods and features, please refer to the DataList Documentation.

The DataTable structure provides a tabular data representation, allowing for the storage and manipulation of data in a structured format. It offers methods for data filtering, sorting, and aggregation, making it a powerful tool for data analysis.

You can also convert between DataTables and CSV files with simply one line of code, enabling seamless integration with external data sources.

For a complete list of methods and features, please refer to the DataTable Documentation.

Packages

Insyra also provides several expansion packages, each focusing on a specific aspect of data analysis.

Provides statistical functions for data analysis, including skewness, kurtosis, and moment calculations.

Offers parallel processing capabilities for data manipulation and analysis. Allows you to execute any function and automatically wait for all goroutines to complete.

Provides a wrapper around the powerful github.com/go-echarts/go-echarts library, designed to simplify data visualization.

A visualization package based on github.com/gonum/plot. Fast and no need for Chrome. Even supports function plot.

Provides a super simple and intuitive way to generate linear programming (LP) models and save them as .lp files. It supports setting objectives, adding constraints, defining variable bounds, and specifying binary or integer variables.

Fully automatic linear programming (LP) solver using GLPK.

Work with Excel and CSV files. Such as convert CSV to Excel.

Execute Python code in Go without manually installing Python environment and dependencies. Allows passing variables between Go and Python.

Advanced Usage

Beyond basic usage, Insyra provides extensive capabilities for handling different data types and performing complex statistical operations. Explore more in the detailed documentation.

Contributing

Contributions are welcome! You can contribute to Insyra by:

  • Issues: Reporting issues or suggesting new features.
  • Pull Requests: Submitting pull requests to enhance the library.
  • Discussions: Sharing your feedback and ideas to improve the project.

Contributors

contributors

License

Insyra is licensed under the MIT License. See the LICENSE file for more information.