In the JSON format of the earthquake data, the longitude,latitude, and depth are reported in that order in a list, which isthe value of the "coordinates" key under the "geometry" key. Figurebelow. Write a function to create a list of longitudes from thisdata.
HN34567890 1 2 10 def makeMagList (earthquakeData) : magList [] earthquakes = for i in range (len (earthquakes)): = earthquakeData.get('features') earthquake properties = return magList = earthquakes earthquake.get('properties') mag = properties.get('mag') magList.append (mag)
In the JSON format of the earthquake data, the longitude, latitude, and depth are reported in that order in a list, whic
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am