Ported market-research.js to python
Porting market-reserch.js to python and applied pep8