metamorph.ml icon indicating copy to clipboard operation
metamorph.ml copied to clipboard

rdadasets -- use info URL for dataset name

Open daslu opened this issue 9 months ago • 0 comments

One thing that might improve the experience is using the informative URL (currenty used for the docstring) as the name of the resulting dataset. This will create a clickable link when the dataset is presented in notebooks.

Example:

(require '[scicloj.metamorph.ml.rdatasets :as rdatasets]
          [tablecloth.api :as tc])

(let [f #'rdatasets/ggplot2-economics_long
      {:keys [name doc-link]} (meta f)]
  (tc/set-dataset-name
   (f)
   (format "[%s](%s)" name doc-link)))

Image

This is what we get in the Clay [:quarto :html] rendering, and the Clay direct [:html] rendering is similar. The reason is that Kindly defines the following rule for rendering datasets: simply print them and render as markdown. This is the link we get: ggplot2-economics_long (linking to the Rdatasets doc).

Zulip discussion: https://clojurians.zulipchat.com/#narrow/channel/321125-noj-dev/topic/rdadasets.20--.20use.20info.20URL.20for.20dataset.20name.3F/with/504402838

daslu avatar Mar 09 '25 15:03 daslu