# PyN2
<div align="center">
<img src="https://raw.githubusercontent.com/leomariga/pyn2/main/doc/logo.jpg"><br>
</div>
**PyN2** is a Python library (based on [OpenMDAO](https://github.com/OpenMDAO/OpenMDAO) project), designed to easily create dynamic **n-squared (N²) charts**. N² charts are essential in systems engineering and project management to visualize and manage complex interactions between components, subsystems, or processes. PyN2 provides an intuitive API to generate customizable N² diagrams.
## Features
- Generate n² charts to visualize component interactions
- Customizable labels for rows and columns
- Highlight important relationships and dependencies
- Export charts in various formats (e.g., SVG, HTML)
- Easy-to-use API with minimal setup
## Use Cases
- Systems engineering: Interface mapping and interaction management
- Project management: Task dependencies and relationship tracking
- Complex system design: Visualizing module communications and dependencies
## Installation
```bash
pip install pyn2
```
## Dependencies
PyN2 relies on the following dependencies, which are managed through Poetry:
```toml
[tool.poetry.dependencies]
python = "^3.12"
openmdao = "^3.34.2"
```
## Usage
Run the following code to generate the `gen_diag.html` file.
```python
from pyn2.chart import Element, Group, N2
n2 = N2('test_chart')
s_dev = Group('Software_development')
e_analyze = Element('Analyze')
e_code = Element('Code')
e_build = Element('Build')
e_deploy = Element('Deploy')
t_vnv = Group('Software_vnv')
e_review = Element('Review')
e_test = Element('Test')
e_analyze.connect_to(e_code)
e_code.connect_to(e_build)
e_code.connect_to(e_review)
e_review.connect_to(e_analyze)
e_build.connect_to(e_test)
e_test.connect_to(e_deploy)
e_test.connect_to(e_analyze)
s_dev.add_element(e_analyze)
s_dev.add_element(e_code)
s_dev.add_element(e_build)
s_dev.add_element(e_deploy)
t_vnv.add_element(e_review)
t_vnv.add_element(e_test)
n2.add_group(s_dev)
n2.add_group(t_vnv)
n2.generate_report()
```
And produce the following chart:
<div align="center">
<img src="https://raw.githubusercontent.com/leomariga/pyn2/main/doc/example.gif"><br>
</div>
## Contributing is awesome!
See [CONTRIBUTING](https://github.com/leomariga/pyn2/blob/main/CONTRIBUTING.md)
## Contact
Developed with :heart: by the internet
Mainteiner: [Leonardo Mariga](https://github.com/leomariga)
Did you like it? Remember to click on :star2: button.
Raw data
{
"_id": null,
"home_page": "https://github.com/leomariga/pyn2",
"name": "pyn2",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": "N2 chart, Visualization, Data Visualization, Charts, Graphs, Python Chart Library, Plotting, Data Analysis, Charting Library, Scientific Computing, System Engineering",
"author": "Leonardo Mariga",
"author_email": "leomariga@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b9/e2/10385cfbc6e981f6cafc29de590f0f25dee1bd21b7b593480b892a60678b/pyn2-0.1.0.tar.gz",
"platform": null,
"description": "# PyN2\n\n<div align=\"center\">\n <img src=\"https://raw.githubusercontent.com/leomariga/pyn2/main/doc/logo.jpg\"><br>\n</div>\n\n**PyN2** is a Python library (based on [OpenMDAO](https://github.com/OpenMDAO/OpenMDAO) project), designed to easily create dynamic **n-squared (N\u00b2) charts**. N\u00b2 charts are essential in systems engineering and project management to visualize and manage complex interactions between components, subsystems, or processes. PyN2 provides an intuitive API to generate customizable N\u00b2 diagrams.\n\n## Features\n- Generate n\u00b2 charts to visualize component interactions\n- Customizable labels for rows and columns\n- Highlight important relationships and dependencies\n- Export charts in various formats (e.g., SVG, HTML)\n- Easy-to-use API with minimal setup\n\n## Use Cases\n- Systems engineering: Interface mapping and interaction management\n- Project management: Task dependencies and relationship tracking\n- Complex system design: Visualizing module communications and dependencies\n\n## Installation\n```bash\npip install pyn2\n```\n\n## Dependencies\n\nPyN2 relies on the following dependencies, which are managed through Poetry:\n\n```toml\n[tool.poetry.dependencies]\npython = \"^3.12\"\nopenmdao = \"^3.34.2\"\n```\n\n## Usage\n\nRun the following code to generate the `gen_diag.html` file.\n\n```python\nfrom pyn2.chart import Element, Group, N2\n\nn2 = N2('test_chart')\ns_dev = Group('Software_development')\ne_analyze = Element('Analyze')\ne_code = Element('Code')\ne_build = Element('Build')\ne_deploy = Element('Deploy')\n\nt_vnv = Group('Software_vnv')\ne_review = Element('Review')\ne_test = Element('Test')\n\ne_analyze.connect_to(e_code)\ne_code.connect_to(e_build)\ne_code.connect_to(e_review)\ne_review.connect_to(e_analyze)\ne_build.connect_to(e_test)\ne_test.connect_to(e_deploy)\ne_test.connect_to(e_analyze)\n\ns_dev.add_element(e_analyze)\ns_dev.add_element(e_code)\ns_dev.add_element(e_build)\ns_dev.add_element(e_deploy)\n\nt_vnv.add_element(e_review)\nt_vnv.add_element(e_test)\n\nn2.add_group(s_dev)\nn2.add_group(t_vnv)\nn2.generate_report()\n```\n\nAnd produce the following chart:\n\n<div align=\"center\">\n <img src=\"https://raw.githubusercontent.com/leomariga/pyn2/main/doc/example.gif\"><br>\n</div>\n\n\n## Contributing is awesome!\n\nSee [CONTRIBUTING](https://github.com/leomariga/pyn2/blob/main/CONTRIBUTING.md)\n\n\n\n\n## Contact\n\nDeveloped with :heart: by the internet\n\n\nMainteiner: [Leonardo Mariga](https://github.com/leomariga) \n\nDid you like it? Remember to click on :star2: button.\n",
"bugtrack_url": null,
"license": "Apache Licence 2.0",
"summary": "A python tool for N-squared chart plotting",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/leomariga/pyn2",
"Repository": "https://github.com/leomariga/pyn2"
},
"split_keywords": [
"n2 chart",
" visualization",
" data visualization",
" charts",
" graphs",
" python chart library",
" plotting",
" data analysis",
" charting library",
" scientific computing",
" system engineering"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1f966384776eb4b95014a2fa2cc199c3f8c1f5f1c0786136465221ec43f372f2",
"md5": "4ac55a7719af30a761de37810d4dca4f",
"sha256": "445e5312a1658d04198a17b2f0b1d7e9eff4eb828ea89e9532ec56bc65578e7b"
},
"downloads": -1,
"filename": "pyn2-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4ac55a7719af30a761de37810d4dca4f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.12",
"size": 11946,
"upload_time": "2024-09-06T02:36:16",
"upload_time_iso_8601": "2024-09-06T02:36:16.870024Z",
"url": "https://files.pythonhosted.org/packages/1f/96/6384776eb4b95014a2fa2cc199c3f8c1f5f1c0786136465221ec43f372f2/pyn2-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b9e210385cfbc6e981f6cafc29de590f0f25dee1bd21b7b593480b892a60678b",
"md5": "5cbf9ddf2a1500730628ceae5d7c5381",
"sha256": "c876f42fe948fc6f95716526b05d3eae8c1e7b50404b705d80219a7552ee45b4"
},
"downloads": -1,
"filename": "pyn2-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "5cbf9ddf2a1500730628ceae5d7c5381",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 7295,
"upload_time": "2024-09-06T02:36:18",
"upload_time_iso_8601": "2024-09-06T02:36:18.418663Z",
"url": "https://files.pythonhosted.org/packages/b9/e2/10385cfbc6e981f6cafc29de590f0f25dee1bd21b7b593480b892a60678b/pyn2-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-06 02:36:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "leomariga",
"github_project": "pyn2",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyn2"
}