I use the following code in order to get the city the iss is flying over. I used the code from the astro-pi tutorial():
import reverse_geocoder from orbit import ISS coordinates = ISS.coordinates() coordinate_pair = ( coordinates.latitude.degrees, coordinates.longitude.degrees) location = reverse_geocoder.search(coordinate_pair) print(location) This is what i get
[OrderedDict([ ('lat', '42.82701'), ('lon', '-75.54462'), ('name', 'Hamilton'), ('admin1', 'New York'), ('admin2', 'Madison County'), ('cc', 'US') ])] What kind of data is this ? and how can i for example print out only name and get Hamilton
1 Answer
Maurice Meyer helped me solve the issue
print(location[0]['name']) 1