The background: from 2008 to 2014(84 months) every month there is a snapshot of all the borrowers in different segment(7 segments), and the predicted cumulative probability of default for the borrowers in the successive months. If we plot all the graphs, there will be 84*7 = 588 graphs. Now We want to provide the dashboard to let the users have the choice to select month and segment to view the cumulative PD. At the beginning I represent this in shiny, which is excellent for this job except R is a little slow.
The modeling job and the calculation was done in python, so I want to do all the job in python. Spyre is good to play this role.
In this part I will show how to install spyre.
- the easiest way is run
pip install dataspyre
in you can access internet, but the horrible thing is the bank prohibited from connecting to the outside links like git - then the only way is to manually install it:
- go to cherrypy to download cherrypy and install it
- go to spyre git page to download the spyre zip file and unzip in c:\download\spyre
- run
CMD
thencd c:\download\spyre
, and then runpython setup.py install
to install it - save the example code as
spyre_example.py
and then run it on pythonpython spyre_example.py
- at last, in the browser, open
http://127.0.0.1:8080
to view the results
another that is similar is Pyxley for building data dashboard.