#Map just Durham records and color by a field value
map2 = gis.map('Durham County, NC') #Create the map object, centered on Durham, NC
map2.add_layer(tractsLayer,{"definition_expression":"COUNTY='Durham'", #Filter records for just Durham
"renderer":"ClassedColorRenderer", #Create a color renderer object
"field_name":"POPULATION", #Color based on the POPULATION field values
"opacity":0.7 #Lighten the opacity
})
map2

error message:
Could not update layer. [feature-layer-adapter:insufficient-data]: No features are available to calculate statistics See the browser console for more info.