<jupyter_start><jupyter_text>Add a bunch of web layers<jupyter_code>flayer_search_result = gis.content.search("owner:esri","Feature Layer", outside_org=True)
flayer_search_result<jupyter_output><empty_output><jupyter_text>Add Item objects<jupyter_code>world_timezones_item = flayer_search_result[3]
usa_map.add_layer(world_timezones_item)<jupyter_output><empty_output><jupyter_text>Add Layer objects<jupyter_code>usa_freeways_item = flayer_search_result[-4]
freeways_flayer = usa_freeways_item.layers[0]
freeways_flayer
usa_map.add_layer(freeways_flayer, {"renderer":"ClassedSizeRenderer", "field_name": "DIST_MILES"})<jupyter_output><empty_output><jupyter_text>remove layers<jupyter_code>usa_map.layers
usa_map.remove_layers([freeways_flayer])<jupyter_output><empty_output><jupyter_text>draw graphics<jupyter_code>usa_map.draw('rectangle')
usa_map.draw('downarrow')
usa_map.clear_graphics()<jupyter_output><empty_output><jupyter_text>Save map<jupyter_code>item_properties={'title':'USA time zones and capitols',
                    'snippet': 'Jupyter notebook widget saved as a web map',
                    'tags':['automation', 'python']}
webmap_item = usa_map.save(item_properties, thumbnail='./webmap_thumbnail.png', folder='webmap_api')
webmap_item<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11906614785992217, 'fraction_numerical': 0.0023346303501945525, 'mean_word_length': 10.690909090909091, 'pattern_counts': {'":': 2, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '163017', 'license': 'Apache-2.0', 'n_tokens_mistral': 474, 'n_tokens_neox': 467, 'n_words': 50, 'path': 'talks/DevSummit2018/ArcGIS Python API - Advanced Scripting/mapping/mapping.ipynb', 'repo_name': 'nitz21/arcpy', 'size': '1285'}