<jupyter_start><jupyter_text>Canada Census Map<jupyter_code>canada = gpd.read_file('canada_cd_sim.geojson')
canada['CDUID'] = canada['CDUID'].astype(int)
census = pd.read_csv('wrangled_census.csv')
census = census[census['Year']==2016]
canada
full = canada.merge(census, right_on = 'geographic_code', left_on='CDUID')

full
full['geometry'][5]
print(full['geometry'][5])
full["coord-x"] = full['geometry'].centroid.map(lambda p: p.x)
full["coord-y"] = full['geometry'].centroid.map(lambda p: p.y)
w2 = keplergl.KeplerGl(height=800, width=600)
w2.add_data(full, name = "Census")
w2
w3 = keplergl.KeplerGl(height=1000)
w3.add_data(canada, name = "Regions")
w3.add_data(census, name = 'census')
w3<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1878453038674033, 'fraction_numerical': 0.031767955801104975, 'mean_word_length': 8.539473684210526, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '607841', 'license': 'MIT', 'n_tokens_mistral': 311, 'n_tokens_neox': 303, 'n_words': 43, 'path': '2 - Basics of Kepler.gl/Kepler_tutorial.ipynb', 'repo_name': 'firasm/keplergl_tutorial', 'size': '724'}