url ' requests get(urlprint("status code:" status_codestore api response in variable response_dict json(print("total repositories:"response_dict['total_count']explore information about the repositories repo_dicts response_dict['items' namesstars [][for repo_dict in repo_dictsv names append(repo_dict['name']stars append(repo_dict['stargazers_count']make visualization my_style ls('# 'base_style=lcsx chart pygal bar(style=my_stylex_label_rotation= show_legend=falsechart title 'most-starred python projects on githubchart x_labels names chart add(''starschart render_to_file('python_repos svg'we start by importing pygal and the pygal styles we'll need for the chart we continue to print the status of the api call response and the total number of repositories foundso we'll know if there was problem with the api call we no longer print information about the specific projects that are returnedbecause that information will be included in the visualization at we create two empty lists to store the data we'll include in the chart we'll need the name of each project in order to label the barsand we'll need the number of stars to determine the height of the bars in the loopwe append the name of each project and number of stars it has to these lists next we define style using the lightenstyle class (alias lsand base it on dark shade of blue we also pass the base_style argument to use the lightcolorizedstyle class (alias lcswe then use bar(to make simple bar chart and pass it my_style we pass two more style argumentswe set the rotation of the labels along the -axis to degrees (x_label_rotation= )and we hide the legendbecause we're plotting only one series on the chart (show_legend=falsewe then give the chart title and set the x_labels attribute to the list names because we don' need this data series to be labeledwe pass an empty string for the label when we add the data at the resulting chart is shown in figure - we can see that the first few projects are significantly more popular than the restbut all of them are important projects in the python ecosystem working with apis