Using PokeAPI dataset, lets try to find fitness levels of various pokemons and suggest appropriate exercises!
I've been writing code for about 20 months
To run the project follow the steps below:
- Create a virtual env and install the dependencies using pip install -r requirements.txt ( Dependencies needed: requests, pandas, matplotlib )
- Run the command: python .\main.py
- Enter the pokemon Name and get access to its fitness profile and suggested workout plans
The code flow is explained breifly in the steps below:
- First we get the names of pokemons(say 500) and then using /pokemon/{name} we get access to its profile.
- We store its weight, height and then calculate its BMI.
- We also store its 'type' is another table. Its stored in another table as its 1:m relation, thus we need to normalise the table.
- We sort the dataframe using BMI as the key, do some analytics( check out Analysis.ipynb ) such as line graph of BMI's and boxplot to get the mean and outliers.
- Using some basic filters we categorize the pokemon into obese, overweight, healthy or underweight.
- We encourage the pokemons to adopt healthier lifestyle.
Enter pokemon name to access its Fitness Profile or STOP to exit:
snorlax
Pokemon Name: snorlax
Fitness Level: Obese
Exercises Suggested: Slow Walking/ Swimming
Remarks: You need to work hard towards a healthier lifestyle!
Enter pokemon name to access its Fitness Profile or STOP to exit:
pikachu
Pokemon Name: pikachu
Fitness Level: Healthy
Exercises Suggested: Running/ Sports/ Mountain Climbing
Remarks: Keep it up, being healthy is a journey!
We can continue the development of this project using some pointers below:
- Add a diet plan using the /berry/{id or name}/ endpoint to suggest proper diet to various pokemons!
- Have multiple fitness events organised and invite all the appropriate pokemons to it!