You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature was merged in the main branch just today, and there hasn't been a release yet, so at the very least you'll have to install from the main branch on github to have it working. It is also fairly new, but it was working when merged, so hopefully working with a pull from the main branch (as of now) should work...
Datamapplot is an amazing package! I am having some problems with the colormap argument.
TypeError Traceback (most recent call last)
Cell In[262], line 1
----> 1 plot = datamapplot.create_interactive_plot(
2 reduced_embedding,
3 labels_big,
4 labels,
5
6 text_collision_size_scale=3,
7 min_fontsize=8,
8 max_fontsize=28,
9
10 hover_text = titles,
11 enable_search=True,
12 on_click="window.open(
http://google.com/search?q=\"{hover_text}\"
)",13
14 font_family="Montserrat",
15 title="Information and Democracy Literatues Landscape",
16 sub_title="A data map of literature from the Observatory on Information and Democracy's first research cycle",
17
18
19
20 #Layout
21 cluster_boundary_polygons=True,
22 cluster_boundary_line_width=2,
23 initial_zoom_fraction=2,
24 darkmode=True,
25 #width=1044,
26 #height=1048,
27 #selection_handler=datamapplot.selection_handlers.DisplaySample(n_samples=50),
28
29
30 #Extra Features
31 histogram_data=visualization_df["Publication Year"].astype('str').fillna('NA'),
32 histogram_n_bins=20,
33 histogram_settings={
34 "histogram_log_scale":False,
35 "histogram_title":"Publication Year",
36 "histogram_bin_fill_color":"#a64531",
37 "histogram_bin_unselected_fill_color":"#d6a591",
38 "histogram_bin_selected_fill_color":"#f68571",
39 "histogram_width":300,
40 "histogram_height":100,
41 },
42
43 colormap_rawdata=[visualization_df.region],
44 colormap_metadata=[
45 {"field": "field", "description": "region", "cmap": "tab20b", "kind": "categorical", "n_colors": 3},
46 ]
47 )
File ~/gioenvironment/lib/python3.9/site-packages/datamapplot/create_plots.py:607, in create_interactive_plot(data_map_coords, hover_text, inline_data, noise_label, noise_color, color_label_text, label_wrap_width, label_color_map, width, height, darkmode, palette_hue_shift, palette_hue_radius_dependence, cmap, marker_size_array, marker_color_array, marker_alpha_array, use_medoids, cluster_boundary_polygons, color_cluster_boundaries, polygon_alpha, cvd_safer, jupyterhub_api_token, *label_layers, **render_html_kwds)
604 marker_alpha_array *= 255
605 point_dataframe["a"] = marker_alpha_array.astype(np.uint8)
--> 607 html_str = render_html(
608 point_dataframe,
609 label_dataframe,
610 inline_data=inline_data,
611 color_label_text=color_label_text,
612 darkmode=darkmode,
613 **render_html_kwds,
614 )
616 return InteractiveFigure(html_str, width=width, height=height, api_token=jupyterhub_api_token)
TypeError: render_html() got an unexpected keyword argument 'colormap_rawdata'
The text was updated successfully, but these errors were encountered: