<jupyter_start><jupyter_text>Displaying Constellate visualizations in a notebookThis notebook demonstrates how to use the Constellate client library to generate visualizations that match the Constellate web application. First, import the constellate client charting module.<jupyter_code>from constellate import charts<jupyter_output><empty_output><jupyter_text>Display the documentation from the client library that demonstrates the different ways visualizations can be embedded in a notebook.<jupyter_code>charts?<jupyter_output><empty_output><jupyter_text>Create a sample query using the [Constellate search syntax](https://constellate.org/docs/constellate-search-syntax). A dataset id can also be used. Simply replace the q variable here with a dataset id. [Capsaicin](https://en.wikipedia.org/wiki/Capsaicin) is chemical compound found in chilli peppers. It plays an important role in the research of the [2021 Nobel Prize in Medicine](https://www.nobelprize.org/prizes/medicine/2021/press-release/), <NAME> and <NAME>.<jupyter_code>q = {"keyword": "capsaicin", "start": 1971}<jupyter_output><empty_output><jupyter_text>Display a bar plot showing the documents over time matching the query.<jupyter_code>charts.documents_over_time(q)<jupyter_output><empty_output><jupyter_text>Display a word bubble visualation of significant key phrases. This plot is interactive. Click on a bubble.<jupyter_code>charts.keyphrases(q)<jupyter_output><empty_output><jupyter_text>Display a line plot showing document categories over time.<jupyter_code>charts.categories_over_time(q)<jupyter_output><empty_output><jupyter_text>Plot the occurrence of terms over time. You can also use the input box to change the terms after the plot is rendered.<jupyter_code>charts.term_frequency(q, terms=["julius", "patapoutian"])<jupyter_output><empty_output><jupyter_text>A word cloud of keyphrases is also available, although currently not available in the Constellate application.<jupyter_code>charts.word_cloud(q)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08126858275520317, 'fraction_numerical': 0.005946481665014866, 'mean_word_length': 7.933628318584071, 'pattern_counts': {'":': 2, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 3, 'lorem ipsum': 0, 'www.': 1, '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': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '123845', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 618, 'n_tokens_neox': 574, 'n_words': 181, 'path': 'examples/display-constellate-visualizations.ipynb', 'repo_name': 'LorenzoBabini/intro', 'size': '2035'}