API (Application Programming Interface) is a computing interface that interacts between multiple software.
Commands to install modules:
pip install matplotlib pip install requests pip install pandas
- Importing all required modules.
- Calling API and getting JSON data.
- Getting the State Wise District Data.
- Visualization of data.
The below URL redirects you to API https://api.covid19india.org/state_district_wise.json
Importing all required modules
Function for getting JSON data from API and Visualization of Data
Getting State Names available in JSON Data
Getting the state-wise Data
Creating DataFrame Using pandas
Data Visualization Using Matplotlib
Final casesData() function code
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.