4. Interactive Visualization of Data across Strata
Activity 4: Generate a Bar Plot and a Heatmap to Represent Content Rating Types in the Google Play Store Apps Dataset
Solution
- Load the necessary Python modules and download the dataset hosted in the book GitHub repository and format it as a
pandas
DataFrame:# load pandas library Import pandas as pd # download file 'googleplaystore.csv' from course GitHub repository # read the dataset as a pandas DataFrame gps_apps_df =pd.read_csv('https://raw.githubusercontent.com/TrainingByPackt/Interactive-Data-Visualization-with-Python/master/datasets/googleplaystore.csv') #worldrank_df = pd.read_csv('https://raw.githubusercontent.com/TrainingByPackt/Interactive-Data-Visualization-with-Python/master/datasets/googleplaystore.csv') # preview DataFrame gps_apps_df.head()
The output is as follows:
Figure 4.30: Google Play Store dataset apps
- Remove the entries in the DataFrame that have feature values of
NA...