{"id":16200744,"url":"https://github.com/tanglespace/hotstepper","last_synced_at":"2025-03-19T05:31:04.280Z","repository":{"id":53787337,"uuid":"338184036","full_name":"TangleSpace/hotstepper","owner":"TangleSpace","description":"A Numpy based step function library for analysis and profit. More than just taking you up and down.","archived":false,"fork":false,"pushed_at":"2021-03-21T18:33:22.000Z","size":318898,"stargazers_count":15,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T16:10:52.230Z","etag":null,"topics":["data-analysis","kernel-methods","linear-algebra","numpy","pandas","step-functions","time-series"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"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/TangleSpace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-11T23:55:28.000Z","updated_at":"2024-04-27T03:43:03.000Z","dependencies_parsed_at":"2022-09-15T03:01:21.008Z","dependency_job_id":null,"html_url":"https://github.com/TangleSpace/hotstepper","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TangleSpace%2Fhotstepper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TangleSpace%2Fhotstepper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TangleSpace%2Fhotstepper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TangleSpace%2Fhotstepper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TangleSpace","download_url":"https://codeload.github.com/TangleSpace/hotstepper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971180,"owners_count":20376784,"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":["data-analysis","kernel-methods","linear-algebra","numpy","pandas","step-functions","time-series"],"created_at":"2024-10-10T09:33:34.345Z","updated_at":"2025-03-19T05:30:59.272Z","avatar_url":"https://github.com/TangleSpace.png","language":"Python","readme":"\u003cp align=\"left\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/tanglespace/hotstepper/master/docs/images/HotstepperLogo.png\" title=\"Hot Stepper\" alt=\"Hot Stepper\"\u003e\u003c/p\u003e\n\nThe Hot Stepper library is for exploring datasets via step function expansions.\n\nIt's all about tools that just work and no need for extensive knowledge of Pandas or Numpy or whatever, just HotStepper!. Albeit, knowledge of Pandas and Numpy is useful.\n\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://pepy.tech/project/hotstepper/\" alt=\"PyPI downloads\"\u003e\n\t\u003cimg src=\"https://pepy.tech/badge/hotstepper\" /\u003e\n\t\u003c/a\u003e\n    \u003ca href=\"https://www.python.org/\" alt=\"Python version\"\u003e\n        \u003cimg src=\"https://img.shields.io/pypi/pyversions/hotstepper\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/hotstepper/\" alt=\"PyPI version\"\u003e\n        \u003cimg src=\"https://img.shields.io/pypi/v/hotstepper\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://hotstepper.mit-license.org/\" alt=\"License\"\u003e\n        \u003cimg src=\"http://img.shields.io/:license-mit-blue.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href='https://hotstepper.readthedocs.io/?badge=latest'\u003e\n        \u003cimg src='https://readthedocs.org/projects/hotstepper/badge/?version=latest' alt='Documentation Status' /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Installation\nHotStepper can be installed from PyPI:\n\n```bash\npip install hotstepper\n```\n\nConda install coming soon!\n\n\n## Quick Test Drive\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://mybinder.org/v2/gh/TangleSpace/hotstepper/master?filepath=docs%2Fexamples\" alt=\"Binder\"\u003e\n        \u003cimg src=\"https://mybinder.org/badge_logo.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n## Introducing Sequency Analysis!\nA very exciting (atleast to me) new addition to HotStepper, the ability to perform Fourier like transforms and analysis, using dedicated basis functions that are directly suited to step functions and step data, (\u003ca href=\"https://en.wikipedia.org/wiki/Walsh_function\"\u003eWalsh functions!\u003c/a\u003e). Have a look at the \u003ca href=\"https://hotstepper.readthedocs.io/notebooks/sequency_quickstart.html\"\u003eSequency Analysis Quickstart\u003c/a\u003e, for a taste of more analysis power to come.\n\n\n## Documentation\nEverything (mostly) you want to know about HotStepper and making use in your workflow is here [Read the Docs](https://hotstepper.readthedocs.io/)\n\n## Sample Data Repository\nSample data is located here: \u003ca href=\"https://github.com/TangleSpace/hotstepper-data\"\u003ehotstepper-data\u003c/a\u003e.\nI'd like to thank the Staircase package owner for currating some of these datasets, thanks Riley!\n\n## Step Functions\nBehold! the power of the [Heaviside step function](https://en.wikipedia.org/wiki/Heaviside_step_function)\nCheckout a detailed, somewhat, probably \u003ca href=\"https://hotstepper.readthedocs.io/notebooks/step_functions.html\"\u003every exciting, non-stop adventure ride\u003c/a\u003e through some of the, umm, math.....behind HotStepper and step functions. With any luck, someone will have a deadline tomorrow and HotStepper and step functions will save the day! Or atleast, I like to keep thinking that.\n\n### Ok, don't packup just yet.\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/tanglespace/hotstepper/master/docs/images/temperature.gif\" title=\"Daily Temperature\" alt=\"Daily Temperature\", width=\"50%\" height=\"50%\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/tanglespace/hotstepper/master/docs/images/store.gif\" title=\"Store\" alt=\"Store\", width=\"50%\" height=\"50%\"\u003e\u003c/p\u003e\n\nWhat the f*\u0026^ is a step function you may ask? Have you ever seen some stairs?, this is an equal oppotunity package, so you may be in a wheel chair and unable to use stairs in the typical way, so just having seen some stairs will suffix.\n\nInstead of providing a strict mathematical definition that we can all wank off about, how bout just some simple comparisons to warm us up? If you still need to have a wank, feel free to step out (pun intended) anytime.\n\nWhat is a function? ok, how about just some data we could plot? let's go home school, say we have a vector...oh f\u0026^%, what is that? ok ok, how about just a list of numbers, say y = (1, 1, 2, 3, 5, 8, 13, 21), to keep the wanking impulse alive, we could say that this is a discrete function where we can index the values from left to right with an integer, for example \u003cimg src=\n\"https://render.githubusercontent.com/render/math?math=%5Ctextstyle+y%28x%29+%3D+%281%2C1%2C2%2C3%2C5%2C8%2C13%2C21%29%2C+%7Bx%3A+x%5Cin+%5Cmathbb%7BN%7D%7D%0A\" alt=\"y(x) = (1,1,2,3,5,8,13,21), {x: x\\in \\mathbb{N}}\"\u003e, so that we could do something fancy like y(6) = 8.\n\nAlright, if we just plot y(n) with straight lines connecting the points, we'd get something like,\n\n```python\n    import matplotlib.pyplot as plt\n    \n    def fibo_sequence(n):\n        f0 = 0\n        fn = 1\n\n        for _ in range(n):\n            yield fn\n            f0, fn = fn, f0 + fn\n\n    sequence_length = 8\n    x = np.arange(0,8,1,dtype=int)\n    y = np.array(list(fibo_sequence(sequence_length)),dtype=int)\n\n    fig,ax = plt.subplots()\n    ax.plot(x,y)\n```\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/tanglespace/hotstepper/master/docs/images/fibo_steps.png\" title=\"Fibonacci Step Plot\" alt=\"Fibonacci Step Plot\"\u003e\u003c/p\u003e\n\nNow what if we only start with the rules of the fibonacci sequence, we can generate a step sequence directly.\n\n```python\n    import matplotlib.pyplot as plt\n    from hotstepper import Step, Steps\n\n    def fibo_step_sequence(n):\n        f0 = 0\n        fn = 1\n\n        for i in range(n):\n            yield Step(start=i+1,weight=(fn - f0))\n            f0, fn = fn, f0 + fn\n\n    sequence_length = 8\n    st = Steps().add([f for f in fibo_step_sequence(sequence_length)])\n\n    ax = st.plot(method='pretty')\n    st.smooth_plot(color='g',ax=ax,smooth_factor=0.3)\n    plt.setp(ax, title='Fibo Steps and Components',xlabel='Index', ylabel='Steps Value')\n\n    #Our steps object contains individual step functions, we can iterate over these directly, nice!\n    for s in st:\n        s.plot(ax=ax)\n        s.smooth_plot(ax=ax,linestyle='-.',color='g')\n```\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/tanglespace/hotstepper/master/docs/images/fibo_steps_sequence.png\" title=\"Fibonacci Step Plot\" alt=\"Fibonacci Step Plot\"\u003e\u003c/p\u003e\n\nA very quick taste of the power that can be tapped with HotStepper. Let's say you have a data set as check-in and check-out times for a hotel. If we need to understand how many people are present in the hotel at any point in time and, as a sample of how HotStepper can help speed your analysis, we can get a quick summary of the dataset with a single line of code.\n\n```python\n    import hotstepper.samples as samples\n\n    #Typical work flow, get the data\n    hotel_stays = samples.hotel_stays_sample()\n\n    #Explore the data\n    hotel_stays.summary()\n\n```\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/tanglespace/hotstepper/master/docs/images/hotel_summary.png\" title=\"Fibonacci Step Plot\" alt=\"Fibonacci Step Plot\"\u003e\u003c/p\u003e\n\n\n## Acknowledgments\nThis project is was inspired by the [Staircase Package](https://github.com/venaturum/staircase), whilst the use cases are similar, HotStepper and Staircase represent different approaches and each provides pros and cons over the other.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanglespace%2Fhotstepper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanglespace%2Fhotstepper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanglespace%2Fhotstepper/lists"}