Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Go to the Food Bank information page from https://data.virginia.gov/api/views/xvir-sctz/rows.xml?accessType=DOWNLOAD Use that page to obtain the data using requests. Examine the structure of the data. Generate
- Go to the Food Bank information page from https://data.virginia.gov/api/views/xvir-sctz/rows.xml?accessType=DOWNLOAD
- Use that page to obtain the data using requests.
- Examine the structure of the data.
- Generate the code in Python to obtain the names of the localities where the greatest distribution of food in pounds was made, the greatest number of individuals served, and the greatest number of households served in the month of April 2019.
- Print your name and the labels for the data requested.
- Markdown or comment on your code and submit a Jupyter Notebook file named ScrapeXML.ipynb.
import requests from 1xml import objectify URL = 'https://data.virginia.gov/api/views/xvir-sctz/rows.xml? accessType=DOWNLOAD' response = requests.get(URL).content import requests from 1xml import objectify #parse xml file root = objectify.fromstring(response) #print data print (response)
Step by Step Solution
★★★★★
3.44 Rating (154 Votes )
There are 3 Steps involved in it
Step: 1
To obtain data from a URL examine its structure and generate Python code to retrieve specific information you can use libraries like requests and Beau...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started