Craig Oates
2 months ago
2 changed files with 11 additions and 1 deletions
@ -0,0 +1,10 @@
|
||||
<html><head><style>html{ |
||||
height: 100%; |
||||
} |
||||
|
||||
html body{ |
||||
height: 100%; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
}</style><script type='text/javascript' src='https://cdn.jsdelivr.net/npm/vega@5'></script><script type='text/javascript' src='https://cdn.jsdelivr.net/npm/vega-lite@5'></script><script type='text/javascript' src='https://cdn.jsdelivr.net/npm/vega-embed@6'></script></head><body><div id='vis'></div><script>var spec = {"data":{"values":[{"company":"Zoopla","quantity":5,"avgRent":1138,"searchRange":"£400–£1300","minRent":1050,"maxRent":1250},{"company":"Open Rent","quantity":114,"avgRent":735,"searchRange":"£400–£1500","minRent":400,"maxRent":1350},{"company":"On The Market","quantity":438,"avgRent":1005,"searchRange":"£300–£1250","minRent":395,"maxRent":1250},{"company":"Roomies","quantity":16,"avgRent":641,"searchRange":"£0–£1200","minRent":400,"maxRent":1000},{"company":"Ideal Flatmate","quantity":17,"avgRent":714,"searchRange":"£200–£1200","minRent":480,"maxRent":956},{"company":"Spare Room","quantity":647,"avgRent":589,"searchRange":"£100–£1260","minRent":300,"maxRent":1260},{"company":"Right Move","quantity":121,"avgRent":1204,"searchRange":"£275–£1500","minRent":945,"maxRent":1495}]},"$schema":"https://vega.github.io/schema/vega-lite/v5.json","title":"Listing Amounts for Manchester (Feb. and March 2024)","width":600,"height":600,"layer":[{"mark":{"type":"bar"},"encoding":{"x":{"field":"company","title":"company","type":"nominal","axis":{"labelAngle":0}},"y":{"field":"quantity","title":"No. of listings","type":"quantitative"},"tooltip":{"field":"quantity"}}},{"mark":{"type":"rule","color":"darkorange","size":3},"encoding":{"y":{"field":"quantity","type":"quantitative","aggregate":"average"},"tooltip":{"field":"quantity","type":"quantitative","aggregate":"average"}}}]}; vegaEmbed("#vis", spec).then(result => console.log(result)).catch(console.warn);</script></body></html> |
Loading…
Reference in new issue