<jupyter_start><jupyter_text>Logistic mapFrom Wikipedia, the free encyclopediaThe logistic map is a polynomial mapping (equivalently, recurrence relation) of degree 2, often cited as an archetypal example of how complex, chaotic behaviour can arise from very simple non-linear dynamical equations.[1] The map was popularized in a seminal 1976 paper by the biologist <NAME>,[2] in part as a discrete-time demographic model analogous to the logistic equation first created by <NAME>.[3] Mathematically, the logistic map is written:<jupyter_code>import matplotlib.pyplot as plt
def logistic_map(r, iterations, x=1):
    """
    Returns a plot of the logistic map equation
    
    Keyword arguments:
    r -- the population growth rate (biotic potential) (no default)
    iterations -- the number of discrete time steps (i.e., generations)
    x or x0 -- initial population percentage size (default 0.1)
    """
    fcc = []  # fraction of carrying capacity - holds x's
    for i in range(iterations):
        fcc.append(x)
        x = r * x * (1.0 - x)
    return plt.plot(fcc)
logistic_map(2.8, 50, 0.5)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08215547703180212, 'fraction_numerical': 0.0176678445229682, 'mean_word_length': 3.841880341880342, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '432318', 'license': 'MIT', 'n_tokens_mistral': 345, 'n_tokens_neox': 319, 'n_words': 138, 'path': 'logisticmap.ipynb', 'repo_name': 'ambron60/logisticmap-simple', 'size': '1154'}