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
Welcome to join Side Project Taiwan(Discord Server) for further discussions.
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!
Tip
Jump to Installation or Quick Example if you are familiar with Go.
-
Download and install Golang from here.
-
Set up your editor, we recommend using VSCode. Or even lighter weight, Idensyra.
-
Open or create a folder for your project, and open it in the editor.
-
Create a new project by running the following command:
go mod init your_project_name
-
Install Insyra:
go get github.com/HazelnutParadise/insyra
-
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 }
-
Run your project:
go run main.go
-
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
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.
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.
Beyond basic usage, Insyra provides extensive capabilities for handling different data types and performing complex statistical operations. Explore more in the detailed documentation.
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.
Insyra is licensed under the MIT License. See the LICENSE file for more information.