To be able to edit code and run cells, you need to run the notebook yourself. Where would you like to run the notebook?

In the cloud (experimental)

Binder is a free, open source service that runs scientific notebooks in the cloud! It will take a while, usually 2-7 minutes to get a session.

On your computer

(Recommended if you want to store your changes.)

  1. Copy the notebook URL:
  2. Run Pluto

    (Also see: How to install Julia and Pluto)

  3. Paste URL in the Open box

Frontmatter

If you are publishing this notebook on the web, you can set the parameters below to provide HTML metadata. This is useful for search engines and social media.

Author 1

Edit x!

👀 Reading hidden code
md"""
Edit `x`!
"""
191 μs
👀 Reading hidden code
x = [80, 500]
15.4 μs
👀 Reading hidden code
"""
<script src="https://cdn.jsdelivr.net/npm/d3@6.2.0/dist/d3.min.js"></script>

<script id="hello">

const x = $(JSON.json(x))
const svg = this == null ? DOM.svg(600,200) : this
const s = this == null ? d3.select(svg) : this.s

s.selectAll("circle")
.data(x)
.join("circle")
.transition()
.duration(300)
.attr("cx", d => d)
.attr("cy", 100)
.attr("r", 10)
.attr("fill", "gray")


const output = svg
output.s = s
return output
</script>

""" |> HTML
181 ms
👀 Reading hidden code
begin
using Pkg
Pkg.activate(mktempdir())
Pkg.add([
Pkg.PackageSpec(name="JSON"),
])
import JSON
end
❔
  Activating new project at `/tmp/jl_KRGwT0`
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
    Updating `/tmp/jl_KRGwT0/Project.toml`
  [682c06a0] + JSON v0.21.4
    Updating `/tmp/jl_KRGwT0/Manifest.toml`
  [682c06a0] + JSON v0.21.4
  [69de0a69] + Parsers v2.8.1
  [aea7be01] + PrecompileTools v1.2.1
  [21216c6a] + Preferences v1.4.3
  [ade2ca70] + Dates
  [a63ad114] + Mmap
  [de0858da] + Printf
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [fa267f1f] + TOML
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
2.3 s