diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..7c593d3 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Launch Program", + "program": "${workspaceFolder}\\scripts\\siteprep.js" + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index ff9a53a..eb7c854 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,4 @@ This page and project contain a live copy of the figures for the book ["Making D The figures are written in [Vega and Vega-Lite](http://vega.github.io), a JSON-based web-based language for creating sophisticated data visualizations. -Check out the interactive selector at the [Examples](examples.html) page. -There is an illustrated list of all figures at [FigureList](figurelist.html). \ No newline at end of file +The an illustrated list of all figures, with interactive code, is at [FigureList](figurelist.html). \ No newline at end of file diff --git a/_layouts/page.html b/_layouts/page.html new file mode 100644 index 0000000..6c572db --- /dev/null +++ b/_layouts/page.html @@ -0,0 +1,52 @@ +--- +--- + + + + + + + + + + {{page.number}} {{page.name}} from Making Data Visual + + + + + + + + + + + +
+
+
+

makingdatavisual.github.io

+ {% if page.title %} +

{{page.number}} {{page.title}}

+ {% endif %} +
+
+ + + + {{ page.description }} + +
+ + + + + diff --git a/examples.html b/dropdown.html similarity index 100% rename from examples.html rename to dropdown.html diff --git a/example.js b/example.js new file mode 100644 index 0000000..6599345 --- /dev/null +++ b/example.js @@ -0,0 +1,10 @@ +var container = document.querySelector('#view'), + loader = vega.loader(), + renderType = 'svg', + runtime = null, + spec = null, + view = null, + current = null; + +function load(name) { +} diff --git a/examples/5_11_density-cont.md b/examples/5_11_density-cont.md new file mode 100644 index 0000000..13095fc --- /dev/null +++ b/examples/5_11_density-cont.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: The joint distribution of efficiency, as measured in MPG, against the weight of the car. +title: Continuous Density Plot +permalink: /examples/5_11_density-cont.html +image: /img/5_11_density-cont.png +number: 5-11 +spec: 5_11_density-cont.vl.json +--- +The joint distribution of efficiency, as measured in MPG, against the weight of the car. diff --git a/examples/5_12_bar-chart.md b/examples/5_12_bar-chart.md new file mode 100644 index 0000000..d62a95e --- /dev/null +++ b/examples/5_12_bar-chart.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: Bar length shows the average efficiency by body style using the same data as in Figure 5-9. +title: Bar Chart +permalink: /examples/5_12_bar-chart.html +image: /img/5_12_bar-chart.png +number: 5-12 +spec: 5_12_bar-chart.vl.json +--- +Bar length shows the average efficiency by body style using the same data as in Figure 5-9. diff --git a/examples/5_13a_clustered-bar-chart.md b/examples/5_13a_clustered-bar-chart.md new file mode 100644 index 0000000..ab49d4a --- /dev/null +++ b/examples/5_13a_clustered-bar-chart.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: Efficiency by body style is now divided into diesel versus gas cars. +title: Paired (or Multiple) Series Bar Chart +permalink: /examples/5_13a_clustered-bar-chart.html +image: /img/5_13a_clustered-bar-chart.png +number: 5-13 +spec: 5_13a_clustered-bar-chart.vg.json +--- +Efficiency by body style is now divided into diesel versus gas cars. diff --git a/examples/5_14_justone_pie.md b/examples/5_14_justone_pie.md new file mode 100644 index 0000000..14baac8 --- /dev/null +++ b/examples/5_14_justone_pie.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: The CFPB data shows the ways that complaints have been closed. +title: Pie (or Doughnut) Chart +permalink: /examples/5_14_justone_pie.html +image: /img/5_14_justone_pie.png +number: 5-14 +spec: 5_14_justone_pie.vg.json +--- + The CFPB data shows the ways that complaints have been closed. diff --git a/examples/5_15_heatmap.md b/examples/5_15_heatmap.md new file mode 100644 index 0000000..9d0f32f --- /dev/null +++ b/examples/5_15_heatmap.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: The CFPB data shows the ways that complaints have been closed, broken out by month and year. +title: Heatmap +permalink: /examples/5_15_heatmap.html +image: /img/5_15_heatmap.png +number: 5.15 +spec: 5_15_heatmap.vl.json +--- +The CFPB data shows the ways that complaints have been closed, broken out by month and year. diff --git a/examples/5_16_scatterplot.md b/examples/5_16_scatterplot.md new file mode 100644 index 0000000..2cfc9a3 --- /dev/null +++ b/examples/5_16_scatterplot.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: The relation between curb weight and MPG for five different styles of car. +title: Scatterplot +permalink: /examples/5_16_scatterplot.html +image: /img/5_16_scatterplot.png +number: 5-16 +spec: 5_16_scatterplot.vl.json +--- +The relation between curb weight and MPG for five different styles of car. diff --git a/examples/5_17_line.md b/examples/5_17_line.md new file mode 100644 index 0000000..2f3c917 --- /dev/null +++ b/examples/5_17_line.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: Count of consumer complaints by year and month for the CFPB data. +title: Line Chart +permalink: /examples/5_17_line.html +image: /img/5_17_line.png +number: 5-17 +spec: 5_17_line.vl.json +--- +Count of consumer complaints by year and month for the CFPB data. diff --git a/examples/5_18_area-stacked.md b/examples/5_18_area-stacked.md new file mode 100644 index 0000000..8e258de --- /dev/null +++ b/examples/5_18_area-stacked.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: Count of consumer complaints, like Figure 5-17, broken out by product. Mortgages stabilized while credit reporting grew. This shows the same data as Figure 5-15. +title: Stacked Area Chart +permalink: /examples/5_18_area-stacked.html +image: /img/5_18_area-stacked.png +number: 5-18 +spec: 5_18_area-stacked.vl.json +--- +Count of consumer complaints, like Figure 5-17, broken out by product. Mortgages stabilized while credit reporting grew. This shows the same data as Figure 5-15. diff --git a/examples/5_19_force.md b/examples/5_19_force.md new file mode 100644 index 0000000..3e96457 --- /dev/null +++ b/examples/5_19_force.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: This data from the Les Miserables dataset shows coappearance in the novel between characters. The network has been truncated to 40 nodes for legibility. Colors are mapped to groups of characters +title: Node-Link View (Force-Directed Layout) +permalink: /examples/5_19_force.html +image: /img/5_19_force.png +number: 5-19 +spec: 5_19_force.vg.json +--- +This data from the Les Miserables dataset shows coappearance in the novel between characters. The network has been truncated to 40 nodes for legibility. Colors are mapped to groups of characters diff --git a/examples/5_1_scatter.md b/examples/5_1_scatter.md new file mode 100644 index 0000000..a76e8a7 --- /dev/null +++ b/examples/5_1_scatter.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: A scatterplot emphasizes the relationship between cases that received relief and those that did not for five different products. +title: Scatterplot +permalink: /examples/5_1_scatter.html +image: /img/5_1_scatter.png +number: 5-1 +spec: 5_1_scatter.vl.json +--- +A scatterplot emphasizes the relationship between cases that received relief and those that did not for five different products. diff --git a/examples/5_20_circular.md b/examples/5_20_circular.md new file mode 100644 index 0000000..9081234 --- /dev/null +++ b/examples/5_20_circular.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: This data from the Les Miserables dataset shows coappearance in the novel between characters. The network has been truncated to 40 nodes for legibility. Colors are mapped to groups of characters +title: Circular Network Layout +permalink: /examples/5_20_circular.html +image: /img/5_20_circular.png +number: 5-20 +spec: 5_20_circular.vg.json +--- +This data from the Les Miserables dataset shows coappearance in the novel between characters. The network has been truncated to 40 nodes for legibility. Colors are mapped to groups of characters diff --git a/examples/5_21_adjancency.md b/examples/5_21_adjancency.md new file mode 100644 index 0000000..9a51751 --- /dev/null +++ b/examples/5_21_adjancency.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: Shows the same data as Figures 5-19 and 5-20 +title: Adjacency Matrix +permalink: /examples/5_21_adjancency.html +image: /img/5_21_adjancency.png +number: 5-21 +spec: 5_21_adjancency.vg.json +--- +Shows the same data as Figures 5-19 and 5-20 diff --git a/examples/5_22_treeview.md b/examples/5_22_treeview.md new file mode 100644 index 0000000..368d81e --- /dev/null +++ b/examples/5_22_treeview.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: This is a hierarchy of the types of complaints to the CFPB and the percentage of them that received relief. The second layer of the tree corresponds to the values in Figures 5-1 through 5-4. +title: Tree View +permalink: /examples/5_22_treeview.html +image: /img/5_22_treeview.png +number: 5-22 +spec: 5_22_treeview.vg.json +--- +This is a hierarchy of the types of complaints to the CFPB and the percentage of them that received relief. The second layer of the tree corresponds to the values in Figures 5-1 through 5-4. diff --git a/examples/5_23_treemap.md b/examples/5_23_treemap.md new file mode 100644 index 0000000..0e52726 --- /dev/null +++ b/examples/5_23_treemap.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: Represents the same data as Figure 5-22 but adds a second dimension for size: the number of complaints. +title: Treemap +permalink: /examples/5_23_treemap.html +image: /img/5_23_treemap.png +number: 5-23 +spec: 5_23_treemap.vg.json +--- +Represents the same data as Figure 5-22 but adds a second dimension for size: the number of complaints. diff --git a/examples/5_24_sunburst.md b/examples/5_24_sunburst.md new file mode 100644 index 0000000..117f696 --- /dev/null +++ b/examples/5_24_sunburst.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: Represents the same data as Figure 5-23. +title: Sunburst plot +permalink: /examples/5_24_sunburst.html +image: /img/5_24_sunburst.png +number: 5-24 +spec: 5_24_sunburst.vg.json +--- +Represents the same data as Figure 5-23. diff --git a/examples/5_25_map.md b/examples/5_25_map.md new file mode 100644 index 0000000..0082e9f --- /dev/null +++ b/examples/5_25_map.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: Values correspond to regions, such as states or counties. This chart uses census data to look at the percentage of the population with income over $200,000. +title: Choropleth +permalink: /examples/5_25_map.html +image: /img/5_25_map.png +number: 5-25 +spec: 5_25_map.vg.json +--- +Values correspond to regions, such as states or counties. This chart uses census data to look at the percentage of the population with income over $200,000. diff --git a/examples/5_26_zip.md b/examples/5_26_zip.md new file mode 100644 index 0000000..18ef68d --- /dev/null +++ b/examples/5_26_zip.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: A scatterplot, where the x- and y-axes are geographical (or a list of geographical points); additional dimensions for size, color, or shape. Dots are located at the centroid of each zip code; the first digit encodes color. +title: Dotplot map +permalink: /examples/5_26_zip.html +image: /img/5_26_zip.png +number: 5-26 +spec: 5_26_zip.vg.json +--- +A scatterplot, where the x- and y-axes are geographical (or a list of geographical points); additional dimensions for size, color, or shape. Dots are located at the centroid of each zip code; the first digit encodes color. diff --git a/examples/5_27_wordcloud.md b/examples/5_27_wordcloud.md new file mode 100644 index 0000000..43abaee --- /dev/null +++ b/examples/5_27_wordcloud.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: The text of the Preface to this book, sized by number of uses of the word. Color in this chart is arbitrary. +title: Word Cloud +permalink: /examples/5_27_wordcloud.html +image: /img/5_27_wordcloud.png +number: 5-27 +spec: 5_27_wordcloud.vg.json +--- +The text of the Preface to this book, sized by number of uses of the word. Color in this chart is arbitrary. diff --git a/examples/5_2_clustered-bar.md b/examples/5_2_clustered-bar.md new file mode 100644 index 0000000..dc3a659 --- /dev/null +++ b/examples/5_2_clustered-bar.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: A different clustering emphasizes the different sizes of the populations who didn’t receive relief (and the similarity of those who did). +title: Clustered Barchart +permalink: /examples/5_2_clustered-bar.html +image: /img/5_2_clustered-bar.png +number: 5-3 +spec: 5_2_clustered-bar.vl.json +--- +A different clustering emphasizes the different sizes of the populations who didn’t receive relief (and the similarity of those who did). diff --git a/examples/5_3_clustered-bar-2.md b/examples/5_3_clustered-bar-2.md new file mode 100644 index 0000000..813ab66 --- /dev/null +++ b/examples/5_3_clustered-bar-2.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: A clustered bar chart emphasizes the contrast between the number of people who requested relief and those who attained it. +title: Clustered Barchart +permalink: /examples/5_3_clustered-bar-2.html +image: /img/5_3_clustered-bar-2.png +number: 5-2 +spec: 5_3_clustered-bar-2.vl.json +--- +A clustered bar chart emphasizes the contrast between the number of people who requested relief and those who attained it. diff --git a/examples/5_4_stacked.md b/examples/5_4_stacked.md new file mode 100644 index 0000000..7c80253 --- /dev/null +++ b/examples/5_4_stacked.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: A stacked bar chart emphasizes the total number of complaints. +title: Stacked Barchart +permalink: /examples/5_4_stacked.html +image: /img/5_4_stacked.png +number: 5-4 +spec: 5_4_stacked.vl.json +--- +A stacked bar chart emphasizes the total number of complaints. diff --git a/examples/5_6_hist-cat.md b/examples/5_6_hist-cat.md new file mode 100644 index 0000000..cf37dd3 --- /dev/null +++ b/examples/5_6_hist-cat.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: The distribution of car styles in the cars dataset. +title: Categorical Histogram +permalink: /examples/5_6_hist-cat.html +image: /img/5_6_hist-cat.png +number: 5-6 +spec: 5_6_hist-cat.vl.json +--- +The distribution of car styles in the cars dataset. diff --git a/examples/5_7_hist-quant.md b/examples/5_7_hist-quant.md new file mode 100644 index 0000000..17c1209 --- /dev/null +++ b/examples/5_7_hist-quant.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: A kernel density estimate of the city-mpg field of the cars dataset. Smoothed with a narrow bandwidth, the dataset shows sharp peaks. Smoothed with a wider bandwidth, the dataset shows a gaussian-like distribution. +title: Quantitative Histogram +permalink: /examples/5_7_hist-quant.html +image: /img/5_7_hist-quant.png +number: 5-7 +spec: 5_7_hist-quant.vl.json +--- +A kernel density estimate of the city-mpg field of the cars dataset. Smoothed with a narrow bandwidth, the dataset shows sharp peaks. Smoothed with a wider bandwidth, the dataset shows a gaussian-like distribution. diff --git a/examples/5_8_fixed_smoothed.md b/examples/5_8_fixed_smoothed.md new file mode 100644 index 0000000..ef2cec7 --- /dev/null +++ b/examples/5_8_fixed_smoothed.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: The distribution of car ratings for the city-mpg field. +title: Smoothed Histogram +permalink: /examples/5_8_fixed_smoothed.html +image: /img/5_8_fixed_smoothed.png +number: 5-8 +spec: 5_8_fixed_smoothed.vg.json +--- +The distribution of car ratings for the city-mpg field. diff --git a/examples/5_9_box-plot.md b/examples/5_9_box-plot.md new file mode 100644 index 0000000..6f9240c --- /dev/null +++ b/examples/5_9_box-plot.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: The distribution of car ratings for the city-mpg field. +title: Box Plot +permalink: /examples/5_9_box-plot.html +image: /img/5_9_box-plot.png +number: 5-9 +spec: 5_9_box-plot.vl.json +--- +The distribution of car ratings for the city-mpg field. diff --git a/examples/6_10_crossfilter.md b/examples/6_10_crossfilter.md new file mode 100644 index 0000000..1842eab --- /dev/null +++ b/examples/6_10_crossfilter.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: The three views—two sorted bar charts and a scatterplot—are linked together. The user has selected a region of the scatterplot (grey box, orange dots), and the selected values correspondingly light up on the bar charts. This is based on the World Bank dataset. +title: Cross-Selection +permalink: /examples/6_10_crossfilter.html +image: /img/6_10_crossfilter.png +number: 6-10 +spec: 6_10_crossfilter.vl.json +--- +The three views—two sorted bar charts and a scatterplot—are linked together. The user has selected a region of the scatterplot (grey box, orange dots), and the selected values correspondingly light up on the bar charts. This is based on the World Bank dataset. diff --git a/examples/6_1_small-multiples-states.md b/examples/6_1_small-multiples-states.md new file mode 100644 index 0000000..2ada49b --- /dev/null +++ b/examples/6_1_small-multiples-states.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: Small multiples of choropleths. In each choropleth, the percentages of the states’ populations for a specific salary range are shown—the small multiple views are partitioned over the set of salary ranges. +title: Small Multiples, Split by Dimension +permalink: /examples/6_1_small-multiples-states.html +image: /img/6_1_small-multiples-states.png +number: 6-1 +spec: 6_1_small-multiples-states.vg.json +--- +Small multiples of choropleths. In each choropleth, the percentages of the states’ populations for a specific salary range are shown—the small multiple views are partitioned over the set of salary ranges. diff --git a/examples/6_2_splom.md b/examples/6_2_splom.md new file mode 100644 index 0000000..d58fdcc --- /dev/null +++ b/examples/6_2_splom.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: A SPLOM comparing attributes of cars in the scatterplots, with a color encoding indicating whether the cars are all-, rear-, or front-wheel drive. This chart helps show, for example, that rear- and front-wheel-drive cars can be separated by their curb weight in conjunction with city-mpg or highway-mpg more than by their width and length. +title: SPLOM +permalink: /examples/6_2_splom.html +image: /img/6_2_splom.png +number: 6-2 +spec: 6_2_splom.vl.json +--- +A SPLOM comparing attributes of cars in the scatterplots, with a color encoding indicating whether the cars are all-, rear-, or front-wheel drive. This chart helps show, for example, that rear- and front-wheel-drive cars can be separated by their curb weight in conjunction with city-mpg or highway-mpg more than by their width and length. diff --git a/examples/6_9_multimap.md b/examples/6_9_multimap.md new file mode 100644 index 0000000..ba26847 --- /dev/null +++ b/examples/6_9_multimap.md @@ -0,0 +1,11 @@ +--- +layout: page +menu: examples +description: Even with different measures, these three choropleths illustrate the value of aligning scales and maintaining coordinate systems. The maps show the population of each state, the percentage of the population that are engineers, and the number of hurricanes. (The very different map color schemes suggest that engineers do not cause hurricanes.) +title: Small Multiples, Showing Different Measures +permalink: /examples/6_9_multimap.html +image: /img/6_9_multimap.png +number: 6-9 +spec: 6_9_multimap.vg.json +--- +Even with different measures, these three choropleths illustrate the value of aligning scales and maintaining coordinate systems. The maps show the population of each state, the percentage of the population that are engineers, and the number of hurricanes. (The very different map color schemes suggest that engineers do not cause hurricanes.) diff --git a/figurelist.html b/index.html similarity index 76% rename from figurelist.html rename to index.html index 849c2cf..b4e039c 100644 --- a/figurelist.html +++ b/index.html @@ -53,11 +53,21 @@

{{ figure.spec }}

- {% assign imgurl = figure.spec | remove:".vl.json" | remove:".vg.json" | append: ".png" | prepend: "img/" %} - - -

{{ figure.caption }}

+ {% assign name = figure.spec | remove:".vl.json" | remove:".vg.json" %} {% assign imgurl = name | append: ".png" | prepend: "img/" %} + + + +

{{ figure.caption }}

+ + {% if figure.spec contains ".vl."%} + (Vega-Lite demo) + {% else %} + (Vega demo) + {% endif %} + + + {% if figure.note %}

Note: {{figure.note}}

{% endif %} diff --git a/node_modules/fs/README.md b/node_modules/fs/README.md new file mode 100644 index 0000000..5e9a74c --- /dev/null +++ b/node_modules/fs/README.md @@ -0,0 +1,9 @@ +# Security holding package + +This package name is not currently in use, but was formerly occupied +by another package. To avoid malicious use, npm is hanging on to the +package name, but loosely, and we'll probably give it to you if you +want it. + +You may adopt this package by contacting support@npmjs.com and +requesting the name. diff --git a/node_modules/fs/package.json b/node_modules/fs/package.json new file mode 100644 index 0000000..675221b --- /dev/null +++ b/node_modules/fs/package.json @@ -0,0 +1,69 @@ +{ + "_args": [ + [ + "fs", + "/mnt/c/Users/danyelf/git/makingdatavisual.github.io" + ] + ], + "_from": "fs@latest", + "_id": "fs@0.0.1-security", + "_inCache": true, + "_installable": true, + "_location": "/fs", + "_nodeVersion": "4.1.2", + "_npmUser": { + "email": "ernie@npmjs.com", + "name": "ehsalazar" + }, + "_npmVersion": "3.10.5", + "_phantomChildren": {}, + "_requested": { + "name": "fs", + "raw": "fs", + "rawSpec": "", + "scope": null, + "spec": "latest", + "type": "tag" + }, + "_requiredBy": [ + "#USER" + ], + "_resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "_shasum": "8a7bd37186b6dddf3813f23858b57ecaaf5e41d4", + "_shrinkwrap": null, + "_spec": "fs", + "_where": "/mnt/c/Users/danyelf/git/makingdatavisual.github.io", + "author": "", + "bugs": { + "url": "https://github.com/npm/security-holder/issues" + }, + "dependencies": {}, + "description": "This package name is not currently in use, but was formerly occupied by another package. To avoid malicious use, npm is hanging on to the package name, but loosely, and we'll probably give it to you if you want it.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "8a7bd37186b6dddf3813f23858b57ecaaf5e41d4", + "tarball": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz" + }, + "homepage": "https://github.com/npm/security-holder#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "ehsalazar", + "email": "ernie@npmjs.com" + } + ], + "name": "fs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/security-holder.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "version": "0.0.1-security" +} diff --git a/scripts/siteprep.js b/scripts/siteprep.js new file mode 100644 index 0000000..0cbe1eb --- /dev/null +++ b/scripts/siteprep.js @@ -0,0 +1,48 @@ +#!/usr/bin/env node +'use strict'; + +/** +* This script creates pages for all examples for the website. +*/ + +const fs = require('fs'); +const examples = require('../_data/figures.json'); +//const { execSync } = require('child_process'); +// const svg2png = require('svg2png-many'); + +function createPage(example) { + return (`--- +layout: page +menu: examples +${example.caption ? `description: ${example.caption}`: ''} +title: ${example.title} +permalink: /examples/${example.name}.html +image: /img/${example.name}.png +number: ${example.number} +spec: ${example.spec} +--- +${example.caption || ''} +`); +} + +//${example.caption || ''} +// {% include example.html spec='${example.spec}'%} +//`); +//} + + +//const fileMap = {}; + + +for (const group of examples) { + for (const child of group.children ) { + const example = Object.assign({}, child); + child.name = child.spec.split(".")[0]; + console.log( child.name ); + fs.writeFileSync(`examples/${child.name}.md`, createPage(child)); +// fileMap[`examples/compiled/${name}.svg`] = `examples/compiled/${name}.png`; + } +} + +// svg2png.svg2PngFiles(fileMap) + diff --git a/spec/5_10_density-cat.vl.json b/spec/5_10_density-cat.vl.json index 6738a8e..2b30a6d 100644 --- a/spec/5_10_density-cat.vl.json +++ b/spec/5_10_density-cat.vl.json @@ -1,6 +1,6 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v2.json", - "data": { "url": "data/cars.csv" }, + "data": { "url": "/data/cars.csv" }, "mark": "rect", "encoding": { "x": {"field": "make", "type": "nominal", "axis": {"title": "Make"}}, diff --git a/spec/5_11_density-cont.vl.json b/spec/5_11_density-cont.vl.json index 242dcc7..7d25fa5 100644 --- a/spec/5_11_density-cont.vl.json +++ b/spec/5_11_density-cont.vl.json @@ -1,7 +1,7 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, - "data": { "url": "data/cars.csv" }, + "data": { "url": "/data/cars.csv" }, "mark": "rect", "encoding": { "y": {"field": "curb-weight", "bin": true, "type": "quantitative", "axis": {"title": "Curb Weight"}}, diff --git a/spec/5_12_bar-chart.vl.json b/spec/5_12_bar-chart.vl.json index b1dd663..d33ee9e 100644 --- a/spec/5_12_bar-chart.vl.json +++ b/spec/5_12_bar-chart.vl.json @@ -4,7 +4,7 @@ "background": "#ffffff" }, "data": { - "url": "data/cars.csv" + "url": "/data/cars.csv" }, "mark": "bar", "encoding": { diff --git a/spec/5_13_clustered-bar-chart.vl.json b/spec/5_13_clustered-bar-chart.vl.json index 725a539..43a75c4 100644 --- a/spec/5_13_clustered-bar-chart.vl.json +++ b/spec/5_13_clustered-bar-chart.vl.json @@ -4,7 +4,7 @@ "background": "#ffffff" }, "data": { - "url": "data/cars.csv" + "url": "/data/cars.csv" }, "facet": { "row": { diff --git a/spec/5_13a_clustered-bar-chart.vg.json b/spec/5_13a_clustered-bar-chart.vg.json index e14cecb..e0432e4 100644 --- a/spec/5_13a_clustered-bar-chart.vg.json +++ b/spec/5_13a_clustered-bar-chart.vg.json @@ -6,7 +6,7 @@ "data": [ { "name": "source_0", - "url": "data/cars.csv", + "url": "/data/cars.csv", "format": { "type": "csv", "parse": { diff --git a/spec/5_14_justone_pie.vg.json b/spec/5_14_justone_pie.vg.json index ac08a4b..4deecd4 100644 --- a/spec/5_14_justone_pie.vg.json +++ b/spec/5_14_justone_pie.vg.json @@ -7,7 +7,7 @@ "data": [ { "name": "table", - "url": "data/complaints.csv", + "url": "/data/complaints.csv", "format": {"type": "csv","parse": "auto"}, "transform": [ { diff --git a/spec/5_15_heatmap.vl.json b/spec/5_15_heatmap.vl.json index c30fef4..a0227f7 100644 --- a/spec/5_15_heatmap.vl.json +++ b/spec/5_15_heatmap.vl.json @@ -8,7 +8,7 @@ } }, "width": 600, - "data": {"url": "data/complaints.csv", "format": {"type": "csv"}}, + "data": {"url": "/data/complaints.csv", "format": {"type": "csv"}}, "mark": "rect", "encoding": { "y": {"field": "Product", "type": "nominal"}, diff --git a/spec/5_16_scatterplot.vl.json b/spec/5_16_scatterplot.vl.json index c6aa092..f5f0468 100644 --- a/spec/5_16_scatterplot.vl.json +++ b/spec/5_16_scatterplot.vl.json @@ -1,7 +1,7 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, - "data": { "url": "data/cars.csv" }, + "data": { "url": "/data/cars.csv" }, "mark": "point", "encoding": { "color": {"field": "body-style", "type": "nominal", "legend": {"title": "Body Style"}}, diff --git a/spec/5_17_line.vl.json b/spec/5_17_line.vl.json index c50158d..fffd244 100644 --- a/spec/5_17_line.vl.json +++ b/spec/5_17_line.vl.json @@ -2,7 +2,7 @@ "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, "width": 600, - "data": {"url": "data/complaints.csv", "format": {"type": "csv"}}, + "data": {"url": "/data/complaints.csv", "format": {"type": "csv"}}, "mark": "line", "encoding": { "x": {"timeUnit": "yearmonth", "field": "Date received", "type": "temporal", "axis":{"title": "Date Received"}}, diff --git a/spec/5_18_area-stacked.vl.json b/spec/5_18_area-stacked.vl.json index 6a6fdd3..e7b95f7 100644 --- a/spec/5_18_area-stacked.vl.json +++ b/spec/5_18_area-stacked.vl.json @@ -2,7 +2,7 @@ "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, "width": 600, - "data": {"url": "data/complaints.csv", "format": {"type": "csv"}}, + "data": {"url": "/data/complaints.csv", "format": {"type": "csv"}}, "mark": "area", "encoding": { "x": { diff --git a/spec/5_19_force.vg.json b/spec/5_19_force.vg.json index 1c3d482..9501581 100644 --- a/spec/5_19_force.vg.json +++ b/spec/5_19_force.vg.json @@ -59,12 +59,12 @@ "data": [ { "name": "node-data", - "url": "data/miserables.small.json", + "url": "/data/miserables.small.json", "format": {"type": "json", "property": "nodes"} }, { "name": "link-data", - "url": "data/miserables.small.json", + "url": "/data/miserables.small.json", "format": {"type": "json", "property": "links"}, "transform": [ ] diff --git a/spec/5_1_scatter.vl.json b/spec/5_1_scatter.vl.json index b9b9d0c..3a48008 100644 --- a/spec/5_1_scatter.vl.json +++ b/spec/5_1_scatter.vl.json @@ -2,7 +2,7 @@ "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, "mark": "point", - "data": {"url": "data/complaints.csv", "format": {"type": "csv"}}, + "data": {"url": "/data/complaints.csv", "format": {"type": "csv"}}, "transform": [ { "as": "relief", diff --git a/spec/5_20_circular.vg.json b/spec/5_20_circular.vg.json index 99a2cae..f2a19f5 100644 --- a/spec/5_20_circular.vg.json +++ b/spec/5_20_circular.vg.json @@ -36,7 +36,7 @@ "data": [ { "name": "nodes", - "url": "data/miserables.json", + "url": "/data/miserables.json", "format": {"type": "json", "property": "nodes"}, "transform": [ { "type": "filter", @@ -62,7 +62,7 @@ }, { "name": "links", - "url": "data/miserables.json", + "url": "/data/miserables.json", "format": {"type": "json", "property": "links"}, "transform": [ { "type": "filter", diff --git a/spec/5_21_adjacency_noninteractive.vg.json b/spec/5_21_adjacency_noninteractive.vg.json index 2bd9503..f5b8a37 100644 --- a/spec/5_21_adjacency_noninteractive.vg.json +++ b/spec/5_21_adjacency_noninteractive.vg.json @@ -15,7 +15,7 @@ "data": [ { "name": "nodes", - "url": "data/miserables.json", + "url": "/data/miserables.json", "format": {"type": "json", "property": "nodes"}, "transform": [ { "type": "filter", @@ -26,7 +26,7 @@ }, { "name": "edges", - "url": "data/miserables.json", + "url": "/data/miserables.json", "format": {"type": "json", "property": "links"}, "transform": [ { "type": "filter", diff --git a/spec/5_21a_adjacency.vg.json b/spec/5_21a_adjacency.vg.json index 337dd07..c372343 100644 --- a/spec/5_21a_adjacency.vg.json +++ b/spec/5_21a_adjacency.vg.json @@ -33,7 +33,7 @@ "data": [ { "name": "nodes", - "url": "data/miserables.json", + "url": "/data/miserables.json", "format": {"type": "json", "property": "nodes"}, "transform": [ { "type": "collect", "sort": {"field": "group"} }, @@ -50,7 +50,7 @@ }, { "name": "edges", - "url": "data/miserables.json", + "url": "/data/miserables.json", "format": {"type": "json", "property": "links"}, "transform": [ { diff --git a/spec/5_22_treeview.vg.json b/spec/5_22_treeview.vg.json index 370cdaf..5d3b929 100644 --- a/spec/5_22_treeview.vg.json +++ b/spec/5_22_treeview.vg.json @@ -26,7 +26,7 @@ "data": [ { "name": "tree", - "url": "data/complaints_tree.json", + "url": "/data/complaints_tree.json", "transform": [ { "type": "stratify", diff --git a/spec/5_23_treemap.vg.json b/spec/5_23_treemap.vg.json index e5587bf..cfb0443 100644 --- a/spec/5_23_treemap.vg.json +++ b/spec/5_23_treemap.vg.json @@ -26,7 +26,7 @@ "data": [ { "name": "tree", - "url": "data/complaints_tree.json", + "url": "/data/complaints_tree.json", "transform": [ { "type": "stratify", diff --git a/spec/5_24_sunburst.vg.json b/spec/5_24_sunburst.vg.json index 60f92e6..0042422 100644 --- a/spec/5_24_sunburst.vg.json +++ b/spec/5_24_sunburst.vg.json @@ -8,7 +8,7 @@ "data": [ { "name": "tree", - "url": "data/complaints_tree.json", + "url": "/data/complaints_tree.json", "transform": [ { "type": "stratify", diff --git a/spec/5_25_map.vg.json b/spec/5_25_map.vg.json index 58d63ee..13f4240 100644 --- a/spec/5_25_map.vg.json +++ b/spec/5_25_map.vg.json @@ -5,7 +5,7 @@ "data": [ { "name": "income", - "url": "data/income.csv", + "url": "/data/income.csv", "format": { "type": "csv", "parse": {"id": "number","value": "number"} @@ -20,7 +20,7 @@ }, { "name": "states", - "url": "data/us-10m.json", + "url": "/data/us-10m.json", "format": {"type": "topojson","feature": "states"}, "transform": [ { diff --git a/spec/5_26_zip.vg.json b/spec/5_26_zip.vg.json index 5a99150..255e0db 100644 --- a/spec/5_26_zip.vg.json +++ b/spec/5_26_zip.vg.json @@ -15,13 +15,13 @@ "data": [ { "name": "states", - "url": "data/us-10m.json", + "url": "/data/us-10m.json", "format": {"type": "topojson","feature": "states"}, "transform": [{"type": "geopath","projection": "projection"}] }, { "name": "zipcodes", - "url": "data/zip_codes_states.csv", + "url": "/data/zip_codes_states.csv", "format": { "type": "csv", "parse": { diff --git a/spec/5_2_clustered-bar.vl.json b/spec/5_2_clustered-bar.vl.json index 5bd58c5..1f307d8 100644 --- a/spec/5_2_clustered-bar.vl.json +++ b/spec/5_2_clustered-bar.vl.json @@ -2,7 +2,7 @@ "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, "mark": "bar", - "data": {"url": "data/complaints.csv", "format": {"type": "csv"}}, + "data": {"url": "/data/complaints.csv", "format": {"type": "csv"}}, "transform": [{ "as": "Relief", "calculate": "indexof(datum['Company response to consumer'], 'relief') >= 0" diff --git a/spec/5_3_clustered-bar-2.vl.json b/spec/5_3_clustered-bar-2.vl.json index 56b1393..79456ca 100644 --- a/spec/5_3_clustered-bar-2.vl.json +++ b/spec/5_3_clustered-bar-2.vl.json @@ -2,7 +2,7 @@ "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, "mark": "bar", - "data": {"url": "data/complaints.csv", "format": {"type": "csv"}}, + "data": {"url": "/data/complaints.csv", "format": {"type": "csv"}}, "transform": [{ "as": "Relief", "calculate": "indexof(datum['Company response to consumer'], 'relief') >= 0" diff --git a/spec/5_4_stacked.vl.json b/spec/5_4_stacked.vl.json index afb6f25..71ab017 100644 --- a/spec/5_4_stacked.vl.json +++ b/spec/5_4_stacked.vl.json @@ -2,7 +2,7 @@ "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, "mark": "bar", - "data": {"url": "data/complaints.csv", "format": {"type": "csv"}}, + "data": {"url": "/data/complaints.csv", "format": {"type": "csv"}}, "transform": [{ "as": "Relief", "calculate": "indexof(datum['Company response to consumer'], 'relief') >= 0" diff --git a/spec/5_6_hist-cat.vl.json b/spec/5_6_hist-cat.vl.json index 0fe39b8..b39af49 100644 --- a/spec/5_6_hist-cat.vl.json +++ b/spec/5_6_hist-cat.vl.json @@ -2,7 +2,7 @@ "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, "data": { - "url": "data/cars.csv", + "url": "/data/cars.csv", "format": {"type":"csv"} }, "mark": "bar", diff --git a/spec/5_7_hist-quant.vl.json b/spec/5_7_hist-quant.vl.json index 78c5b1f..59b7f9b 100644 --- a/spec/5_7_hist-quant.vl.json +++ b/spec/5_7_hist-quant.vl.json @@ -1,7 +1,7 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, - "data": { "url": "data/cars.csv" }, + "data": { "url": "/data/cars.csv" }, "mark": "bar", "encoding": { "x": {"field": "city-mpg", "type": "quantitative", "bin": true, "axis": {"title": "City MPG"}}, diff --git a/spec/5_8_fixed_smoothed.vg.json b/spec/5_8_fixed_smoothed.vg.json index 7144ccc..10873f0 100644 --- a/spec/5_8_fixed_smoothed.vg.json +++ b/spec/5_8_fixed_smoothed.vg.json @@ -17,7 +17,7 @@ "data": [ { "name": "points", - "url": "data/cars.csv", + "url": "/data/cars.csv", "format": { "type": "csv", "parse": { diff --git a/spec/5_9_box-plot.vl.json b/spec/5_9_box-plot.vl.json index cbfff85..a083298 100644 --- a/spec/5_9_box-plot.vl.json +++ b/spec/5_9_box-plot.vl.json @@ -1,7 +1,7 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, - "data": { "url": "data/cars.csv" }, + "data": { "url": "/data/cars.csv" }, "layer": [ { "mark": "rule", diff --git a/spec/6_1_small-multiples-states.vg.json b/spec/6_1_small-multiples-states.vg.json index fcc7510..5c3e10c 100644 --- a/spec/6_1_small-multiples-states.vg.json +++ b/spec/6_1_small-multiples-states.vg.json @@ -5,7 +5,7 @@ "data": [ { "name": "income", - "url": "data/income_cleaned.csv", + "url": "/data/income_cleaned.csv", "format": { "type": "csv", "parse": {"id": "number","value": "number"} @@ -13,7 +13,7 @@ }, { "name": "states", - "url": "data/us-10m.json", + "url": "/data/us-10m.json", "format": {"type": "topojson","feature": "states"} } ], diff --git a/spec/6_2_splom.vl.json b/spec/6_2_splom.vl.json index 83bc8fe..51b0497 100644 --- a/spec/6_2_splom.vl.json +++ b/spec/6_2_splom.vl.json @@ -1,7 +1,7 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, - "data": {"url": "data/cars.csv"}, + "data": {"url": "/data/cars.csv"}, "repeat": { "row": [ "length", diff --git a/spec/6_9_maps.vg.json b/spec/6_9_maps.vg.json index f7b79df..655f509 100644 --- a/spec/6_9_maps.vg.json +++ b/spec/6_9_maps.vg.json @@ -7,7 +7,7 @@ "data": [ { "name": "all", - "url": "data/melted.csv", + "url": "/data/melted.csv", "format": { "type": "csv", "parse": {"id": "number","value": "number"} @@ -45,7 +45,7 @@ }, { "name": "states", - "url": "data/us-10m.json", + "url": "/data/us-10m.json", "format": {"type": "topojson","feature": "states"} } ], diff --git a/spec/unused/multiview_12_dual-axis.vl.json b/spec/unused/multiview_12_dual-axis.vl.json index 005160d..85e6eb1 100644 --- a/spec/unused/multiview_12_dual-axis.vl.json +++ b/spec/unused/multiview_12_dual-axis.vl.json @@ -5,7 +5,7 @@ "height": 240, "layer": [ { - "data": {"url": "data/co2.csv"}, + "data": {"url": "/data/co2.csv"}, "mark": "line", "encoding": { "x": { @@ -45,7 +45,7 @@ } }, { - "data": {"url": "data/temp.csv"}, + "data": {"url": "/data/temp.csv"}, "mark": "line", "encoding": { "x": { diff --git a/spec/unused/multiview_2_bars-states.vl.json b/spec/unused/multiview_2_bars-states.vl.json index 3d9ddad..193065e 100644 --- a/spec/unused/multiview_2_bars-states.vl.json +++ b/spec/unused/multiview_2_bars-states.vl.json @@ -2,7 +2,7 @@ "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config":{"background":"#ffffff"}, "data": { - "url": "data/census-income-pivoted.csv", + "url": "/data/census-income-pivoted.csv", "format": {"type": "csv", "parse": {"order": "number"}} }, "transform": [ diff --git a/spec/unused/multiview_3_bars-levels.vl.json b/spec/unused/multiview_3_bars-levels.vl.json index 7c9507b..593d680 100644 --- a/spec/unused/multiview_3_bars-levels.vl.json +++ b/spec/unused/multiview_3_bars-levels.vl.json @@ -2,7 +2,7 @@ "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config":{"background":"#ffffff"}, "data": { - "url": "data/census-income-pivoted.csv", + "url": "/data/census-income-pivoted.csv", "format": {"type": "csv", "parse": {"order": "number", "total": "number"}} }, "mark": "bar", diff --git a/spec/unused/multiview_5_bars-region.vl.json b/spec/unused/multiview_5_bars-region.vl.json index 2b5bfc8..1bd73ab 100644 --- a/spec/unused/multiview_5_bars-region.vl.json +++ b/spec/unused/multiview_5_bars-region.vl.json @@ -2,7 +2,7 @@ "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config":{"background":"#ffffff"}, "data": { - "url": "data/census-income-pivoted.csv", + "url": "/data/census-income-pivoted.csv", "format": {"type": "csv", "parse": {"order": "number", "total": "number"}} }, "mark": "bar", diff --git a/spec/unused/multiview_9_dashboard.vl.json b/spec/unused/multiview_9_dashboard.vl.json index 756e5ab..ddd0246 100644 --- a/spec/unused/multiview_9_dashboard.vl.json +++ b/spec/unused/multiview_9_dashboard.vl.json @@ -1,7 +1,7 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, - "data": {"url": "data/cars.csv"}, + "data": {"url": "/data/cars.csv"}, "vconcat": [{ "repeat": {"column": ["horsepower","city-mpg","highway-mpg"]}, "spec": { diff --git a/spec/unused/singleview_13_pie.vg.json b/spec/unused/singleview_13_pie.vg.json index c64f6c3..8f14443 100644 --- a/spec/unused/singleview_13_pie.vg.json +++ b/spec/unused/singleview_13_pie.vg.json @@ -6,7 +6,7 @@ "data": [ { "name": "table", - "url": "data/complaints.csv", + "url": "/data/complaints.csv", "format": {"type": "csv","parse": "auto"}, "transform": [ { diff --git a/spec/unused/singleview_18_line-trellis.vl.json b/spec/unused/singleview_18_line-trellis.vl.json index cfd7ae7..c5825c1 100644 --- a/spec/unused/singleview_18_line-trellis.vl.json +++ b/spec/unused/singleview_18_line-trellis.vl.json @@ -3,7 +3,7 @@ "config": {"background":"#ffffff"}, "width": 600, "height": 100, - "data": {"url": "data/complaints.csv", "format": {"type": "csv"}}, + "data": {"url": "/data/complaints.csv", "format": {"type": "csv"}}, "mark": "line", "encoding": { "x": { diff --git a/spec/unused/singleview_28_radar.vg.json b/spec/unused/singleview_28_radar.vg.json index 3b4e89c..18a1c70 100644 --- a/spec/unused/singleview_28_radar.vg.json +++ b/spec/unused/singleview_28_radar.vg.json @@ -9,7 +9,7 @@ "data": [ { "name": "cars", - "url": "data/cars.csv", + "url": "/data/cars.csv", "format": { "type": "csv", "parse": { diff --git a/spec/unused/singleview_28_radar_variant1.vg.json b/spec/unused/singleview_28_radar_variant1.vg.json index 774b3c7..b1429dc 100644 --- a/spec/unused/singleview_28_radar_variant1.vg.json +++ b/spec/unused/singleview_28_radar_variant1.vg.json @@ -22,7 +22,7 @@ }, { "name": "cars", - "url": "data/cars.csv", + "url": "/data/cars.csv", "format": { "type": "csv", "parse": { diff --git a/spec/unused/singleview_28_radar_variant2.vg.json b/spec/unused/singleview_28_radar_variant2.vg.json index 95090aa..bf12286 100644 --- a/spec/unused/singleview_28_radar_variant2.vg.json +++ b/spec/unused/singleview_28_radar_variant2.vg.json @@ -22,7 +22,7 @@ }, { "name": "cars", - "url": "data/cars.csv", + "url": "/data/cars.csv", "format": { "type": "csv", "parse": { diff --git a/spec/unused/singleview_29_parallel-coords.vg.json b/spec/unused/singleview_29_parallel-coords.vg.json index 960e109..2b8caed 100644 --- a/spec/unused/singleview_29_parallel-coords.vg.json +++ b/spec/unused/singleview_29_parallel-coords.vg.json @@ -16,7 +16,7 @@ "data": [ { "name": "cars", - "url": "data/cars.csv", + "url": "/data/cars.csv", "format": { "type": "csv", "parse": { diff --git a/spec/unused/singleview_2a-multi-histogram.vl.json b/spec/unused/singleview_2a-multi-histogram.vl.json index a421c7d..25485cb 100644 --- a/spec/unused/singleview_2a-multi-histogram.vl.json +++ b/spec/unused/singleview_2a-multi-histogram.vl.json @@ -1,7 +1,7 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, - "data": { "url": "data/cars.csv" }, + "data": { "url": "/data/cars.csv" }, "mark": "bar", "encoding": { "x": {"bin": true, "field": "curb-weight", "type": "quantitative", "axis": {"title": "Curb Weight"}}, diff --git a/spec/unused/singleview_2b-bar.vl.json b/spec/unused/singleview_2b-bar.vl.json index cd604b1..83c9090 100644 --- a/spec/unused/singleview_2b-bar.vl.json +++ b/spec/unused/singleview_2b-bar.vl.json @@ -1,7 +1,7 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, - "data": { "url": "data/cars.csv" }, + "data": { "url": "/data/cars.csv" }, "mark": "bar", "encoding": { "x": {"field": "body-style", "type": "nominal", "axis": {"title": "Body Style"}}, diff --git a/spec/unused/singleview_2c-box-plot.vl.json b/spec/unused/singleview_2c-box-plot.vl.json index 7f5252f..623403d 100644 --- a/spec/unused/singleview_2c-box-plot.vl.json +++ b/spec/unused/singleview_2c-box-plot.vl.json @@ -1,7 +1,7 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config": {"background":"#ffffff"}, - "data": { "url": "data/cars.csv" }, + "data": { "url": "/data/cars.csv" }, "layer": [ { "mark": "rule", diff --git a/spec/unused/singleview_5_13a_clustered-bar-chart.vg.json b/spec/unused/singleview_5_13a_clustered-bar-chart.vg.json index e14cecb..e0432e4 100644 --- a/spec/unused/singleview_5_13a_clustered-bar-chart.vg.json +++ b/spec/unused/singleview_5_13a_clustered-bar-chart.vg.json @@ -6,7 +6,7 @@ "data": [ { "name": "source_0", - "url": "data/cars.csv", + "url": "/data/cars.csv", "format": { "type": "csv", "parse": { diff --git a/spec/unused/singleview_5_hist-trellis.vl.json b/spec/unused/singleview_5_hist-trellis.vl.json index e4b7d52..35ea8e3 100644 --- a/spec/unused/singleview_5_hist-trellis.vl.json +++ b/spec/unused/singleview_5_hist-trellis.vl.json @@ -1,7 +1,7 @@ { "$schema": "https://vega.github.io/schema/vega-lite/v2.json", "config":{"background":"#ffffff"}, - "data": { "url": "data/cars.csv" }, + "data": { "url": "/data/cars.csv" }, "mark": "bar", "encoding": { "column": {"field": "body-style", "type": "nominal", "header": {"title": "Body Style"}}, diff --git a/spec/unused/singleview_7_smoothed.vl.json b/spec/unused/singleview_7_smoothed.vl.json index fd12e7c..1fe2614 100644 --- a/spec/unused/singleview_7_smoothed.vl.json +++ b/spec/unused/singleview_7_smoothed.vl.json @@ -17,7 +17,7 @@ "data": [ { "name": "points", - "url": "data/cars.csv", + "url": "/data/cars.csv", "format": { "type": "csv", "parse": { diff --git a/specs.json b/specs.json index 82edcfd..c4d2f5d 100644 --- a/specs.json +++ b/specs.json @@ -1,44 +1,44 @@ [ - "multiview_6_1_small-multiples-states.vg.json", - "multiview_6_2_splom.vl.json", - "multiview_6_9_maps.vg.json", - "multiview_6_10_crossfilter.vl.json", - "singleview_5_1_scatter.vl.json", - "singleview_5_2_clustered-bar.vl.json", - "singleview_5_3_clustered-bar-2.vl.json", - "singleview_5_4_stacked.vl.json", - "singleview_5_6_hist-cat.vl.json", - "singleview_5_7_hist-quant.vl.json", - "singleview_5_8_fixed_smoothed.vg.json", - "singleview_5_9_box-plot.vl.json", - "singleview_5_10_density-cat.vl.json", - "singleview_5_11_density-cont.vl.json", - "singleview_5_12_bar-chart.vl.json", - "singleview_5_13_clustered-bar-chart.vl.json", - "singleview_5_13a_clustered-bar-chart.vg.json", - "singleview_5_14_justone_pie.vg.json", - "singleview_5_15_heatmap.vl.json", - "singleview_5_16_scatterplot.vl.json", - "singleview_5_17_line.vl.json", - "singleview_5_18_area-stacked.vl.json", - "singleview_5_19_force.vg.json", - "singleview_5_20_circular.vg.json", - "singleview_5_21_adjacency_noninteractive.vg.json", - "singleview_5_21a_adjacency.vg.json", - "singleview_5_22_treeview.vg.json", - "singleview_5_23_treemap.vg.json", - "singleview_5_24_sunburst.vg.json", - "singleview_5_25_map.vg.json", - "singleview_5_26_zip.vg.json", - "singleview_5_27_wordcloud.vg.json", - "singleview_2a-multi-histogram.vl.json", - "singleview_2b-bar.vl.json", - "singleview_2c-box-plot.vl.json", - "singleview_5_hist-trellis.vl.json", - "singleview_7_smoothed.vl.json", - "singleview_13_pie.vg.json", - "singleview_18_line-trellis.vl.json", - "singleview_28_radar.vg.json", - "singleview_29_parallel-coords.vg.json", - "singleview_badradar.vg.json" + "6_1_small-multiples-states.vg.json", + "6_2_splom.vl.json", + "6_9_maps.vg.json", + "6_10_crossfilter.vl.json", + "5_1_scatter.vl.json", + "5_2_clustered-bar.vl.json", + "5_3_clustered-bar-2.vl.json", + "5_4_stacked.vl.json", + "5_6_hist-cat.vl.json", + "5_7_hist-quant.vl.json", + "5_8_fixed_smoothed.vg.json", + "5_9_box-plot.vl.json", + "5_10_density-cat.vl.json", + "5_11_density-cont.vl.json", + "5_12_bar-chart.vl.json", + "5_13_clustered-bar-chart.vl.json", + "5_13a_clustered-bar-chart.vg.json", + "5_14_justone_pie.vg.json", + "5_15_heatmap.vl.json", + "5_16_scatterplot.vl.json", + "5_17_line.vl.json", + "5_18_area-stacked.vl.json", + "5_19_force.vg.json", + "5_20_circular.vg.json", + "5_21_adjacency_noninteractive.vg.json", + "5_21a_adjacency.vg.json", + "5_22_treeview.vg.json", + "5_23_treemap.vg.json", + "5_24_sunburst.vg.json", + "5_25_map.vg.json", + "5_26_zip.vg.json", + "5_27_wordcloud.vg.json", + "2a-multi-histogram.vl.json", + "2b-bar.vl.json", + "2c-box-plot.vl.json", + "5_hist-trellis.vl.json", + "7_smoothed.vl.json", + "13_pie.vg.json", + "18_line-trellis.vl.json", + "28_radar.vg.json", + "29_parallel-coords.vg.json", + "badradar.vg.json" ] \ No newline at end of file diff --git a/test.md b/test.md deleted file mode 100644 index 0b20159..0000000 --- a/test.md +++ /dev/null @@ -1,31 +0,0 @@ ---- ---- - -Jekyll test document - -{% for group in site.data.figures %} -# {{ group.group }} -{% for figure in group.children %} - -{% if figure.number %} -{% if figure.variable %} -## {{ figure.number }}: {{ figure.title}} ({{ figure.variable }}) -{% else %} -## {{ figure.number }}: {{ figure.title}} -{% endif %} -{% else %} -## {{ figure.spec }} -{% endif %} - -{% assign imgurl = figure.spec | remove:".vl.json" | remove:".vg.json" | append: ".png" | prepend: "img/" %} - -![spec]({{ imgurl }}) - -{{ figure.caption }} - -{% if figure.note %} -_Note: {{figure.note}}_ -{% endif %} - -{% endfor %} -{% endfor %}