gadem
This commit is contained in:
BIN
preanalysis/.DS_Store
vendored
Normal file
BIN
preanalysis/.DS_Store
vendored
Normal file
Binary file not shown.
42
preanalysis/correlation_matrix_avia.html
Normal file
42
preanalysis/correlation_matrix_avia.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-22a62ccaae9b988b71ffea2c4f33c121"}, "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: avia", "width": 600, "$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json", "datasets": {"data-22a62ccaae9b988b71ffea2c4f33c121": [{"variable1": "active_imp_avia", "variable2": "active_imp_avia", "correlation": 1.0}, {"variable1": "passive_imp_avia", "variable2": "active_imp_avia", "correlation": 0.019}, {"variable1": "active_click_avia", "variable2": "active_imp_avia", "correlation": 0.656}, {"variable1": "passive_click_avia", "variable2": "active_imp_avia", "correlation": 0.089}, {"variable1": "orders_amt_avia", "variable2": "active_imp_avia", "correlation": -0.045}, {"variable1": "active_imp_avia", "variable2": "passive_imp_avia", "correlation": 0.019}, {"variable1": "passive_imp_avia", "variable2": "passive_imp_avia", "correlation": 1.0}, {"variable1": "active_click_avia", "variable2": "passive_imp_avia", "correlation": 0.048}, {"variable1": "passive_click_avia", "variable2": "passive_imp_avia", "correlation": 0.275}, {"variable1": "orders_amt_avia", "variable2": "passive_imp_avia", "correlation": 0.03}, {"variable1": "active_imp_avia", "variable2": "active_click_avia", "correlation": 0.656}, {"variable1": "passive_imp_avia", "variable2": "active_click_avia", "correlation": 0.048}, {"variable1": "active_click_avia", "variable2": "active_click_avia", "correlation": 1.0}, {"variable1": "passive_click_avia", "variable2": "active_click_avia", "correlation": 0.111}, {"variable1": "orders_amt_avia", "variable2": "active_click_avia", "correlation": 0.007}, {"variable1": "active_imp_avia", "variable2": "passive_click_avia", "correlation": 0.089}, {"variable1": "passive_imp_avia", "variable2": "passive_click_avia", "correlation": 0.275}, {"variable1": "active_click_avia", "variable2": "passive_click_avia", "correlation": 0.111}, {"variable1": "passive_click_avia", "variable2": "passive_click_avia", "correlation": 1.0}, {"variable1": "orders_amt_avia", "variable2": "passive_click_avia", "correlation": 0.146}, {"variable1": "active_imp_avia", "variable2": "orders_amt_avia", "correlation": -0.045}, {"variable1": "passive_imp_avia", "variable2": "orders_amt_avia", "correlation": 0.03}, {"variable1": "active_click_avia", "variable2": "orders_amt_avia", "correlation": 0.007}, {"variable1": "passive_click_avia", "variable2": "orders_amt_avia", "correlation": 0.146}, {"variable1": "orders_amt_avia", "variable2": "orders_amt_avia", "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>
|
||||
42
preanalysis/correlation_matrix_avia_hotels.html
Normal file
42
preanalysis/correlation_matrix_avia_hotels.html
Normal file
File diff suppressed because one or more lines are too long
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>
|
||||
42
preanalysis/correlation_matrix_hotel.html
Normal file
42
preanalysis/correlation_matrix_hotel.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-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>
|
||||
42
preanalysis/correlation_matrix_shopping.html
Normal file
42
preanalysis/correlation_matrix_shopping.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-6991dc45fac5ad496fd827bd6724a7ff"}, "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: shopping", "width": 600, "$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json", "datasets": {"data-6991dc45fac5ad496fd827bd6724a7ff": [{"variable1": "active_imp_shopping", "variable2": "active_imp_shopping", "correlation": 1.0}, {"variable1": "passive_imp_shopping", "variable2": "active_imp_shopping", "correlation": 0.227}, {"variable1": "active_click_shopping", "variable2": "active_imp_shopping", "correlation": 0.873}, {"variable1": "passive_click_shopping", "variable2": "active_imp_shopping", "correlation": 0.117}, {"variable1": "orders_amt_shopping", "variable2": "active_imp_shopping", "correlation": 0.187}, {"variable1": "active_imp_shopping", "variable2": "passive_imp_shopping", "correlation": 0.227}, {"variable1": "passive_imp_shopping", "variable2": "passive_imp_shopping", "correlation": 1.0}, {"variable1": "active_click_shopping", "variable2": "passive_imp_shopping", "correlation": 0.209}, {"variable1": "passive_click_shopping", "variable2": "passive_imp_shopping", "correlation": 0.259}, {"variable1": "orders_amt_shopping", "variable2": "passive_imp_shopping", "correlation": 0.148}, {"variable1": "active_imp_shopping", "variable2": "active_click_shopping", "correlation": 0.873}, {"variable1": "passive_imp_shopping", "variable2": "active_click_shopping", "correlation": 0.209}, {"variable1": "active_click_shopping", "variable2": "active_click_shopping", "correlation": 1.0}, {"variable1": "passive_click_shopping", "variable2": "active_click_shopping", "correlation": 0.08}, {"variable1": "orders_amt_shopping", "variable2": "active_click_shopping", "correlation": 0.184}, {"variable1": "active_imp_shopping", "variable2": "passive_click_shopping", "correlation": 0.117}, {"variable1": "passive_imp_shopping", "variable2": "passive_click_shopping", "correlation": 0.259}, {"variable1": "active_click_shopping", "variable2": "passive_click_shopping", "correlation": 0.08}, {"variable1": "passive_click_shopping", "variable2": "passive_click_shopping", "correlation": 1.0}, {"variable1": "orders_amt_shopping", "variable2": "passive_click_shopping", "correlation": 0.116}, {"variable1": "active_imp_shopping", "variable2": "orders_amt_shopping", "correlation": 0.187}, {"variable1": "passive_imp_shopping", "variable2": "orders_amt_shopping", "correlation": 0.148}, {"variable1": "active_click_shopping", "variable2": "orders_amt_shopping", "correlation": 0.184}, {"variable1": "passive_click_shopping", "variable2": "orders_amt_shopping", "correlation": 0.116}, {"variable1": "orders_amt_shopping", "variable2": "orders_amt_shopping", "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>
|
||||
42
preanalysis/correlation_matrix_super.html
Normal file
42
preanalysis/correlation_matrix_super.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-9caae2929b2f51d937bc7954921aa62a"}, "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: super", "width": 600, "$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json", "datasets": {"data-9caae2929b2f51d937bc7954921aa62a": [{"variable1": "active_imp_super", "variable2": "active_imp_super", "correlation": 1.0}, {"variable1": "passive_imp_super", "variable2": "active_imp_super", "correlation": 0.108}, {"variable1": "active_click_super", "variable2": "active_imp_super", "correlation": 0.815}, {"variable1": "passive_click_super", "variable2": "active_imp_super", "correlation": 0.036}, {"variable1": "orders_amt_super", "variable2": "active_imp_super", "correlation": 0.044}, {"variable1": "active_imp_super", "variable2": "passive_imp_super", "correlation": 0.108}, {"variable1": "passive_imp_super", "variable2": "passive_imp_super", "correlation": 1.0}, {"variable1": "active_click_super", "variable2": "passive_imp_super", "correlation": 0.139}, {"variable1": "passive_click_super", "variable2": "passive_imp_super", "correlation": 0.25}, {"variable1": "orders_amt_super", "variable2": "passive_imp_super", "correlation": 0.107}, {"variable1": "active_imp_super", "variable2": "active_click_super", "correlation": 0.815}, {"variable1": "passive_imp_super", "variable2": "active_click_super", "correlation": 0.139}, {"variable1": "active_click_super", "variable2": "active_click_super", "correlation": 1.0}, {"variable1": "passive_click_super", "variable2": "active_click_super", "correlation": 0.018}, {"variable1": "orders_amt_super", "variable2": "active_click_super", "correlation": 0.021}, {"variable1": "active_imp_super", "variable2": "passive_click_super", "correlation": 0.036}, {"variable1": "passive_imp_super", "variable2": "passive_click_super", "correlation": 0.25}, {"variable1": "active_click_super", "variable2": "passive_click_super", "correlation": 0.018}, {"variable1": "passive_click_super", "variable2": "passive_click_super", "correlation": 1.0}, {"variable1": "orders_amt_super", "variable2": "passive_click_super", "correlation": 0.119}, {"variable1": "active_imp_super", "variable2": "orders_amt_super", "correlation": 0.044}, {"variable1": "passive_imp_super", "variable2": "orders_amt_super", "correlation": 0.107}, {"variable1": "active_click_super", "variable2": "orders_amt_super", "correlation": 0.021}, {"variable1": "passive_click_super", "variable2": "orders_amt_super", "correlation": 0.119}, {"variable1": "orders_amt_super", "variable2": "orders_amt_super", "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>
|
||||
42
preanalysis/correlation_matrix_transport.html
Normal file
42
preanalysis/correlation_matrix_transport.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-6ddd1d067b239dbf0487b99103f89e34"}, "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: transport", "width": 600, "$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json", "datasets": {"data-6ddd1d067b239dbf0487b99103f89e34": [{"variable1": "active_imp_transport", "variable2": "active_imp_transport", "correlation": 1.0}, {"variable1": "passive_imp_transport", "variable2": "active_imp_transport", "correlation": 0.402}, {"variable1": "active_click_transport", "variable2": "active_imp_transport", "correlation": 0.843}, {"variable1": "passive_click_transport", "variable2": "active_imp_transport", "correlation": 0.118}, {"variable1": "orders_amt_transport", "variable2": "active_imp_transport", "correlation": 0.178}, {"variable1": "active_imp_transport", "variable2": "passive_imp_transport", "correlation": 0.402}, {"variable1": "passive_imp_transport", "variable2": "passive_imp_transport", "correlation": 1.0}, {"variable1": "active_click_transport", "variable2": "passive_imp_transport", "correlation": 0.468}, {"variable1": "passive_click_transport", "variable2": "passive_imp_transport", "correlation": 0.258}, {"variable1": "orders_amt_transport", "variable2": "passive_imp_transport", "correlation": 0.192}, {"variable1": "active_imp_transport", "variable2": "active_click_transport", "correlation": 0.843}, {"variable1": "passive_imp_transport", "variable2": "active_click_transport", "correlation": 0.468}, {"variable1": "active_click_transport", "variable2": "active_click_transport", "correlation": 1.0}, {"variable1": "passive_click_transport", "variable2": "active_click_transport", "correlation": 0.09}, {"variable1": "orders_amt_transport", "variable2": "active_click_transport", "correlation": 0.168}, {"variable1": "active_imp_transport", "variable2": "passive_click_transport", "correlation": 0.118}, {"variable1": "passive_imp_transport", "variable2": "passive_click_transport", "correlation": 0.258}, {"variable1": "active_click_transport", "variable2": "passive_click_transport", "correlation": 0.09}, {"variable1": "passive_click_transport", "variable2": "passive_click_transport", "correlation": 1.0}, {"variable1": "orders_amt_transport", "variable2": "passive_click_transport", "correlation": 0.243}, {"variable1": "active_imp_transport", "variable2": "orders_amt_transport", "correlation": 0.178}, {"variable1": "passive_imp_transport", "variable2": "orders_amt_transport", "correlation": 0.192}, {"variable1": "active_click_transport", "variable2": "orders_amt_transport", "correlation": 0.168}, {"variable1": "passive_click_transport", "variable2": "orders_amt_transport", "correlation": 0.243}, {"variable1": "orders_amt_transport", "variable2": "orders_amt_transport", "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>
|
||||
@@ -1,12 +1,14 @@
|
||||
from __future__ import annotations
|
||||
|
||||
"""Утилиты для предварительного EDA: загрузка CSV, нормализация признаков и агрегации."""
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Dict, Iterable, List
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
||||
# Paths and column groups
|
||||
# Пути и группировки колонок, которые используются во всех агрегациях
|
||||
DATA_PATH = Path("dataset/ds.csv")
|
||||
CATEGORIES: List[str] = ["ent", "super", "transport", "shopping", "hotel", "avia"]
|
||||
|
||||
@@ -28,7 +30,7 @@ CAT_COLS = ["gender_cd", "device_platform_cd"]
|
||||
|
||||
|
||||
def safe_divide(numerator: pd.Series | float, denominator: pd.Series | float) -> pd.Series:
|
||||
"""Divide with protection against zero (works for Series and scalars)."""
|
||||
"""Деление с защитой от нулей, чтобы не получить inf/NaN."""
|
||||
if isinstance(denominator, pd.Series):
|
||||
denom = denominator.replace(0, np.nan)
|
||||
else:
|
||||
@@ -37,12 +39,14 @@ def safe_divide(numerator: pd.Series | float, denominator: pd.Series | float) ->
|
||||
|
||||
|
||||
def normalize_gender(series: pd.Series) -> pd.Series:
|
||||
# Приводим строковые значения пола к единому набору кодов
|
||||
cleaned = series.fillna("UNKNOWN").astype(str).str.strip().str.upper()
|
||||
mapping = {"M": "M", "MALE": "M", "F": "F", "FEMALE": "F"}
|
||||
return cleaned.map(mapping).fillna("UNKNOWN")
|
||||
|
||||
|
||||
def normalize_device(series: pd.Series) -> pd.Series:
|
||||
# Схлопываем варианты платформ в читаемые подписи
|
||||
cleaned = series.fillna("unknown").astype(str).str.strip()
|
||||
lowered = cleaned.str.lower().str.replace(" ", "").str.replace("_", "")
|
||||
mapping = {"android": "Android", "ios": "iOS", "ipados": "iPadOS", "ipad": "iPadOS"}
|
||||
@@ -52,6 +56,7 @@ def normalize_device(series: pd.Series) -> pd.Series:
|
||||
|
||||
|
||||
def add_age_group(df: pd.DataFrame) -> pd.DataFrame:
|
||||
# Делим пользователей по возрастным корзинам для срезов
|
||||
bins = [0, 25, 35, 45, 55, np.inf]
|
||||
labels = ["<25", "25-34", "35-44", "45-54", "55+"]
|
||||
df["age_group"] = pd.cut(df["age"], bins=bins, labels=labels, right=False)
|
||||
@@ -59,6 +64,7 @@ def add_age_group(df: pd.DataFrame) -> pd.DataFrame:
|
||||
|
||||
|
||||
def add_totals(df: pd.DataFrame) -> pd.DataFrame:
|
||||
# Считаем суммарные показы/клики/заказы и CTR/CR метрики
|
||||
df["active_imp_total"] = df[ACTIVE_IMP_COLS].sum(axis=1)
|
||||
df["passive_imp_total"] = df[PASSIVE_IMP_COLS].sum(axis=1)
|
||||
df["active_click_total"] = df[ACTIVE_CLICK_COLS].sum(axis=1)
|
||||
@@ -75,6 +81,7 @@ def add_totals(df: pd.DataFrame) -> pd.DataFrame:
|
||||
|
||||
|
||||
def add_flags(df: pd.DataFrame) -> pd.DataFrame:
|
||||
# Создаём бинарные флаги наличия коммуникаций и заказов по клиенту
|
||||
df["has_active_comm"] = (df[ACTIVE_IMP_COLS + ACTIVE_CLICK_COLS].sum(axis=1) > 0).astype(int)
|
||||
df["has_passive_comm"] = (df[PASSIVE_IMP_COLS + PASSIVE_CLICK_COLS].sum(axis=1) > 0).astype(int)
|
||||
df["has_any_order"] = (df[ORDER_COLS].sum(axis=1) > 0).astype(int)
|
||||
@@ -83,6 +90,7 @@ def add_flags(df: pd.DataFrame) -> pd.DataFrame:
|
||||
|
||||
|
||||
def load_data(path: Path | str = DATA_PATH) -> pd.DataFrame:
|
||||
# Базовая загрузка CSV: приводим даты/категориальные поля и добавляем сводные метрики
|
||||
df = pd.read_csv(path)
|
||||
df["business_dt"] = pd.to_datetime(df["business_dt"])
|
||||
df["gender_cd"] = normalize_gender(df["gender_cd"])
|
||||
@@ -94,6 +102,7 @@ def load_data(path: Path | str = DATA_PATH) -> pd.DataFrame:
|
||||
|
||||
|
||||
def describe_zero_share(df: pd.DataFrame, cols: Iterable[str]) -> pd.DataFrame:
|
||||
# Формируем компактную статистику по выбранным числовым столбцам
|
||||
stats = []
|
||||
for col in cols:
|
||||
series = df[col]
|
||||
@@ -117,6 +126,7 @@ def describe_zero_share(df: pd.DataFrame, cols: Iterable[str]) -> pd.DataFrame:
|
||||
|
||||
|
||||
def build_daily(df: pd.DataFrame) -> pd.DataFrame:
|
||||
# Агрегируем метрики по дням, добавляя суммарные показатели и день недели
|
||||
agg_cols = ACTIVE_IMP_COLS + PASSIVE_IMP_COLS + ACTIVE_CLICK_COLS + PASSIVE_CLICK_COLS + ORDER_COLS
|
||||
daily = df.groupby("business_dt")[agg_cols].sum().reset_index()
|
||||
daily = add_totals(daily)
|
||||
@@ -125,6 +135,7 @@ def build_daily(df: pd.DataFrame) -> pd.DataFrame:
|
||||
|
||||
|
||||
def build_client(df: pd.DataFrame) -> pd.DataFrame:
|
||||
# Строим клиентские агрегаты и метаданные (мода по кат. полям, медиана возраста)
|
||||
agg_spec: Dict[str, str] = {col: "sum" for col in ACTIVE_IMP_COLS + PASSIVE_IMP_COLS + ACTIVE_CLICK_COLS + PASSIVE_CLICK_COLS + ORDER_COLS}
|
||||
meta_spec: Dict[str, str | callable] = {
|
||||
"age": "median",
|
||||
|
||||
File diff suppressed because one or more lines are too long
3582
preanalysis/first_stage_danos.ipynb
Normal file
3582
preanalysis/first_stage_danos.ipynb
Normal file
File diff suppressed because one or more lines are too long
42
preanalysis/horizontal_bar_chart.html
Normal file
42
preanalysis/horizontal_bar_chart.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}, "axis": {"grid": true, "labelFont": "Segoe UI Variable", "labelFontSize": 16, "labelFontWeight": 400, "titleFont": "Segoe UI Variable", "titleFontSize": 18, "titleFontWeight": 600}, "title": {"anchor": "middle", "font": "Segoe UI Variable", "fontSize": 20, "fontWeight": 600}}, "data": {"name": "data-1e6a838a8ad1a28c1e6f465de44aa528"}, "mark": {"type": "bar", "cornerRadius": 6, "height": 35}, "background": "#00000000", "encoding": {"color": {"field": "category", "legend": null, "scale": {"scheme": "set2"}, "type": "nominal"}, "tooltip": [{"field": "category", "type": "nominal"}, {"field": "value", "type": "quantitative"}], "x": {"field": "value", "title": "\u0421\u0443\u043c\u043c\u0430", "type": "quantitative"}, "y": {"axis": {"labelLimit": 200}, "field": "category", "sort": "-x", "title": "\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438", "type": "nominal"}}, "height": 400, "padding": 50, "title": "\u0420\u0430\u0441\u0445\u043e\u0434\u044b \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c", "width": 700, "$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json", "datasets": {"data-1e6a838a8ad1a28c1e6f465de44aa528": [{"category": "ent", "value": 1055}, {"category": "super", "value": 2421}, {"category": "transport", "value": 5871}, {"category": "shopping", "value": 737}, {"category": "hotel", "value": 430}, {"category": "avia", "value": 882}]}};
|
||||
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>
|
||||
42
preanalysis/orders_distribution_all_categories_grouped.html
Normal file
42
preanalysis/orders_distribution_all_categories_grouped.html
Normal file
File diff suppressed because one or more lines are too long
@@ -1,42 +0,0 @@
|
||||
<!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}, "axis": {"grid": true, "labelFont": "Segoe UI Variable", "labelFontSize": 16, "labelFontWeight": 400, "titleFont": "Segoe UI Variable", "titleFontSize": 18, "titleFontWeight": 600}, "title": {"anchor": "middle", "font": "Segoe UI Variable", "fontSize": 20, "fontWeight": 600}}, "data": {"name": "data-e8525735964a39d1872eccee3a42785b"}, "mark": {"type": "bar", "cornerRadius": 6, "width": 35}, "background": "#00000000", "encoding": {"color": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "legend": null, "type": "nominal"}, "tooltip": [{"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "type": "nominal"}, {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "type": "quantitative"}], "x": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "sort": null, "title": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432", "type": "nominal"}, "y": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "title": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "type": "quantitative"}}, "height": 400, "padding": 50, "title": "\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: AVIA", "width": 600, "$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json", "datasets": {"data-e8525735964a39d1872eccee3a42785b": [{"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 0, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 117307, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "0"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 1, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 755, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "1"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 2, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 108, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "2"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 3, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 14, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "3"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 4, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 4, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "4"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 6, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 1, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "6"}]}};
|
||||
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>
|
||||
@@ -1,42 +0,0 @@
|
||||
<!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}, "axis": {"grid": true, "labelFont": "Segoe UI Variable", "labelFontSize": 16, "labelFontWeight": 400, "titleFont": "Segoe UI Variable", "titleFontSize": 18, "titleFontWeight": 600}, "title": {"anchor": "middle", "font": "Segoe UI Variable", "fontSize": 20, "fontWeight": 600}}, "data": {"name": "data-9ac31061938e99fd77617c4db2905740"}, "mark": {"type": "bar", "cornerRadius": 6, "width": 35}, "background": "#00000000", "encoding": {"color": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "legend": null, "type": "nominal"}, "tooltip": [{"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "type": "nominal"}, {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "type": "quantitative"}], "x": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "sort": null, "title": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432", "type": "nominal"}, "y": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "title": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "type": "quantitative"}}, "height": 400, "padding": 50, "title": "\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: ENT", "width": 600, "$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json", "datasets": {"data-9ac31061938e99fd77617c4db2905740": [{"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 0, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 117134, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "0"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 1, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 958, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "1"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 2, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 82, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "2"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 3, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 9, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "3"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 4, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 3, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "4"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 5, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 2, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "5"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 11, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 1, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "11"}]}};
|
||||
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>
|
||||
@@ -1,42 +0,0 @@
|
||||
<!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}, "axis": {"grid": true, "labelFont": "Segoe UI Variable", "labelFontSize": 16, "labelFontWeight": 400, "titleFont": "Segoe UI Variable", "titleFontSize": 18, "titleFontWeight": 600}, "title": {"anchor": "middle", "font": "Segoe UI Variable", "fontSize": 20, "fontWeight": 600}}, "data": {"name": "data-4792fb2b4b01a241a8f5ddc724e48516"}, "mark": {"type": "bar", "cornerRadius": 6, "width": 35}, "background": "#00000000", "encoding": {"color": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "legend": null, "type": "nominal"}, "tooltip": [{"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "type": "nominal"}, {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "type": "quantitative"}], "x": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "sort": null, "title": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432", "type": "nominal"}, "y": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "title": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "type": "quantitative"}}, "height": 400, "padding": 50, "title": "\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: HOTEL", "width": 600, "$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json", "datasets": {"data-4792fb2b4b01a241a8f5ddc724e48516": [{"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 0, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 117759, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "0"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 1, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 399, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "1"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 2, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 28, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "2"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 3, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 3, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "3"}]}};
|
||||
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>
|
||||
@@ -1,42 +0,0 @@
|
||||
<!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}, "axis": {"grid": true, "labelFont": "Segoe UI Variable", "labelFontSize": 16, "labelFontWeight": 400, "titleFont": "Segoe UI Variable", "titleFontSize": 18, "titleFontWeight": 600}, "title": {"anchor": "middle", "font": "Segoe UI Variable", "fontSize": 20, "fontWeight": 600}}, "data": {"name": "data-fd86208218f3e63a52715a7a95c7e10c"}, "mark": {"type": "bar", "cornerRadius": 6, "width": 35}, "background": "#00000000", "encoding": {"color": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "legend": null, "type": "nominal"}, "tooltip": [{"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "type": "nominal"}, {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "type": "quantitative"}], "x": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "sort": null, "title": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432", "type": "nominal"}, "y": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "title": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "type": "quantitative"}}, "height": 400, "padding": 50, "title": "\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: SHOPPING", "width": 600, "$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json", "datasets": {"data-fd86208218f3e63a52715a7a95c7e10c": [{"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 0, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 117452, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "0"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 1, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 625, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "1"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 2, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 86, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "2"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 3, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 16, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "3"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 4, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 4, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "4"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 5, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 3, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "5"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 6, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 1, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "6"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 11, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 2, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "11"}]}};
|
||||
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>
|
||||
@@ -1,42 +0,0 @@
|
||||
<!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}, "axis": {"grid": true, "labelFont": "Segoe UI Variable", "labelFontSize": 16, "labelFontWeight": 400, "titleFont": "Segoe UI Variable", "titleFontSize": 18, "titleFontWeight": 600}, "title": {"anchor": "middle", "font": "Segoe UI Variable", "fontSize": 20, "fontWeight": 600}}, "data": {"name": "data-6a3e30f72b49598ac7803a03e6e1a4bf"}, "mark": {"type": "bar", "cornerRadius": 6, "width": 35}, "background": "#00000000", "encoding": {"color": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "legend": null, "type": "nominal"}, "tooltip": [{"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "type": "nominal"}, {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "type": "quantitative"}], "x": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "sort": null, "title": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432", "type": "nominal"}, "y": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "title": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "type": "quantitative"}}, "height": 400, "padding": 50, "title": "\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: SUPER", "width": 600, "$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json", "datasets": {"data-6a3e30f72b49598ac7803a03e6e1a4bf": [{"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 0, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 115768, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "0"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 1, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 2281, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "1"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 2, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 129, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "2"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 3, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 9, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "3"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 4, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 2, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "4"}]}};
|
||||
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>
|
||||
@@ -1,42 +0,0 @@
|
||||
<!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}, "axis": {"grid": true, "labelFont": "Segoe UI Variable", "labelFontSize": 16, "labelFontWeight": 400, "titleFont": "Segoe UI Variable", "titleFontSize": 18, "titleFontWeight": 600}, "title": {"anchor": "middle", "font": "Segoe UI Variable", "fontSize": 20, "fontWeight": 600}}, "data": {"name": "data-c399e6589132909c5df1d6122ea515c8"}, "mark": {"type": "bar", "cornerRadius": 6, "width": 35}, "background": "#00000000", "encoding": {"color": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "legend": null, "type": "nominal"}, "tooltip": [{"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "type": "nominal"}, {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "type": "quantitative"}], "x": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str", "sort": null, "title": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432", "type": "nominal"}, "y": {"field": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "title": "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432", "type": "quantitative"}}, "height": 400, "padding": 50, "title": "\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: TRANSPORT", "width": 600, "$schema": "https://vega.github.io/schema/vega-lite/v6.1.0.json", "datasets": {"data-c399e6589132909c5df1d6122ea515c8": [{"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 0, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 112318, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "0"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 1, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 5516, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "1"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 2, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 311, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "2"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 3, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 35, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "3"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 4, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 8, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "4"}, {"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432": 5, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432": 1, "\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432_str": "5"}]}};
|
||||
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