とりあえずfacets-overviewを埋め込む
とりあえずfacets-overviewを埋め込む データとか取得方法は丸パクリ
by TKD_N
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.24/webcomponents-lite.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<html>
<head>
<link rel="import" href="https://pair-code.github.io/facets/facets.html" >
</head>
<body>
<facets-overview id="facets"></facets-overview>
</body>
</html>
JavaScript
function trainAjax() {
return $.getJSON({url: "https://pair-code.github.io/facets/train.json"});
}
function testAjax() {
return $.getJSON({url: "https://pair-code.github.io/facets/test.json"});
}
$.when(trainAjax(), testAjax()).done(function(trainAjax, testAjax) {
var overview = $("#facets")[0];
var proto = overview.getStatsProto([
{data: trainAjax[0], name: "train"},
{data: testAjax[0], name: "test"}]);
overview.protoInput = proto;
});