{"id":34106994,"url":"https://github.com/htm-community/menorah","last_synced_at":"2026-03-12T10:01:09.061Z","repository":{"id":57440867,"uuid":"44825917","full_name":"htm-community/menorah","owner":"htm-community","description":"Menorah is a NuPIC experiment framework for River View.","archived":false,"fork":false,"pushed_at":"2018-03-08T19:22:43.000Z","size":111,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-12-17T01:13:42.719Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/htm-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-23T16:49:23.000Z","updated_at":"2021-03-03T09:23:02.000Z","dependencies_parsed_at":"2022-09-26T17:20:47.965Z","dependency_job_id":null,"html_url":"https://github.com/htm-community/menorah","commit_stats":null,"previous_names":["nupic-community/menorah"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/htm-community/menorah","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htm-community%2Fmenorah","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htm-community%2Fmenorah/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htm-community%2Fmenorah/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htm-community%2Fmenorah/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/htm-community","download_url":"https://codeload.github.com/htm-community/menorah/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htm-community%2Fmenorah/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30421081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T09:20:56.688Z","status":"ssl_error","status_checked_at":"2026-03-12T09:20:13.792Z","response_time":114,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-12-14T18:04:30.003Z","updated_at":"2026-03-12T10:01:09.052Z","avatar_url":"https://github.com/htm-community.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Menorah\n\n\u003e Menorah is a [NuPIC](http://github.com/numenta/nupic) experiment framework for [River View](http://data.numenta.org).\n\n![Menorah logo](menorah.png)\n\n## Goal\n\nThis project aims to make it easy to feed multiple streams of data into a [NuPIC](http://github.com/numenta/nupic) HTM model using live data already availale in [River View](http://data.numenta.org). With a simple python script, you can run and plot predictions for River View data using many input streams that might contribute to the target prediction.\n\n## Tutorial\n\nCheck out the video tutorial! \n\n[![here: https://www.youtube.com/watch?v=mazjXUC8eDM](http://img.youtube.com/vi/mazjXUC8eDM/0.jpg)](http://www.youtube.com/watch?v=mazjXUC8eDM)\n\n## Installation\n\nFirst, you must install [NuPIC](http://github.com/numenta/nupic) however you wish. Then you can run:\n\n    pip install menorah\n \n## Data delivered directly to NuPIC\n\nTo stream data from River View into NuPIC, you need to know the `river`, `stream`, and `field` for each data feed. \n\nTake the data feed [`http://data.numenta.org/ercot-demand/system_wide_demand/data.html`](http://data.numenta.org/ercot-demand/system_wide_demand/data.html):\n\nThe pattern is `/\u003criver\u003e/\u003cstream\u003e/data.html`. To find the `field`, look at [River View HTML interface](http://data.numenta.org/ercot-demand/system_wide_demand/data.html) to decide what data field is desired. \n\nEach one is a list `[river, stream, field]`, and they are provided to the `Menora` constructor in a list. For example:\n\n```python\nfrom menorah import Menorah\n\nsources = [\n  [\"ercot-demand\", \"system_wide_demand\", \"Demand\"],\n]\n\nmenorah = Menorah(sources, \"experiments/ercot\")\nmenorah.swarm()\nmenorah.runModel()\n```\n\n## Working Directory\n\nMenorah needs a working directory for its second constructor parameter, because NuPIC writes artifacts to the file system. Pass in a path to a working folder for menorah experiments.\n\n## Run multiple fields\n\nI recommend running less than 8 fields in a single model, but you can configure as many as you wish. The example below attempts to better predict the number of \"tree debris\" 311 calls in Chicago and incorporates data from local weather stations. It also shows an example of aggregating a geospatial data feed to get event counts within an aggregation period. \n\n```python\nfrom datetime import datetime\n\nfrom menorah import Menorah\n\nsources =  [\n  [\"chicago-311\", \"Tree Debris\", \"aggregate=1 day\"],\n  [\"chicago-beach-weather\", \"Foster Weather Station\", \"humidity\"],\n  [\"chicago-beach-weather\", \"Foster Weather Station\", \"interval_rain\"],\n  [\"chicago-beach-water-quality\", \"Osterman Beach\", \"wave_height\"],\n]\n\nmenorah = Menorah(\n  sources,\n  \"work/example5-multifield-aggregated\", \n  since=datetime(2015, 5, 20)\n)\n\nmenorah.swarm(swarmParams={\"swarmSize\":\"large\"})\nmenorah.runModel(plot=True)\n\n```\n\n## View the predictions\n\nYou can find a `predictions.csv` file in the working directory you specified. Or you can call `runModel(plot=True)` to plot with matplotlib.\n\n## Pro Tips\n\n- For `geospatial` data streams like [portland-911](http://data.numenta.org/portland-911/portland-911/data.html), you can aggregate counts of events by providing an *aggregation string* instead of a `field` name. See [example5.py](examples/example5.py) and `aggregate=1 day` in the `sources` list. \n- Once you've swarmed once on a particular experiment, you can comment out the call to `swarm()` on subsequent runs.\n\n## TODO\n\n- Save `Menorah` instances, which should save the underlying model and the data cursors so the may be continued from the point where they left off.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtm-community%2Fmenorah","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhtm-community%2Fmenorah","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtm-community%2Fmenorah/lists"}