<jupyter_start><jupyter_text>Load ProbabilitiesLoad geographic and hesitancy data for Multnomah County, Oregon.<jupyter_code>county = "Multnomah"
state = "OR"
geo_df = odyn.get_county_mapping_data(county = county, state = state)
hesitancy_dict = odyn.get_hesitancy_dict(geo_df)
prob = list(hesitancy_dict.values())
geo_df
odyn.vaccine_trends_plot(county = county, 
                        state = state, 
                        show_us_current = True,
                        download_data = False)
odyn.relative_vaccine_trends_plot(county = county, 
                        state = state, 
                        download_data = False)<jupyter_output><empty_output><jupyter_text>Triangulate and Populate County<jupyter_code>odyn.plot_triangulated_county(geo_df)
bounding_box = [[-121.965, 45.62], 
                [-121.92, 45.62], 
                [-121.92, 45.65], 
                [-121.965, 45.65], 
                [-121.965, 45.62]]

odyn.plot_triangulated_county(geo_df, 
                              bounding_box = bounding_box, 
                              restricted = False,
                              aspect_ratio =1)
odyn.plot_triangulated_county(geo_df, 
                              bounding_box = bounding_box, 
                              restricted = True,
                              aspect_ratio =1)
model = odyn.OpinionNetworkModel(probabilities = prob)
agent_df = model.add_random_agents_to_triangles( 
                                        geo_df, 
                                        bounding_box = bounding_box,
                                        show_plot = True)

belief_df = model.assign_weights_and_beliefs(agent_df, show_plot = True)
# THIS WILL TAKE A FEW MOMENTS.
model = odyn.OpinionNetworkModel(probabilities = prob,
                                include_weight = True,
                                include_opinion = True,
                                importance_of_weight = 0.05,
                                importance_of_distance = 9)
model.populate_model(geo_df = geo_df, 
                     bounding_box = bounding_box)
model.plot_initial_network()
# THIS WILL TAKE A FEW MOMENTS.
model = odyn.OpinionNetworkModel(probabilities = [.45,.1,.45])
model.populate_model(num_agents = 1000)
model.plot_initial_network()
sim = odyn.NetworkSimulation()
sim.run_simulation(model = model, phases = 5)
sim.plot_simulation_results()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08120362737015664, 'fraction_numerical': 0.026380873866446827, 'mean_word_length': 1.8419203747072599, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '450603', 'license': 'MIT', 'n_tokens_mistral': 789, 'n_tokens_neox': 694, 'n_words': 120, 'path': 'notebooks/workflow_demo_Multnomah_Oregon.ipynb', 'repo_name': 'annahaensch/ODyN', 'size': '2426'}