-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAccelerometerProccessing.koi
More file actions
1 lines (1 loc) · 20.7 KB
/
AccelerometerProccessing.koi
File metadata and controls
1 lines (1 loc) · 20.7 KB
1
{"nodes":[{"nid":12,"version":"0.0.1","uid":1,"category":"function","type":"Start","x":10,"y":10,"headerStyle":{"background":""},"fields":{"in":[],"out":[{"name":"start"}]},"python":"def start():\n return {'Start':True,'Settings':{},'Status':{}}\n","python_import":"","python_exec":"start","settings":[],"icon":"./static/media/start.50e8035c.svg","data":{},"kwargs":{},"description":"This node signifies the beginning of your node graph by the streme server. The start node passes true from the start output pin initiating the nodes it is connected to."},{"nid":11,"uid":"custom","category":"function","type":"excel2Pandas (Data 1)","x":223,"y":112,"fields":{"in":[{"name":"start"}],"out":[{"name":"pass"}]},"python":"@on_start\ndef excel2Pandas|||(*args,**kwargs):\n kwargs['Data']=pd.read_excel({file7895258746})\n return kwargs\n ","python_import":"import pandas as pd","python_exec":"excel2Pandas|||","settings":[{"key":"file7895258746","label":"Path of xlsx file (Relative Paths should be relative to the location of created Python File Location)","props":{"required":true}},{"key":"indexcol789456321","label":"Column that contains the index default value is 0","props":{"required":true}}],"data":{"file7895258746":"'data/data.xlsx'","indexcol789456321":"0"},"grouppath":"","description":"Imports an excel file into \n```python\nkwargs['Data'] \n```\n\nas a pandas Dataframe. You need to supply which column has the index the default column is 0.\n","showDescription":true,"showImports":false,"showExecution":false,"showFunction":false,"toggleMarkdown":false,"headerStyle":{"background":"#15ad60"},"toggleUserDialog":false,"stringDialog":"[{\"key\":\"file7895258746\",\"label\":\"Path of xlsx file (Relative Paths should be relative to the location of created Python File Location)\",\"props\":{\"required\":true}},{\"key\":\"indexcol789456321\",\"label\":\"Column that contains the index default value is 0\",\"props\":{\"required\":true}}]","stringPins":"{\"in\":[{\"name\":\"start\"}],\"out\":[{\"name\":\"pass\"}]}","togglePins":false},{"nid":10,"uid":"custom","category":"function","type":"pandas2Excel","x":879,"y":101,"fields":{"in":[{"name":"start"}],"out":[{"name":"pass"}]},"python":"@on_start\ndef pandaExcelDump(*args,**kwargs):\n kwargs['Data'].to_excel({Paths1d2f3}+{Filename6kl5hte})\n return kwargs","python_import":"import pandas as pd","python_exec":"pandaExcelDump","settings":[{"key":"Filename6kl5hte","label":"Filename (ex. file.xlsx)","props":{"required":true}},{"key":"Paths1d2f3","label":"Save location (blank saves in the same directory as the executed file)","props":{"required":true}}],"data":{"Filename6kl5hte":"'test.xls'","Paths1d2f3":"''"},"description":"This Node takes kwargs['PData'] and dumps its contents with a user defined name and to a user defined location in the xlsx file format. This Node does not clear kwargs['PData'] Requires Pandas\n\n","showExecution":false,"showDescription":true,"showImports":false,"showFunction":false,"toggleMarkdown":false,"toggleUserDialog":false,"stringDialog":"[{\"key\":\"Filename6kl5hte\",\"label\":\"Filename (ex. file.xlsx)\",\"props\":{\"required\":true}},{\"key\":\"Paths1d2f3\",\"label\":\"Save location (blank saves in the same directory as the executed file)\",\"props\":{\"required\":true}}]","stringPins":"{\"in\":[{\"name\":\"start\"}],\"out\":[{\"name\":\"pass\"}]}","togglePins":false,"version":"0.0.1","headerStyle":{"background":"#15ad60"}},{"nid":0,"version":"1.0.0","uid":1,"category":"function","type":"Start","x":10,"y":10,"headerStyle":{"background":""},"fields":{"in":[],"out":[{"name":"start"}]},"python":"def start():\n return {'Start':True,'Settings':{'Verbose':True},'Status':{}}\n","python_import":"","python_exec":"start","settings":[],"icon":"./static/media/start.c59e7ea6.svg","data":{},"kwargs":{},"description":"\n\nThe Start Node \n\n_This node is required to run a standard nodegraph that use the onstart decorator_\n\n\n## This Node Changes\n\nThis node initializes all standard kwargs\n\n## Getting This Node to Work\n\nThis node takes no inputs and only one can be connected in any given nodegraph. It sets Verbose to True by default, this setting outputs nodes run in the terminal when they are running and other debugging information. \n\n\n### Input State Requirements\n\nNone\n\n### Output State\n\n```python\nkwargs={\n Start: {},\n Settings: {Verbose:True},\n Data:{},\n Status: {}\n }\n```\n\n## Example Usage\n\n\n\n## Todo\n\n## Known Issues\n\nNo known Issues\n\n## License\n\nUsage of this node is provided under the [MIT License](http://http//opensource.org/licenses/mit-license.php). See LICENSE for the full details.\n\nThis node signifies the beginning of your node graph by the streme server. The start node passes true from the start output pin initiating the nodes it is connected to."},{"nid":1,"version":"1.0.0","uid":10,"category":"function","type":"Stop","x":1082,"y":96,"headerStyle":{"background":"#ad1562"},"fields":{"in":[{"name":"start"}],"out":[]},"python":"@on_start\ndef stop(*args,**kwargs):\n print('exiting')\n sys.exit()\n ","python_import":"import sys","python_exec":"stop","settings":[],"icon":"./static/media/stop.a2171794.svg","data":{},"kwargs":{},"description":"This node ends the existing node experiment. It will not stop processes that have started in parallel using split nodes."},{"nid":2,"version":"1.0.0","uid":11,"category":"label","type":"Double Click Me","x":549,"y":485,"headerStyle":{"background":"#ad1562"},"fields":{"in":[],"out":[]},"python":"","python_import":"","python_exec":"","settings":[],"icon":"","data":{},"kwargs":{},"description":"\n\n<iframe src=\"https://www.youtube-nocookie.com/embed/kNV7okW5gKA?autoplay=0&showinfo=0&rel=0&modestbranding=1&playsinline=1\" width=\"1920\" height=\"1080\" frameborder=\"0\" allowfullscreen uk-responsive uk-video=\"automute: true\"></iframe>\n\n\n# StremeCoder BASICS \n## Install Python 3\n\nThe StremeCoder does not require the presence of python to compile node graphs to python, but you will need python 3 to run any compiled file.\n\nThere are many different package managers for python, but we prefer anaconda as its packages are well mantained and offers many learning tools to make python management easy.\n\n[Anaconda](https://www.anaconda.com/distribution/)\n\nMake Sure to install Python 3+ as Python 2.X is no longer maintained\n\n## Learning Python\nThere are many [resources](https://www.w3schools.com/python/) to start learning Python on the internet in particular for Data Science. Youtube Quickstart videos from Pluri will be available soon. In the meantime we suggest you begin by drawing out a simple algorithm that loads some Data, does some manipulation then saves that data. We provide these nodes and you can look through how this is accomplished in code. As our Library of nodes grows more examples and possible algorithms will be available to you. You will become comfortable very quickly with designing koi at which point you can contact Pluri about implementing that code or a designer you know. Within\n\n## StremeCoder caveats\nThe StremeCoder uses special characters to insure that you can have duplicate functions that share the same python function name, but may have slight differences in code.\n```\nfunctionName|||\n```\nWhere ||| is an enumerator that assigns a distinct number to every node that uses ||| such that a node that saves to excel with a user defined location can do it again at some later point in the Koi to different location.\n\nIn nodes with user inputs and extra pins, defining a dictionary which is normally ``` newDictionary = {\"key\":value} ``` will require an extra {} enclosure ``` newDictionary = {{\"key\":value}} ``` as extra pins use {pinName} to place node functions and {userInputKey} to place user dialog data. \n\n\n\n## The Flow of Streme\nThe StremeCoder is meant to make your algorithms readable to anyone. You should keep in mind these axioms when you are designing your algorithms.\n\n- Generate Descriptive Node Names\n- A Node that can be used by ANYONE is significantly more valuable than a Node that can only be used in your algorithm\n- A Beautiful Koi(Node Graph) is elegant and can be read like a story of reasonable functions \n- Maintain, when possible, the functional flow of Streme. That is avoid placing functions and classes outside of your node functions unless no other solution is possible.\n- When adding to ``` kwargs[Settings] ``` enclosing your dictionary items inside a very specific subname will avoid collisions with other nodes you may download on the internet or if you choose to make your node available to others ``` kwargs[Settings][LabNameNumber][SettingVariable] ```\n\n## The Canvas\nWe intend for you to use the Canvas as real workspace. You can zoom out of the canvas (CTRL +/- and CTRL Mouse wheel) and hide nodes you want to use later. Don't worry about a messy canvas when you are working, having extra parts is useful when you are editing and duplicating nodes. \nThis has been our general workflow for generating algorithms:\n\n1. Generate a Sketch of different nodes that take you from some input through some analysis to some output.\n2. Export that sketch to your client as either a Koi or as an image in an email.\n3. Once everyone is in agreement with the flow of the algorithm, code the algorithm.\n4. Update the descriptions by filling out the template. \n5. Potentially uploading your nodes to github, sending your koi or python files to your client\n\n### You don't need to be coding python to use the canvas! You can export your KOI as an editable SVG. You can draw experimental designs, processes, algorithms etc.. to use in presentations. \n\n## Making Koi\nA node graph created by stremeCoder is called a Koi. A Koi is a readable text json formatted to contain all of contents of your designed node graph. Koi can be created by saving your node graphs, a buffered version of your node graph is automatically saved when changes are made to the canvas. This means when you have a single StremeCoder window open your progress will not be lost after closing. \n\n## Node Library\nOver the course of designing a koi you will develop your own Nodes that you will want to start tracking on thier own. To do this we suggest you clear out all other nodes in your koi and rename your Koi to reflect the name of the node you want to save and save the node to a node library and upload your node to github. You should keep track of versioning of this node and import this prestine node into new projects, rather than importing projects with a node you want\n\n\n","showExecution":false,"showDescription":true,"showImports":false,"showFunction":false,"toggleMarkdown":false,"toggleUserDialog":false,"stringDialog":"[]","stringPins":"{\"in\":[],\"out\":[]}","togglePins":false},{"nid":6,"uid":"custom","category":"logical","type":"Filter Data (Threshold)","x":623,"y":97,"fields":{"in":[{"name":"start"}],"out":[{"name":"pass"}]},"python":"@on_start\ndef pandasThreshold|||(*args,**kwargs):\n df = kwargs['Data']\n kwargs['Data']= df.loc[df['gforce']>{userthresh}]\n return kwargs","python_import":"","python_exec":"pandasThreshold|||","settings":[{"key":"userthresh","label":"Threshold Value"}],"icon":"./static/media/blankNode.38260d5b.svg","data":{"userthresh":"2"},"description":"\n\nInclude a brief title for your node and a small description. \n\n_One Sentence on what problem your node solves_\n\n[YOUR GITHUB PAGE FOR THE NODE SOURCE](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#links)\n\n## This Node Changes\n\n\n\nThis node takes a Pandas Dataframe in outputs and excel file and returns kwargs unchanged to the next node.\n\n## Getting This Node to Work\n\nThis node will work if it provided with a Dataframe in kwargs{Data} and Pandas is installed\n\n### Installing Dependencies\n\nThis node requires Pandas. Pandas can be installed using pip in your terminal \n\n```bash\npip install pandas\n```\n\nif you have python2 and python3 installed\n\n```bash\npip3 install pandas\n```\n\nIf you are using Anaconda (Pandas is already installed in the default setup):\n\n```bash\nconda install pandas\n```\n\n### Input State Requirements\n\nThis node requires that kwargs{Data} be a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html)\n\n```python\nkwargs={\n Start: True,\n Settings: Any,\n Data: Any Pandas Dataframe,\n Status: Any,\n }\n```\n\n### Output State\n\n```python\nkwargs={\n Start: No Change,\n Settings: No Change,\n Data: No Change,\n Status: No Change\n }\n```\n\n## Example Usage\n\nCheck out this simple demo of this node working : [Download Koi](https://mykoilocation.com)\n\n\n\n## Todo\n\n- Something\n\n- Another Thing\n\n- Something Else\n\n## Known Issues\n\n- We coded it poorly\n\n- Works only on the first of every month that is also within 5 days of the summer solstice \n\n## License\n\nUsage of this node is provided under the [MIT License](http://http//opensource.org/licenses/mit-license.php). See LICENSE for the full details.\n","showExecution":false,"showDescription":true,"showImports":false,"showFunction":false,"toggleMarkdown":false,"toggleUserDialog":false,"stringDialog":"[{\"key\":\"userthresh\",\"label\":\"Threshold Value\"}]","stringPins":"{\"in\":[{\"name\":\"start\"}],\"out\":[{\"name\":\"pass\"}]}","togglePins":false,"headerStyle":{"background":"#15ad60"}},{"nid":7,"uid":"custom","category":"logical","type":"Plot GForce","x":412,"y":223,"fields":{"in":[{"name":"start"}],"out":[{"name":"pass"}]},"python":"@on_start\ndef pandasScatter|||(*args,**kwargs):\n axl = kwargs['Data'].plot.scatter(x='time',y='gforce')\n #plt.show()\n return kwargs","python_import":"import matplotlib.pyplot as plt","python_exec":"pandasScatter|||","settings":[""],"icon":"./static/media/blankNode.38260d5b.svg","data":{},"description":"\n\nInclude a brief title for your node and a small description. \n\n_One Sentence on what problem your node solves_\n\n[YOUR GITHUB PAGE FOR THE NODE SOURCE](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#links)\n\n## This Node Changes\n\n\n\nThis node takes a Pandas Dataframe in outputs and excel file and returns kwargs unchanged to the next node.\n\n## Getting This Node to Work\n\nThis node will work if it provided with a Dataframe in kwargs{Data} and Pandas is installed\n\n### Installing Dependencies\n\nThis node requires Pandas. Pandas can be installed using pip in your terminal \n\n```bash\npip install pandas\n```\n\nif you have python2 and python3 installed\n\n```bash\npip3 install pandas\n```\n\nIf you are using Anaconda (Pandas is already installed in the default setup):\n\n```bash\nconda install pandas\n```\n\n### Input State Requirements\n\nThis node requires that kwargs{Data} be a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html)\n\n```python\nkwargs={\n Start: True,\n Settings: Any,\n Data: Any Pandas Dataframe,\n Status: Any,\n }\n```\n\n### Output State\n\n```python\nkwargs={\n Start: No Change,\n Settings: No Change,\n Data: No Change,\n Status: No Change\n }\n```\n\n## Example Usage\n\nCheck out this simple demo of this node working : [Download Koi](https://mykoilocation.com)\n\n\n\n## Todo\n\n- Something\n\n- Another Thing\n\n- Something Else\n\n## Known Issues\n\n- We coded it poorly\n\n- Works only on the first of every month that is also within 5 days of the summer solstice \n\n## License\n\nUsage of this node is provided under the [MIT License](http://http//opensource.org/licenses/mit-license.php). See LICENSE for the full details.\n","showExecution":false,"showDescription":false,"showImports":false,"showFunction":true,"toggleMarkdown":false,"toggleUserDialog":false,"stringDialog":"[\"\"]","stringPins":"{\"in\":[{\"name\":\"start\"}],\"out\":[{\"name\":\"pass\"}]}","togglePins":false,"headerStyle":{"background":"#adac15"}},{"nid":22,"uid":"custom","category":"function","type":"csv2Pandas (Data 2)","x":143,"y":246,"fields":{"in":[{"name":"start"}],"out":[{"name":"pass"}]},"python":"@on_start\ndef excel2Pandas|||(*args,**kwargs):\n kwargs['Data']=pd.read_csv({file7895258746})\n return kwargs\n ","python_import":"import pandas as pd","python_exec":"excel2Pandas|||","settings":[{"key":"file7895258746","label":"Path of xlsx file (Relative Paths should be relative to the location of created Python File Location)","props":{"required":true}},{"key":"indexcol789456321","label":"Column that contains the index default value is 0","props":{"required":true}}],"data":{"file7895258746":"'data/data.csv'","indexcol789456321":"0"},"grouppath":"","description":"Imports an excel file into \n```python\nkwargs['Data'] \n```\n\nas a pandas Dataframe. You need to supply which column has the index the default column is 0.\n","showExecution":false,"showDescription":true,"showImports":false,"showFunction":false,"toggleMarkdown":false,"toggleUserDialog":false,"stringDialog":"[{\"key\":\"file7895258746\",\"label\":\"Path of xlsx file (Relative Paths should be relative to the location of created Python File Location)\",\"props\":{\"required\":true}},{\"key\":\"indexcol789456321\",\"label\":\"Column that contains the index default value is 0\",\"props\":{\"required\":true}}]","stringPins":"{\"in\":[{\"name\":\"start\"}],\"out\":[{\"name\":\"pass\"}]}","togglePins":false,"headerStyle":{"background":"#1562ad"}},{"nid":23,"uid":"custom","category":"logical","type":"Plot GForce","x":754,"y":225,"fields":{"in":[{"name":"start"}],"out":[{"name":"pass"}]},"python":"@on_start\ndef pandasScatter|||(*args,**kwargs):\n axl = kwargs['Data'].plot.scatter(x='time',y='gforce')\n plt.show()\n return kwargs","python_import":"import matplotlib.pyplot as plt","python_exec":"pandasScatter|||","settings":[""],"icon":"./static/media/blankNode.38260d5b.svg","data":{},"description":"\n\nInclude a brief title for your node and a small description. \n\n_One Sentence on what problem your node solves_\n\n[YOUR GITHUB PAGE FOR THE NODE SOURCE](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#links)\n\n## This Node Changes\n\n\n\nThis node takes a Pandas Dataframe in outputs and excel file and returns kwargs unchanged to the next node.\n\n## Getting This Node to Work\n\nThis node will work if it provided with a Dataframe in kwargs{Data} and Pandas is installed\n\n### Installing Dependencies\n\nThis node requires Pandas. Pandas can be installed using pip in your terminal \n\n```bash\npip install pandas\n```\n\nif you have python2 and python3 installed\n\n```bash\npip3 install pandas\n```\n\nIf you are using Anaconda (Pandas is already installed in the default setup):\n\n```bash\nconda install pandas\n```\n\n### Input State Requirements\n\nThis node requires that kwargs{Data} be a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html)\n\n```python\nkwargs={\n Start: True,\n Settings: Any,\n Data: Any Pandas Dataframe,\n Status: Any,\n }\n```\n\n### Output State\n\n```python\nkwargs={\n Start: No Change,\n Settings: No Change,\n Data: No Change,\n Status: No Change\n }\n```\n\n## Example Usage\n\nCheck out this simple demo of this node working : [Download Koi](https://mykoilocation.com)\n\n\n\n## Todo\n\n- Something\n\n- Another Thing\n\n- Something Else\n\n## Known Issues\n\n- We coded it poorly\n\n- Works only on the first of every month that is also within 5 days of the summer solstice \n\n## License\n\nUsage of this node is provided under the [MIT License](http://http//opensource.org/licenses/mit-license.php). See LICENSE for the full details.\n","headerStyle":{"background":"#adac15"}}],"connections":[{"from_node":7,"from":"pass","to_node":6,"to":"start"},{"from_node":0,"from":"start","to_node":11,"to":"start"},{"from_node":11,"from":"pass","to_node":7,"to":"start"},{"from_node":6,"from":"pass","to_node":23,"to":"start"},{"from_node":23,"from":"pass","to_node":10,"to":"start"}],"title":"AccelerometerProccessing","showPopup":false,"current":7,"count":23,"servers":{},"serverselection":null}