-
Notifications
You must be signed in to change notification settings - Fork 1
/
flows.json
1 lines (1 loc) · 12.2 KB
/
flows.json
1
[{"id":"6578e98e.bf2628","type":"function","z":"243e8e0d.7711a2","name":"Json Parsing","func":"msg.payload=msg.payload.values[0][0]\nreturn msg;","outputs":1,"noerr":0,"x":867.0000190734863,"y":282.00000762939453,"wires":[["4ac61b9a.968234","eb4a8ae5.1b50a8"]]},{"id":"82e49d93.f1c96","type":"inject","z":"243e8e0d.7711a2","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":104,"y":163.00000190734863,"wires":[["c9d81004.2c0c"]]},{"id":"4ac61b9a.968234","type":"debug","z":"243e8e0d.7711a2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":955.0000228881836,"y":39.000003814697266,"wires":[]},{"id":"c9d81004.2c0c","type":"http request","z":"243e8e0d.7711a2","name":"","method":"GET","ret":"obj","paytoqs":false,"url":"https://eu-gb.ml.cloud.ibm.com\\v3\\identity\\token","tls":"","proxy":"","authType":"basic","x":327.00000762939453,"y":165.0000114440918,"wires":[["6b51d7d1.33ea08","4ac61b9a.968234"]]},{"id":"6b51d7d1.33ea08","type":"function","z":"243e8e0d.7711a2","name":"Prediction Input","func":"var token=msg.payload.token;\nvar age=global.get(\"age\");\nvar job=global.get(\"job\");\nvar marital=global.get(\"marital\");\nvar education=global.get(\"education\");\nvar defaulter=global.get(\"defaulter\");\nvar balance=global.get(\"balance\");\nvar housing=global.get(\"housing\");\nvar loan=global.get(\"loan\");\nvar contact=global.get(\"contact\");\nvar month=global.get(\"month\");\nvar duration=global.get(\"duration\");\nvar campaign=global.get(\"campaign\");\nvar pdays=global.get(\"pdays\");\nvar previous=global.get(\"previous\");\nvar poutcome=global.get(\"poutcome\");\nmsg.payload={\"fields\":\n[\"age\",\"job\",\"marital\",\"education\",\"defaulter\",\"balance\",\"housing\",\"loan\",\"contact\",\"month\",\"duration\",\"campaign\",\"pdays\",\"previous\",\"poutcome\"],\"values\":[[age,job,marital,education,defaulter,balance,housing,loan,contact,month,duration,campaign,pdays,previous,poutcome]]};\nmsg.headers={\"Authorization\":\"Bearer \"+token}\n\nreturn msg;","outputs":1,"noerr":0,"x":504.00001525878906,"y":52.000009536743164,"wires":[["c93b20d7.9c319","4ac61b9a.968234"]]},{"id":"c93b20d7.9c319","type":"http request","z":"243e8e0d.7711a2","name":"","method":"POST","ret":"obj","paytoqs":false,"url":"https://eu-gb.ml.cloud.ibm.com/v3/wml_instances/d5702891-ced5-4e92-85fa-05cc27378417/deployments/06178d34-648c-4f44-aca4-2cded9bb3067/online","tls":"","proxy":"","x":687.0000190734863,"y":167.00000476837158,"wires":[["6578e98e.bf2628","4ac61b9a.968234"]]},{"id":"542f23f1.8549fc","type":"ui_dropdown","z":"243e8e0d.7711a2","name":"","label":"job","tooltip":"","place":"Select state","group":"4f8c8e21.4457c","order":1,"width":0,"height":0,"passthru":true,"options":[{"label":"admin.","value":"admin.","type":"str"},{"label":"technician","value":"technician","type":"str"},{"label":"services","value":"services","type":"str"},{"label":"management","value":"management","type":"str"},{"label":"retired","value":"retired","type":"str"},{"label":"blue-collar","value":"blue-collar","type":"str"},{"label":"unemployed","value":"unemployed","type":"str"},{"label":"entrepreneur","value":"entrepreneur","type":"str"},{"label":"housemaid","value":"housemaid","type":"str"},{"label":"unknown","value":"unknown","type":"str"},{"label":"self-employed","value":"self-employed","type":"str"},{"label":"student","value":"student","type":"str"}],"payload":"","topic":"","x":435.79998779296875,"y":379.1999816894531,"wires":[["13a2654c.94adcb"]]},{"id":"e25935a6.3b7588","type":"ui_form","z":"243e8e0d.7711a2","name":"Retail Banking","label":"","group":"4f8c8e21.4457c","order":7,"width":0,"height":0,"options":[{"label":"age","value":"age","type":"number","required":true},{"label":"defaulter","value":"defaulter","type":"number","required":true},{"label":"balance","value":"balance","type":"number","required":true},{"label":"housing","value":"housing","type":"number","required":true},{"label":"loan","value":"loan","type":"number","required":true},{"label":"duration","value":"duration","type":"number","required":true},{"label":"campaign","value":"campaign","type":"number","required":true},{"label":"pdays","value":"pdays","type":"number","required":true},{"label":"previous","value":"previous","type":"number","required":true}],"formValue":{"age":"","defaulter":"","balance":"","housing":"","loan":"","duration":"","campaign":"","pdays":"","previous":""},"payload":"","submit":"submit","cancel":"cancel","topic":"","x":100.60000610351562,"y":276.6000232696533,"wires":[["8a6beef7.9721d"]]},{"id":"13a2654c.94adcb","type":"function","z":"243e8e0d.7711a2","name":"job Selection","func":"if(msg.payload==\"admin.\"){\n global.set(\"job\",0);\n \n}\nelse if(msg.payload==\"technician\"){\n global.set(\"job\",9);\n \n}\nelse if(msg.payload==\"services\"){\n global.set(\"job\",7);\n \n}else if(msg.payload==\"management\"){\n global.set(\"job\",4);\n \n}else if(msg.payload==\"retired\"){\n global.set(\"job\",5);\n \n}else if(msg.payload==\"blue-collar\"){\n global.set(\"job\",1);\n \n}else if(msg.payload==\"unemployed\"){\n global.set(\"job\",10);\n \n}else if(msg.payload==\"entrepreneur\"){\n global.set(\"job\",2);\n \n}else if(msg.payload==\"housemaid\"){\n global.set(\"job\",3);\n \n}else if(msg.payload==\"unknown\"){\n global.set(\"job\",11);\n \n}else if(msg.payload==\"self-employed\"){\n global.set(\"job\",6);\n \n}else if(msg.payload==\"student\"){\n global.set(\"job\",8);\n \n}\n\nreturn msg;","outputs":1,"noerr":0,"x":698,"y":379.8000183105469,"wires":[["26aca08f.f53bc"]]},{"id":"8a6beef7.9721d","type":"function","z":"243e8e0d.7711a2","name":"Input","func":"global.set(\"age\",msg.payload.age);\nglobal.set(\"defaulter\",msg.payload.defaulter);\nglobal.set(\"balance\",msg.payload.balance);\nglobal.set(\"housing\",msg.payload.housing);\nglobal.set(\"loan\",msg.payload.loan);\nglobal.set(\"duration\",msg.payload.duration);\nglobal.set(\"campaign\",msg.payload.campaign);\nglobal.set(\"pdays\",msg.payload.pdays);\nglobal.set(\"previous\",msg.payload.previous);\nreturn msg;","outputs":1,"noerr":0,"x":313.00000381469727,"y":277.00000762939453,"wires":[["c9d81004.2c0c"]]},{"id":"eb4a8ae5.1b50a8","type":"ui_text","z":"243e8e0d.7711a2","group":"4f8c8e21.4457c","order":8,"width":0,"height":0,"name":"","label":"deposit","format":"{{msg.payload}}","layout":"row-spread","x":1114.0000267028809,"y":283.00002670288086,"wires":[]},{"id":"26aca08f.f53bc","type":"debug","z":"243e8e0d.7711a2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":979,"y":509,"wires":[]},{"id":"4b04850e.7a8eac","type":"ui_dropdown","z":"243e8e0d.7711a2","name":"","label":"marital","tooltip":"","place":"Select option","group":"4f8c8e21.4457c","order":5,"width":0,"height":0,"passthru":true,"options":[{"label":"single","value":"single","type":"str"},{"label":"married","value":"married","type":"str"},{"label":"divorced","value":"divorced","type":"str"}],"payload":"","topic":"","x":435.5,"y":433.79998779296875,"wires":[["4c7faf68.2777d"]]},{"id":"c8a8ef4a.394f2","type":"ui_dropdown","z":"243e8e0d.7711a2","name":"","label":"education","tooltip":"","place":"Select option","group":"4f8c8e21.4457c","order":6,"width":0,"height":0,"passthru":true,"options":[{"label":"primary","value":"primary","type":"str"},{"label":"secondary","value":"secondary","type":"str"},{"label":"tertiary","value":"tertiary","type":"str"},{"label":"unknown","value":"unknown","type":"str"}],"payload":"","topic":"","x":427.3000183105469,"y":485.20001220703125,"wires":[["d409fffc.7fbe8"]]},{"id":"1020ab28.08e055","type":"ui_dropdown","z":"243e8e0d.7711a2","name":"","label":"contact","tooltip":"","place":"Select option","group":"4f8c8e21.4457c","order":2,"width":0,"height":0,"passthru":true,"options":[{"label":"celluar","value":"celluar","type":"str"},{"label":"telephone","value":"telephone","type":"str"},{"label":"unknown","value":"unknown","type":"str"}],"payload":"","topic":"","x":430.1000061035156,"y":537.6000366210938,"wires":[["4b4bd9a7.303e88"]]},{"id":"99998a82.89abc8","type":"ui_dropdown","z":"243e8e0d.7711a2","name":"","label":"month","tooltip":"","place":"Select option","group":"4f8c8e21.4457c","order":3,"width":0,"height":0,"passthru":true,"options":[{"label":"jan","value":"jan","type":"str"},{"label":"feb","value":"feb","type":"str"},{"label":"mar","value":"mar","type":"str"},{"label":"apr","value":"apr","type":"str"},{"label":"may","value":"may","type":"str"},{"label":"jun","value":"jun","type":"str"},{"label":"jul","value":"jul","type":"str"},{"label":"aug","value":"aug","type":"str"},{"label":"sep","value":"sep","type":"str"},{"label":"oct","value":"oct","type":"str"},{"label":"nov","value":"nov","type":"str"},{"label":"dec","value":"dec","type":"str"}],"payload":"","topic":"","x":437.5000305175781,"y":591.7999877929688,"wires":[["725ec9da.c6e198"]]},{"id":"665fa1e0.67296","type":"ui_dropdown","z":"243e8e0d.7711a2","name":"","label":"poutcome","tooltip":"","place":"Select option","group":"4f8c8e21.4457c","order":4,"width":0,"height":0,"passthru":true,"options":[{"label":"success","value":"success","type":"str"},{"label":"failure","value":"failure","type":"str"},{"label":"unknown","value":"unknown","type":"str"},{"label":"other","value":"other","type":"str"}],"payload":"","topic":"","x":427.5,"y":648,"wires":[["1baeca46.5bde86"]]},{"id":"4c7faf68.2777d","type":"function","z":"243e8e0d.7711a2","name":"martial selection","func":"if(msg.payload==\"married\"){\n global.set(\"marital\",1);\n \n}else if(msg.payload==\"single\"){\n global.set(\"marital\",2);\n \n}else if(msg.payload==\"divorced\"){\n global.set(\"marital\",0);\n \n}\nreturn msg;","outputs":1,"noerr":0,"x":708.0999755859375,"y":434,"wires":[["26aca08f.f53bc"]]},{"id":"d409fffc.7fbe8","type":"function","z":"243e8e0d.7711a2","name":"education selection","func":"if(msg.payload==\"secondary\"){\n global.set(\"education\",1);\n \n}else if(msg.payload==\"tertiary\"){\n global.set(\"education\",2);\n \n}else if(msg.payload==\"primary\"){\n global.set(\"education\",0);\n \n}else if(msg.payload==\"unknown\"){\n global.set(\"education\",3);\n \n}\nreturn msg;","outputs":1,"noerr":0,"x":715.0999755859375,"y":488.6000671386719,"wires":[["26aca08f.f53bc"]]},{"id":"4b4bd9a7.303e88","type":"function","z":"243e8e0d.7711a2","name":"contact selection","func":"if(msg.payload==\"celluar\"){\n global.set(\"contact\",0);\n \n}else if(msg.payload==\"telephone\"){\n global.set(\"contact\",1);\n \n}else if(msg.payload==\"unknown\"){\n global.set(\"contact\",2);\n \n}\nreturn msg;","outputs":1,"noerr":0,"x":715.0999755859375,"y":542.6000366210938,"wires":[["26aca08f.f53bc"]]},{"id":"725ec9da.c6e198","type":"function","z":"243e8e0d.7711a2","name":"month selection","func":"if(msg.payload==\"jan\"){\n global.set(\"month\",4);\n}else if(msg.payload==\"feb\"){\n global.set(\"month\",3);\n \n}else if(msg.payload==\"mar\"){\n global.set(\"month\",7);\n \n}else if(msg.payload==\"apr\"){\n global.set(\"month\",0);\n \n}else if(msg.payload==\"may\"){\n global.set(\"month\",8);\n \n}else if(msg.payload==\"jun\"){\n global.set(\"month\",6);\n \n}else if(msg.payload==\"jul\"){\n global.set(\"month\",5);\n \n}else if(msg.payload==\"aug\"){\n global.set(\"month\",1);\n \n}else if(msg.payload==\"sep\"){\n global.set(\"month\",11);\n \n}else if(msg.payload==\"oct\"){\n global.set(\"month\",10);\n \n}else if(msg.payload==\"nov\"){\n global.set(\"month\",9);\n \n}else if(msg.payload==\"dec\"){\n global.set(\"month\",2);\n \n}\nreturn msg;","outputs":1,"noerr":0,"x":705.0999755859375,"y":597.6000366210938,"wires":[["26aca08f.f53bc"]]},{"id":"1baeca46.5bde86","type":"function","z":"243e8e0d.7711a2","name":"poutcome selection","func":"if(msg.payload==\"unknown\"){\n global.set(\"poutcome\",3);\n \n}else if(msg.payload==\"failure\"){\n global.set(\"poutcome\",0);\n \n}else if(msg.payload==\"other\"){\n global.set(\"poutcome\",1);\n \n}else if(msg.payload==\"success\"){\n global.set(\"poutcome\",2);\n \n}\nreturn msg;","outputs":1,"noerr":0,"x":713.1000366210938,"y":649.6000366210938,"wires":[["26aca08f.f53bc"]]},{"id":"4f8c8e21.4457c","type":"ui_group","z":"","name":"ML Model","tab":"4d2611e.96494f","order":1,"disp":true,"width":"6","collapse":false},{"id":"4d2611e.96494f","type":"ui_tab","z":"","name":"Predictive Analytics For Retail Banking","icon":"dashboard","disabled":false,"hidden":false}]