{"id":13688899,"url":"https://github.com/gboeing/pynamical","last_synced_at":"2025-05-16T18:09:22.823Z","repository":{"id":21234968,"uuid":"24550275","full_name":"gboeing/pynamical","owner":"gboeing","description":"Model, simulate, and visualize discrete nonlinear dynamical systems, chaos, and fractals","archived":false,"fork":false,"pushed_at":"2025-04-18T18:02:17.000Z","size":1830,"stargazers_count":633,"open_issues_count":0,"forks_count":112,"subscribers_count":29,"default_branch":"main","last_synced_at":"2025-05-16T03:48:43.840Z","etag":null,"topics":["animation","bifurcation-diagram","chaos","cobweb-plot","fractal","fractals","ipynb","logistic","math","matplotlib","modeling","nonlinear","numba","numpy","pandas","phase-diagram","physics","python","systems","visualization"],"latest_commit_sha":null,"homepage":"https://geoffboeing.com/publications/nonlinear-chaos-fractals-prediction/","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gboeing.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-28T04:35:49.000Z","updated_at":"2025-05-12T02:21:16.000Z","dependencies_parsed_at":"2022-09-05T05:00:53.151Z","dependency_job_id":null,"html_url":"https://github.com/gboeing/pynamical","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gboeing%2Fpynamical","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gboeing%2Fpynamical/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gboeing%2Fpynamical/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gboeing%2Fpynamical/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gboeing","download_url":"https://codeload.github.com/gboeing/pynamical/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254582907,"owners_count":22095518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","bifurcation-diagram","chaos","cobweb-plot","fractal","fractals","ipynb","logistic","math","matplotlib","modeling","nonlinear","numba","numpy","pandas","phase-diagram","physics","python","systems","visualization"],"created_at":"2024-08-02T15:01:26.922Z","updated_at":"2025-05-16T18:09:22.817Z","avatar_url":"https://github.com/gboeing.png","language":"Python","readme":"[![PyPI Version](https://badge.fury.io/py/pynamical.svg)](https://badge.fury.io/py/pynamical)\n[![Anaconda Downloads](https://anaconda.org/conda-forge/pynamical/badges/downloads.svg)](https://anaconda.org/conda-forge/pynamical)\n[![Documentation](https://readthedocs.org/projects/pynamical/badge/?version=latest)](https://pynamical.readthedocs.io/)\n[![Tests](https://github.com/gboeing/pynamical/actions/workflows/tests.yml/badge.svg)](https://github.com/gboeing/pynamical/actions/workflows/tests.yml)\n[![Coverage](https://codecov.io/gh/gboeing/pynamical/branch/main/graph/badge.svg)](https://codecov.io/gh/gboeing/pynamical)\n\n# pynamical\n\n**Python package for modeling, simulating, visualizing, and animating discrete nonlinear dynamical systems and chaos**\n\nPynamical uses pandas, numpy, and numba for fast simulation, and matplotlib for visualizations and animations to explore system behavior.\n\nPynamical comes packaged with the logistic map, the Singer map, and the cubic map predefined. The models may be run with a range of parameter values over a set of time steps, and the resulting numerical output is returned as a pandas DataFrame. Pynamical can then visualize this output in various ways, including with bifurcation diagrams, two-dimensional phase diagrams, three-dimensional phase diagrams, and cobweb plots.\n\n**Citation info**: Boeing, G. 2016. \"[Visual Analysis of Nonlinear Dynamical Systems: Chaos, Fractals, Self-Similarity and the Limits of Prediction](https://geoffboeing.com/publications/nonlinear-chaos-fractals-prediction/).\" *Systems*, 4 (4), 37. doi:10.3390/systems4040037.\n\n## Install:\n\nYou can install pynamical with [conda](https://anaconda.org/conda-forge/pynamical):\n\n```\nconda config --prepend channels conda-forge\nconda create -n pynamical --strict-channel-priority jupyterlab pynamical\n```\n\nAlternatively, you can run pynamical + Jupyter directly from its [Docker container](https://hub.docker.com/r/gboeing/pynamical), or you can install it with pip.\n\n## Documentation:\n\nAvailable on [readthedocs](https://pynamical.readthedocs.io/).\n\n## Demos/tutorial:\n  1. [Pynamical: quick overview](examples/pynamical-quick-overview.ipynb)\n  1. [Pynamical: the logistic model and bifurcation diagrams](examples/pynamical-demo-logistic-model.ipynb)\n  1. [Pynamical: 2D and 3D phase diagrams](examples/pynamical-demo-phase-diagrams.ipynb)\n  1. [Pynamical: static and animated cobweb plots](examples/pynamical-demo-cobweb-plots.ipynb)\n  1. [Pynamical: animated 3D phase diagrams](examples/pynamical-demo-3d-animation.ipynb)\n  1. [Pynamical: demonstrating other models](examples/pynamical-demo-other-models.ipynb)\n\n## Quick walkthrough:\n\nFirst import pynamical. Then simulate some model and visualize its bifurcation diagram in just 2 lines of code:\n\n```python\nfrom pynamical import logistic_map, simulate, bifurcation_plot\npops = simulate(model=logistic_map, num_gens=100, rate_min=0, rate_max=4, num_rates=1000, num_discard=100)\nbifurcation_plot(pops)\n```\n\n![](examples/readme/logistic-map-bifurcation-1.png)\n\nZoom into a slice of this bifurcation diagram to see its [fractal structure](examples/pynamical-demo-logistic-model.ipynb):\n\n```python\npops = simulate(model=logistic_map, num_gens=100, rate_min=3.7, rate_max=3.9, num_rates=1000, num_discard=100)\nbifurcation_plot(pops, xmin=3.7, xmax=3.9)\n```\n![](examples/readme/logistic-map-bifurcation-3.png)\n\nPlot a two-dimensional [phase diagram](examples/pynamical-demo-phase-diagrams.ipynb) of the logistic map:\n\n```python\nfrom pynamical import phase_diagram\npops = simulate(model=logistic_map, num_gens=4000, rate_min=3.6, rate_max=4.0, num_rates=50, num_discard=100)\nphase_diagram(pops, xmin=0.25, xmax=0.75, ymin=0.8, ymax=1.01, size=7, color='viridis')\n```\n\n![](examples/readme/logisitic-map-2d-phase.png)\n\nOr a three-dimensional phase diagram of the [cubic map](examples/pynamical-demo-other-models.ipynb):\n\n```python\nfrom pynamical import cubic_map, phase_diagram_3d\npops = simulate(model=cubic_map, num_gens=3000, rate_min=3.5, num_rates=30, num_discard=100)\nphase_diagram_3d(pops, xmin=-1, xmax=1, ymin=-1, ymax=1, zmin=-1, zmax=1, alpha=0.2, color='viridis', azim=330)\n```\n\n![](examples/readme/cubic-map-3d-phase.png)\n\nAnimate the 3D phase diagram of the logistic map [to reveal](examples/pynamical-demo-3d-animation.ipynb) the strange attractor's structure:\n\n![](examples/readme/05-logistic-3d-phase-diagram-chaotic-regime.gif)\n\nAnimate a cobweb plot of the logistic map's parameter space [to explore](examples/pynamical-demo-cobweb-plots.ipynb) sensitivity and behavior:\n\n![](examples/readme/animated-logistic-cobweb.gif)\n\nOr define your [own model](https://github.com/gboeing/pynamical/blob/main/examples/pynamical-demo-other-models.ipynb) and simulate it with pynamical.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgboeing%2Fpynamical","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgboeing%2Fpynamical","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgboeing%2Fpynamical/lists"}