View source: R/hc_dispersion.R
| hc_dispersion | R Documentation |
Compare each query's share of hits with the corpus-token share of each part. The chart uses stored distributions and makes no requests to KorAP.
hc_dispersion(df, partition = NULL, top = NULL)
df |
A query-based |
partition |
Name of one partition in the result. May be omitted when the result contains only one partition. Variants must use the same parts, token sizes, virtual-corpus definitions, KorAP instance and index revision. |
top |
Number of parts to show individually. NULL (default) shows all
calendar years for year/date partitions, and 12 parts otherwise. Parts are ranked
by the largest hit share across the variants, with token size breaking ties.
Remaining parts are combined into an additional labelled bar group.
|
Percentages use hits and tokens within the listed, positive-sized parts, matching the population used by the dispersion measures. Positive-sized parts without hits are retained. A zero-hit variant has no defined hit-share distribution and is identified in the caption without drawing hit-share bars.
Grey bars show corpus-token shares; coloured bars show the query variants. Tooltips distinguish shares of total frequency from relative frequencies per million tokens, and show absolute frequencies and subcorpus sizes. Click individual variant bars to open their stored concordance links. Corpus-token bars and combined remainder bars have no concordance link.
Sample-based results are labelled as estimates, with inclusion probabilities in tooltips. Page clustering can strongly bias these shares. The chart does not provide confidence intervals or an overall ranking of dispersion scores. The interface and display may change in future releases.
A highchart htmlwidget, customizable with highcharter functions.
Generated chart text and number formatting follow the browser's preferred
German or English language, falling back to English. Query names and custom
labels are retained. Set options(rkorap.chart.language = "de") or "en"
before creating charts to fix the language for exports; "auto" restores
browser selection. IPM means instances per million tokens.
Other highcharter-helpers:
hc_add_onclick_korap_search(),
hc_freq_bar_ci(),
hc_freq_by_year_ci()
## Not run:
d <- KorAPConnection() |>
corpusQuery(c(star = "[orth='Nutzer*innen']",
colon = "[orth='Nutzer:innen']")) |>
fetchSamplePages(maxHits = Inf) |>
dispersionAnalysis(by = "source")
hc_dispersion(d, top = 12)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.