This commit is contained in:
2025-12-16 01:51:05 +03:00
parent a1bc89c481
commit c963b1e5ac
123 changed files with 5644 additions and 3802 deletions

View 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-a44d6a43050cf94cf7c0d1159a011cc4"}, "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: hotel", "width": 600, "$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json", "datasets": {"data-a44d6a43050cf94cf7c0d1159a011cc4": [{"variable1": "active_imp_hotel", "variable2": "active_imp_hotel", "correlation": 1.0}, {"variable1": "passive_imp_hotel", "variable2": "active_imp_hotel", "correlation": -0.018}, {"variable1": "active_click_hotel", "variable2": "active_imp_hotel", "correlation": 0.608}, {"variable1": "passive_click_hotel", "variable2": "active_imp_hotel", "correlation": 0.01}, {"variable1": "orders_amt_hotel", "variable2": "active_imp_hotel", "correlation": 0.07}, {"variable1": "active_imp_hotel", "variable2": "passive_imp_hotel", "correlation": -0.018}, {"variable1": "passive_imp_hotel", "variable2": "passive_imp_hotel", "correlation": 1.0}, {"variable1": "active_click_hotel", "variable2": "passive_imp_hotel", "correlation": 0.015}, {"variable1": "passive_click_hotel", "variable2": "passive_imp_hotel", "correlation": 0.176}, {"variable1": "orders_amt_hotel", "variable2": "passive_imp_hotel", "correlation": 0.002}, {"variable1": "active_imp_hotel", "variable2": "active_click_hotel", "correlation": 0.608}, {"variable1": "passive_imp_hotel", "variable2": "active_click_hotel", "correlation": 0.015}, {"variable1": "active_click_hotel", "variable2": "active_click_hotel", "correlation": 1.0}, {"variable1": "passive_click_hotel", "variable2": "active_click_hotel", "correlation": 0.035}, {"variable1": "orders_amt_hotel", "variable2": "active_click_hotel", "correlation": 0.03}, {"variable1": "active_imp_hotel", "variable2": "passive_click_hotel", "correlation": 0.01}, {"variable1": "passive_imp_hotel", "variable2": "passive_click_hotel", "correlation": 0.176}, {"variable1": "active_click_hotel", "variable2": "passive_click_hotel", "correlation": 0.035}, {"variable1": "passive_click_hotel", "variable2": "passive_click_hotel", "correlation": 1.0}, {"variable1": "orders_amt_hotel", "variable2": "passive_click_hotel", "correlation": -0.003}, {"variable1": "active_imp_hotel", "variable2": "orders_amt_hotel", "correlation": 0.07}, {"variable1": "passive_imp_hotel", "variable2": "orders_amt_hotel", "correlation": 0.002}, {"variable1": "active_click_hotel", "variable2": "orders_amt_hotel", "correlation": 0.03}, {"variable1": "passive_click_hotel", "variable2": "orders_amt_hotel", "correlation": -0.003}, {"variable1": "orders_amt_hotel", "variable2": "orders_amt_hotel", "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>