A data table that grows, with leaves
vege-table is a custom element, built with Polymer, that provides a web interface for building a table of data.
It does this by adding items (seeds) to a collection, then adding properties (leaves) to those items.
Each leaf is simply a JavaScript function, wrapped in a promise. This allows the properties of items to be fetched asynchronously, and for leaves with dependencies to be chained together.
Once the table of data has been built, the data and table description can be exported and easily published online, viewed in the same interface but without the ability to update the data.
Pre-alpha. To create vege-tables you need to be able to write functions in JavaScript, set up some helper tools, and deal with things going unexpectedly wrong.
The easiest way to get started is to use the vege-table web interface to create projects.
Alternatively - or if you'd like to help with development - follow the full instructions below.
bower init
.bower install vege-table --save
index.html
file.<script src="bower_components/platform/platform.js"></script>
<link rel="import" href="bower_components/vege-table/vege-table.html">
<vege-table db="your-database-name"></vege-table>
. Note that the “db” value should be a unique database identifier for each project.python -m SimpleHTTPServer 9000
and open http://localhost:9000/ in a web browser (ideally the very latest version of Chrome or Firefox).Now you can add some seeds and some leaves to create your table.
There are several important things to bear in mind:
Access-Control-Allow-Origin
header to their resources, so often resources cannot be fetched directly. To work around this (and providing benefits in other ways, such as caching), pass all request through cache-proxy. View source on an example table to see how to use Request.prototype.prepare
to manipulate the URL before the request is sent.