Skip to content

Instantly share code, notes, and snippets.

@aaizemberg
Last active January 20, 2022 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaizemberg/de2214524011963b33a56c6db134e9bc to your computer and use it in GitHub Desktop.
Save aaizemberg/de2214524011963b33a56c6db134e9bc to your computer and use it in GitHub Desktop.
Mi segundo Plot fuera de ObservableHQ
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Plot</title>
<script src="https://cdn.jsdelivr.net/npm/d3@7"></script>
<script src="https://cdn.jsdelivr.net/npm/@observablehq/plot@0.2"></script>
</head>
<body>
<div id="vis"></div>
<script>
d3.tsv("https://aaizemberg.github.io/vis/01/data/poblacion.tsv", d3.autoType).then(function(data) {
d3.select("div#vis").append( () => Plot.plot({
marks: [
Plot.barX(data, {
y: "provincia",
x: "poblacion"
})
],
marginLeft: 250
}))
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment