mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-12 18:05:06 +00:00
Merge branch 'feature/13' into develop
This commit is contained in:
commit
6b6c7fb014
11 changed files with 498 additions and 159 deletions
|
|
@ -24,8 +24,39 @@ Smeagol does not currently have any mechanism to upload images. You can, however
|
|||
|
||||

|
||||
|
||||
## Now with data visualisation
|
||||
|
||||
Inspired by [visdown](http://visdown.amitkaps.com/) and [vega-lite](https://vega.github.io/vega-lite/docs/), you can now embed visualisations into Smeagol pages, like this:
|
||||
|
||||
### Flight punctuality at London airports
|
||||
|
||||
Example cribbed in its entirety from [here](http://visdown.amitkaps.com/london):
|
||||
```vis
|
||||
data:
|
||||
url: "data/london.csv"
|
||||
transform:
|
||||
-
|
||||
filter: datum.year == 2016
|
||||
mark: rect
|
||||
encoding:
|
||||
x:
|
||||
type: nominal
|
||||
field: source
|
||||
y:
|
||||
type: nominal
|
||||
field: dest
|
||||
color:
|
||||
type: quantitative
|
||||
field: flights
|
||||
aggregate: sum
|
||||
```
|
||||
|
||||
Note that this visualisation will not be rendered in the GitHub wiki, as it doesn't have Smeagol's data visualisation magic. This is what it should look like:
|
||||
|
||||

|
||||
|
||||
## Advertisement
|
||||
If you like what you see here, I am available for work on open source Clojure projects. Contact me via [WEFT](http://www.weft.scot/).
|
||||
If you like what you see here, I am available for work on open source Clojure projects.
|
||||
|
||||
### Phoning home
|
||||
Smeagol currently requests the WEFT logo in the page footer from my home site. This is mainly so I can get a feel for how many people are using the product. If you object to this, edit the file
|
||||
|
|
|
|||
|
|
@ -197,6 +197,11 @@ th {
|
|||
border: thin solid silver;
|
||||
}
|
||||
|
||||
|
||||
.data-visualisation {
|
||||
padding: 0.25em 5%;
|
||||
}
|
||||
|
||||
.error {
|
||||
width: 100%;
|
||||
background-color: red;
|
||||
|
|
@ -231,6 +236,10 @@ th {
|
|||
color: white;
|
||||
}
|
||||
|
||||
.vega-bindings, .vega-actions {
|
||||
font-size: 66%;
|
||||
}
|
||||
|
||||
.warn {
|
||||
color: maroon;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue