Question
Finding Max Value in Python 3 Dictionary, List, Tuples, Shapefile (SHP) using FIONA I have this code: ------------------------------------------ import fiona import pprint c = fiona.open('C:/Users/root/Python/mi_airports.shp',
Finding Max Value in Python 3 Dictionary, List, Tuples, Shapefile (SHP) using FIONA
I have this code:
------------------------------------------
import fiona import pprint
c = fiona.open('C:/Users/root/Python/mi_airports.shp', 'r')
filtered = list(filter(lambda f: f['properties']['COUNTY']=='Ingham', c))
pprint.pprint(filtered)
------------------------------------------------------
The above code will output this:
Any idea how I can find the maximum/highest value for ELEVATION for that data? The output should be like this:
Airport Name: Elevation:
Thank you in advance.
[( geometry': ('coordinates (637124.625, 243914.625), 'type 'Point', id' 287 'properties': OrderedDict (('ID, 15091), 'NAME, 'Maidens Airport'), ('TYPE, 'airport'), 'COUNTY', 'Ingham'), 'FIPS, 26065), (Y COR', 424400), ('X COR', 841924), 'ELEVATION', 920), 'LOCATION', 'Williamston')]), type Feature', 'geometry 'coordinates (619684.5625, 243675.34375), 'type 'Point', 'id': '289" 'properties': OrderedDict (('ID, 15105), 'NAME, 'Edward W Sparrow Hospital Heliport'), 'TYPE, 'airport'), COUNTY 'Ingham), 'FIPS', 26065), ('Y COR', 424403), ("X-COR", -843211), 'ELEVATION, 860), (' LOCATION' , ' Lansing South ), type Feature', {'geometry ('coordinates' (623497.125, 242911.171875), 'type 'Point', id' 290 'properties': OrderedDict (I'ID', 15179), 'NAME, 'State Police Headquarters Heliport), 'TYPE, 'airport), 'COUNTY 'Ingham'), 'FIPS', 26065), ('Y COR, 424336), 'X COR', 842924), 'ELEVATION, 860), 'LOCATION, 'East Lansing')]), type FeatureStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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