<jupyter_start><jupyter_text>Static Snapshot MapThis example shows how to download a region estimate map snapshot from Tetrad's Google Storage database and display it as an overlay on a map, like the image below.![Static Map](files/map.png "Static Map") The `StaticViz` object extends a Folium Map and is used to create static visualizations.<jupyter_code>from viztools import StaticViz
import requests<jupyter_output><empty_output><jupyter_text>First we create a new instance by downloading a snapshot from our server. Currently this is the only form of data you can add to a StaticViz object. Snapshots on our server are categorized according to region (`slc_ut`, `clev_oh`, `chatt_tn`, `kc_mo`) and snapshots are created at 15-minute intervals. Let's create a `StaticViz` object by downloading some data:<jupyter_code>viz = StaticViz.from_gs(
        region='slc_ut',
        timestamp='2022-01-28T15:00:00Z',
        zoom=11)<jupyter_output><empty_output><jupyter_text>When we download the snapshot, a few things happen automatically. First an image is created from the snapshot. Next, a Folium Map is intialized at the geographical center of the snapshot. Finally, the image is overlaid onto the Folium Map. Now that we have every created, let's see how it looks. We can save it directly to an HTML file and view it in our browser.<jupyter_code>viz.save_map('/tmp/map.html')
!open /tmp/map.html<jupyter_output>Saving map to: /tmp/map.html<jupyter_text>We can also save it to a PNG by taking a screenshot, which uses `selenium` under the hood.<jupyter_code>viz.save_map('/tmp/map.png')
!open /tmp/map.png<jupyter_output>Saving map to: /tmp/map.png
{'fraction_non_alphanumeric': 0.07874015748031496, 'fraction_numerical': 0.010902483343428226, 'mean_word_length': 5.164179104477612, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '326134', 'license': 'MIT', 'n_tokens_mistral': 522, 'n_tokens_neox': 492, 'n_words': 205, 'path': 'examples/Static Snapshot Map.ipynb', 'repo_name': 'tetradsensors/tetrad-viz-toolkit', 'size': '1651'}