gadem
This commit is contained in:
42
preanalysis/correlation_matrix_ent.html
Normal file
42
preanalysis/correlation_matrix_ent.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
#vis.vega-embed {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#vis.vega-embed details,
|
||||
#vis.vega-embed details summary {
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vega@6"></script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vega-lite@6.1.0"></script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vega-embed@7"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="vis"></div>
|
||||
<script>
|
||||
(function(vegaEmbed) {
|
||||
var spec = {"usermeta": {"embedOptions": {"theme": "dark"}}, "config": {"view": {"continuousWidth": 300, "continuousHeight": 300, "strokeWidth": 0}, "background": "#00000000", "title": {"anchor": "middle", "font": "Segoe UI Variable", "fontSize": 20, "fontWeight": 600}}, "layer": [{"mark": {"type": "rect", "cornerRadius": 6}, "encoding": {"color": {"field": "correlation", "legend": {"gradientLength": 300, "gradientThickness": 20, "labelFont": "Segoe UI Variable", "labelFontSize": 12, "labelFontWeight": 400, "orient": "right", "title": "\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f", "titleFont": "Segoe UI Variable", "titleFontSize": 14, "titleFontWeight": 600}, "scale": {"domain": [-1, 0, 1], "range": ["#1B3B72", "#FFFFFF", "#198F51"]}, "type": "quantitative"}, "tooltip": [{"field": "variable1", "title": "\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f 1", "type": "nominal"}, {"field": "variable2", "title": "\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f 2", "type": "nominal"}, {"field": "correlation", "format": ".3f", "title": "\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f", "type": "quantitative"}], "x": {"axis": {"labelAngle": -45, "labelFont": "Segoe UI Variable", "labelFontSize": 14, "labelFontWeight": 400}, "field": "variable2", "title": null, "type": "nominal"}, "y": {"axis": {"labelFont": "Segoe UI Variable", "labelFontSize": 14, "labelFontWeight": 400}, "field": "variable1", "title": null, "type": "nominal"}}}, {"mark": {"type": "text", "font": "Segoe UI Variable", "fontSize": 12, "fontWeight": 500}, "encoding": {"color": {"condition": {"test": "(datum.correlation > 0.6)", "value": "white"}, "value": "#757575"}, "text": {"field": "correlation", "format": ".2f", "type": "quantitative"}, "x": {"axis": {"labelAngle": -45, "labelFont": "Segoe UI Variable", "labelFontSize": 14, "labelFontWeight": 400}, "field": "variable2", "title": null, "type": "nominal"}, "y": {"axis": {"labelFont": "Segoe UI Variable", "labelFontSize": 14, "labelFontWeight": 400}, "field": "variable1", "title": null, "type": "nominal"}}}], "data": {"name": "data-e29b986e39a2370627dffebafd54e9ee"}, "height": 600, "padding": 60, "title": "\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430: ent", "width": 600, "$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json", "datasets": {"data-e29b986e39a2370627dffebafd54e9ee": [{"variable1": "active_imp_ent", "variable2": "active_imp_ent", "correlation": 1.0}, {"variable1": "passive_imp_ent", "variable2": "active_imp_ent", "correlation": 0.374}, {"variable1": "active_click_ent", "variable2": "active_imp_ent", "correlation": 0.871}, {"variable1": "passive_click_ent", "variable2": "active_imp_ent", "correlation": 0.183}, {"variable1": "orders_amt_ent", "variable2": "active_imp_ent", "correlation": 0.199}, {"variable1": "active_imp_ent", "variable2": "passive_imp_ent", "correlation": 0.374}, {"variable1": "passive_imp_ent", "variable2": "passive_imp_ent", "correlation": 1.0}, {"variable1": "active_click_ent", "variable2": "passive_imp_ent", "correlation": 0.361}, {"variable1": "passive_click_ent", "variable2": "passive_imp_ent", "correlation": 0.565}, {"variable1": "orders_amt_ent", "variable2": "passive_imp_ent", "correlation": 0.415}, {"variable1": "active_imp_ent", "variable2": "active_click_ent", "correlation": 0.871}, {"variable1": "passive_imp_ent", "variable2": "active_click_ent", "correlation": 0.361}, {"variable1": "active_click_ent", "variable2": "active_click_ent", "correlation": 1.0}, {"variable1": "passive_click_ent", "variable2": "active_click_ent", "correlation": 0.13}, {"variable1": "orders_amt_ent", "variable2": "active_click_ent", "correlation": 0.164}, {"variable1": "active_imp_ent", "variable2": "passive_click_ent", "correlation": 0.183}, {"variable1": "passive_imp_ent", "variable2": "passive_click_ent", "correlation": 0.565}, {"variable1": "active_click_ent", "variable2": "passive_click_ent", "correlation": 0.13}, {"variable1": "passive_click_ent", "variable2": "passive_click_ent", "correlation": 1.0}, {"variable1": "orders_amt_ent", "variable2": "passive_click_ent", "correlation": 0.555}, {"variable1": "active_imp_ent", "variable2": "orders_amt_ent", "correlation": 0.199}, {"variable1": "passive_imp_ent", "variable2": "orders_amt_ent", "correlation": 0.415}, {"variable1": "active_click_ent", "variable2": "orders_amt_ent", "correlation": 0.164}, {"variable1": "passive_click_ent", "variable2": "orders_amt_ent", "correlation": 0.555}, {"variable1": "orders_amt_ent", "variable2": "orders_amt_ent", "correlation": 1.0}]}};
|
||||
var embedOpt = {"mode": "vega-lite"};
|
||||
|
||||
function showError(el, error){
|
||||
el.innerHTML = ('<div style="color:red;">'
|
||||
+ '<p>JavaScript Error: ' + error.message + '</p>'
|
||||
+ "<p>This usually means there's a typo in your chart specification. "
|
||||
+ "See the javascript console for the full traceback.</p>"
|
||||
+ '</div>');
|
||||
throw error;
|
||||
}
|
||||
const el = document.getElementById('vis');
|
||||
vegaEmbed("#vis", spec, embedOpt)
|
||||
.catch(error => showError(el, error));
|
||||
})(vegaEmbed);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user