{"id":455220,"date":"2025-04-09T03:00:10","date_gmt":"2025-04-09T03:00:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=455220"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=455220","title":{"rendered":"<span>\u0422\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 Plotly<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0411\u0443\u0434\u0443\u0447\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0446\u0435\u0439 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0437\u043c\u0430 \u0432\u043e \u0432\u0441\u0435\u043c, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u044f \u0438\u0437\u0431\u0435\u0433\u0430\u044e \u043f\u043e\u043f\u044b\u0442\u043e\u043a &#171;\u0432\u043f\u0438\u0445\u043d\u0443\u0442\u044c \u043d\u0435\u0432\u043f\u0438\u0445\u0443\u0435\u043c\u043e\u0435&#187; \u0432 \u043e\u0434\u043d\u0443 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u041b\u0443\u0447\u0448\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432. \u041d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0432\u0438\u0437\u0443\u0430\u043b \u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438. <\/p>\n<p>\u042d\u0442\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445. \u041d\u043e \u0437\u0430\u0438\u043d\u0442\u0440\u0438\u0433\u043e\u0432\u0430\u043b \u043c\u0435\u043d\u044f \u0434\u0430\u0436\u0435 \u043d\u0435 \u0441\u0430\u043c \u0434\u0438\u0437\u0430\u0439\u043d, \u0430 \u0442\u0435\u043a\u0441\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0438\u0437 \u0422\u0413\u041a Power BI Design: &#171;\u0422\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435. \u041a\u0430\u043a? \u041d\u0435\u043f\u0440\u043e\u0441\u0442\u043e&#187;. \u0418 \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b\u0430: \u0430 \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 python  \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c plotly?<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/679\/80b\/580\/67980b580759ddd3a032bd7418ae5811.jpg\" alt=\"\u0420\u0435\u0444\u0435\u0440\u0435\u043d\u0441, \u0432\u0437\u044f\u0442\u043e \u0438\u0437 \u0422\u0413\u041a Power BI Design\" title=\"\u0420\u0435\u0444\u0435\u0440\u0435\u043d\u0441, \u0432\u0437\u044f\u0442\u043e \u0438\u0437 \u0422\u0413\u041a Power BI Design\" width=\"714\" height=\"429\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/679\/80b\/580\/67980b580759ddd3a032bd7418ae5811.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0444\u0435\u0440\u0435\u043d\u0441, \u0432\u0437\u044f\u0442\u043e \u0438\u0437 \u0422\u0413\u041a Power BI Design<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0424\u0438\u043d\u0430\u043b \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0439, \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043d\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430) \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043a\u043e\u043d\u0446\u0435<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/5f3\/a60\/da7\/5f3a60da7de6b6520706f7e19c7809b2.png\" width=\"650\" height=\"350\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5f3\/a60\/da7\/5f3a60da7de6b6520706f7e19c7809b2.png\"\/><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"python\">import numpy as np revenue_fact = np.random.randint(50000000, 100000000, size=12).tolist() #\u0432\u044b\u0440\u0443\u0447\u043a\u0430 SKU_count = np.random.randint(80, 150, size=12).tolist() #\u043a\u043e\u043b-\u0432\u043e SKU quarters_1 = pd.date_range('2022Q1', periods=12, freq='Q') quarters = quarters_1.to_period('Q').astype(str) #\u043f\u0435\u0440\u0438\u043e\u0434\u044b - \u043a\u0432\u0430\u0440\u0442\u0430\u043b\u044b gross_margin = np.random.randint(15, 22, size=12).tolist() #\u0432\u0430\u043b\u043e\u0432\u0430\u044f \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c #\u0441\u043e\u0437\u0434\u0430\u044e \u0444\u0440\u0435\u0439\u043c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b df = pd.DataFrame({        'quarter': quarters,     'revenue': revenue_fact,     'SKU_count': SKU_count,      'percent': persent,      'gross_margin': gross_margin}) df['revenue_mln'] = round(df['revenue']\/1000000,2) df['gross_profit_margin'] = round(df['revenue'] * (df['gross_margin']\/100),2) df['gross_profit_margin_mln'] = round(df['gross_profit_margin']\/1000000,2)<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044e, \u0437\u0430\u0447\u0435\u043c \u044f \u0441\u043e\u0437\u0434\u0430\u044e \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e \u0432\u044b\u0440\u0443\u0447\u043a\u0435 \u0438 \u0432\u0430\u043b\u043e\u0432\u043e\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0432 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u0445 \u0440\u0443\u0431\u043b\u0435\u0439.<\/p>\n<h3>\u041e\u0431\u0449\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430<\/h3>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u0434\u0432\u0443\u043c\u044f \u043e\u0441\u044f\u043c\u0438 Y: \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 (\u043b\u0435\u0432\u0430\u044f) \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f\/\u0432\u0442\u043e\u0440\u0438\u0447\u043d\u0430\u044f (\u043f\u0440\u0430\u0432\u0430\u044f), \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0438 \u0431\u0443\u0434\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u043e\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438. <\/p>\n<pre><code class=\"python\"># \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0441 \u043f\u043e\u0434\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0435 \u043e\u0441\u0438 Y fig = make_subplots(specs=[[{'secondary_y': True}]]) # \u0412 \u043e\u0441\u044c X \u043a\u043b\u0430\u0434\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043f\u0435\u0440\u0432\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a: \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0434\u0430\u043d\u043d\u044b\u0445 SCU # secondary_y = True \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u043a\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043e\u0441\u0438 Y fig.add_trace(go.Scatter(x=df['quarter'],                           y=df['SKU_count'],                           name='\u041a\u043e\u043b-\u0432\u043e SKU',                           mode='lines+markers+text'),               secondary_y = True)  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0432\u0442\u043e\u0440\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a: \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0440\u0443\u0447\u043a\u0438 fig.add_trace(go.Bar(x=df['quarter'], y=df['revenue'],                       name='\u0412\u044b\u0440\u0443\u0447\u043a\u0430'),                secondary_y = False)  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0442\u0440\u0435\u0442\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a: \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0430\u043b\u043e\u0432\u043e\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 fig.add_trace(go.Bar(x=df['quarter'], y=df['gross_profit_margin'],                       name='\u0412\u0430\u043b\u043e\u0432\u0430\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c'),                secondary_y = False)  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a: \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0430\u043b\u043e\u0432\u043e\u0439 \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 fig.add_trace(go.Scatter(x=df['quarter'], y=df['gross_margin'],                           name='\u0420\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c',                           mode='lines',                           fill='tozeroy'),                secondary_y = True)  fig.update_layout(title=(f'\u0421\u043a\u043e\u043b\u044c\u043a\u043e SKU \u043c\u044b \u043f\u0440\u043e\u0434\u0430\u0435\u043c \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c'), #title_x=0.1, title_y=0.95,                   #title_font=dict(size=16, color=dark_3, weight='bold'),                    height = 350, width = 650), fig.show()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f3d\/078\/109\/f3d07810977dafa354a2a013675444a4.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430\" width=\"650\" height=\"350\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f3d\/078\/109\/f3d07810977dafa354a2a013675444a4.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043d\u0435\u043a\u0430\u0437\u0438\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f: \u043c\u0435\u0436\u0434\u0443 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438, \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e SKU \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0430\u043b\u043e\u0432\u043e\u0439 \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0436 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u0441\u0435\u0442\u043a\u0438 \u043e\u0431\u0435\u0438\u0445 \u043e\u0441\u0435\u0439 Y \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043d\u0435\u0440\u0430\u0437\u0431\u0435\u0440\u0438\u0445\u0443 \u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c. \u0418 \u043e\u0445 \u0443\u0436 \u044d\u0442\u0438 \u0446\u0432\u0435\u0442\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e&#8230; \u041c\u043e\u0436\u043d\u043e \u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438: \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043b\u043e\u0445\u0430 \u0438 \u0442\u043e\u0447\u043a\u0430 \u0438  \u044d\u0442\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e<\/p>\n<h2>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435<\/h2>\n<p>\u042f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043b\u0435\u0433\u0435\u043d\u0434\u0443 \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e, \u043a\u0430\u043a \u043d\u0430 \u043c\u043e\u0435\u043c \u0440\u0435\u0444\u0435\u0440\u0435\u043d\u0441\u0435, \u0437\u0430\u0434\u0430\u043c \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432, \u043e\u0442\u043a\u043b\u044e\u0447\u0443 \u0441\u0435\u0442\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u043e\u0439 \u043e\u0441\u0438 Y. \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"python\">fig = make_subplots(specs=[[{'secondary_y': True}]])  fig.add_trace(go.Scatter(x=df['quarter'],                           y=df['SKU_count'],                           name='\u041a\u043e\u043b-\u0432\u043e SKU',                           mode='lines+markers+text'),               secondary_y = True)  fig.add_trace(go.Bar(x=df['quarter'], y=df['revenue'],                       name='\u0412\u044b\u0440\u0443\u0447\u043a\u0430'),                secondary_y = False)  fig.add_trace(go.Bar(x=df['quarter'], y=df['gross_profit_margin'],                       name='\u0412\u0430\u043b\u043e\u0432\u0430\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c'),                secondary_y = False)  fig.add_trace(go.Scatter(x=df['quarter'], y=df['gross_margin'],                           name='\u0420\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c',                           mode='lines',                           fill='tozeroy'),                secondary_y = True)  fig.update_layout(title=(f'\u0421\u043a\u043e\u043b\u044c\u043a\u043e SKU \u043c\u044b \u043f\u0440\u043e\u0434\u0430\u0435\u043c \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c'),                    title_x=0.1, title_y=0.95, #\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430                   height = 350, width = 650,                    yaxis2=dict(showticklabels=False, showgrid=False), #\u043e\u0442\u043a\u043b\u044e\u0447\u0430\u044e \u0441\u0435\u0442\u043a\u0443 \u0438 \u0442\u0438\u043a\u0438 \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0439 (\u043f\u0440\u0430\u0432\u043e\u0439) \u043e\u0441\u0438 Y                    legend_font=dict(size=11), # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e \u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0434\u043b\u044f \u043b\u0435\u0433\u0435\u043d\u0434\u044b, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043c\u043e\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0440\u0438\u044f \u0432 \u043e\u0434\u0438\u043d \u0440\u044f\u0434                    #\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043b\u0435\u0433\u0435\u043d\u0434\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u0444\u043e\u043d \u0434\u043b\u044f \u043b\u0435\u0433\u0435\u043d\u0434\u0430                   legend=dict(orientation=\"h\", yanchor=\"bottom\", y=0.9, xanchor=\"left\", x=0.02, bgcolor='rgba(255, 255, 255, 0)'),                   #\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e \u0440\u0435\u0436\u0438\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432: \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430                                     barmode='overlay',                   # \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432 \u0434\u043b\u044f \u0444\u0438\u0433y\u0440\u044b                   margin = dict(t=50, l=50, r=10, b=10)) fig.show()<\/code><\/pre>\n<p>\u0410 \u044d\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ee9\/b23\/619\/ee9b236199ce820f6f69c506bbe5dc8a.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430\" width=\"650\" height=\"350\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ee9\/b23\/619\/ee9b236199ce820f6f69c506bbe5dc8a.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e \u043c\u043e\u0435\u043c\u0443 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0443\u0436\u0435 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u0435\u0435. \u041d\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0435\u0449\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432: \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430 \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u043e\u0441\u0442\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443.<br \/>\u042f \u0431\u0443\u0434\u0443 \u0440\u0435\u0448\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0443\u0442\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043e\u0432 \u043e\u0441\u0435\u0439 Y. <br \/>\u0427\u0442\u043e\u0431\u044b \u0441\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0432\u043d\u0438\u0437 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043b\u0435\u0433\u0435\u043d\u0434\u044b \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a, \u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0443 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u043e\u0441\u0438 Y. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044e \u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0442\u0438\u043a\u043e\u0432 \u043f\u043e \u043e\u0441\u044f\u043c Y \u0438 X. <br \/>\u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u043c\u0435\u0442\u043e\u0434 update_layout.<\/p>\n<pre><code class=\"python\">#\u043c\u0435\u043d\u044f\u044e \u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0442\u0438\u043a\u043e\u0432, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \"range\" \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u043e\u0441\u0435\u0439 xaxis=dict(tickfont_size=10), axis=dict(tickfont_size=10,            side='left', range=[0, df['revenue'].max() + 20000000]), yaxis2=dict(showticklabels=False, side='right', showgrid=False,              range=[df['SKU_count'].min()-20, df['SKU_count'].max() + 20])<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u0434\u0430, \u0433\u0440\u0430\u0444\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e39\/0bd\/b96\/e390bdb963972837fee6ade221662a7f.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430\" width=\"650\" height=\"350\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e39\/0bd\/b96\/e390bdb963972837fee6ade221662a7f.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/figcaption><\/div>\n<\/figure>\n<h3>\u0423\u0443\u0443\u043f\u043f\u043f\u043f\u0441&#8230; \u0410 \u0433\u0434\u0435 Area Chart?<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0433\u0440\u0430\u0444\u0438\u043a, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<br \/> \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u043e\u0439 \u043e\u0441\u0438 Y \u0441\u0442\u0430\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432 \u043c\u043e\u0435\u043c \u0440\u044f\u0434\u0443.<br \/>\u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u0432\u043e\u0434 \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043c\u043e\u044e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043b\u0443\u0447\u0448\u0435.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u044f \u0438\u0437\u043c\u0435\u043d\u044e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e Area Chart (\u0413\u0440\u0430\u0444\u0438\u043a \u043f\u043b\u043e\u0449\u0430\u0434\u0435\u0439), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0432 \u043e\u0441\u044c Y \u044f \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 df[&#8216;gross_margin&#8217;]. \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0432 ~6 \u0440\u0430\u0437 \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430 df[&#8216;SKU_count&#8217;]. \u042f \u0441\u043e\u0437\u0434\u0430\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439, \u043f\u0443\u0442\u0435\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 n.<\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"python\">fig = make_subplots(specs=[[{'secondary_y': True}]])  fig.add_trace(go.Scatter(x=df['quarter'],                           y=df['SKU_count'],                           name='\u041a\u043e\u043b-\u0432\u043e SKU',                           mode='lines+markers+text'),               secondary_y = True)  fig.add_trace(go.Bar(x=df['quarter'], y=df['revenue'],                       name='\u0412\u044b\u0440\u0443\u0447\u043a\u0430'),                secondary_y = False)  fig.add_trace(go.Bar(x=df['quarter'], y=df['gross_profit_margin'],                       name='\u0412\u0430\u043b\u043e\u0432\u0430\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c'),                secondary_y = False)  #\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 #\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 n = 4.8 \u0432\u044b\u0431\u0440\u0430\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u043e\u0434\u0431\u043e\u0440\u043e\u043c;  #\u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 gross_margin_line = [int(num * 4.8) for num in df['gross_margin'].tolist()] fig.add_trace(go.Scatter(x=df['quarter'], y=gross_margin_line, #\u041a\u043b\u0430\u0434\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a gross_margin_line \u0432 Y                          name='\u0420\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c',                           mode='lines',                           fill='tozeroy'),                secondary_y = True)  fig.update_layout(title=(f'\u0421\u043a\u043e\u043b\u044c\u043a\u043e SKU \u043c\u044b \u043f\u0440\u043e\u0434\u0430\u0435\u043c \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c'),                    title_x=0.1, title_y=0.95,                   height = 350, width = 650,                    xaxis=dict(tickfont_size=10),                   yaxis=dict(tickfont_size=10,                               side='left', range=[0, df['revenue'].max() + 20000000]),                   yaxis2=dict(showticklabels=False, side='right',                               showgrid=False, range=[df['SKU_count'].min()-20, df['SKU_count'].max() + 20]),                   legend_font=dict(size=11),                    legend=dict(orientation=\"h\", yanchor=\"bottom\", y=0.9, xanchor=\"left\", x=0.02, bgcolor='rgba(255, 255, 255, 0)'),                   barmode='overlay',                   margin = dict(t=50, l=50, r=10, b=10)) fig.show()<\/code><\/pre>\n<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e81\/42a\/2fe\/e8142a2fe96033281d9c7c249f30cc16.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430; \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430; \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438\" width=\"1001\" height=\"569\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e81\/42a\/2fe\/e8142a2fe96033281d9c7c249f30cc16.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430; \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0441\u0442\u0430\u043b \u044f\u0432\u043d\u043e \u043b\u0443\u0447\u0448\u0435. \u041d\u043e \u0432\u043e\u0442 \u0447\u0442\u043e \u044f \u0438\u043c\u0435\u044e \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435: \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u043e \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430\u0445 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0430 \u043d\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u043d\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0434\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 Area Chart, \u044f \u0441\u0434\u0435\u043b\u0430\u044e \u044d\u0442\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0435\u0434\u0438\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0443\u0442 \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e \u0432\u044b\u0440\u0443\u0447\u043a\u0435 \u0438 \u0432\u0430\u043b\u043e\u0432\u043e\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0432 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u0445 \u0440\u0443\u0431\u043b\u0435\u0439. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0443 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 customdata \u0438 hovertemplate.<\/p>\n<pre><code class=\"python\">fig = make_subplots(specs=[[{'secondary_y': True}]])  fig.add_trace(go.Scatter(x=df['quarter'], y=df['SKU_count'],                           name='\u041a\u043e\u043b-\u0432\u043e SKU',                           mode='lines+markers+text',                           customdata = df['SKU_count'],                           hovertemplate='&lt;b&gt;%{x}&lt;\/b&gt;&lt;br&gt;' + '\u041a\u043e\u043b-\u0432\u043e SKU: %{customdata:.0f}&lt;extra&gt;&lt;\/extra&gt;',),               secondary_y = True)  fig.add_trace(go.Bar(x=df['quarter'], y=df['revenue'],                       name='\u0412\u044b\u0440\u0443\u0447\u043a\u0430',                       customdata = df['revenue_mln'], #\u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441 \u0432\u044b\u0440\u0443\u0447\u043a\u043e\u0439 \u0432 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u0445 \u0440\u0443\u0431.                      hovertemplate='&lt;b&gt;%{x}&lt;\/b&gt;&lt;br&gt;' + '\u0412\u044b\u0440\u0443\u0447\u043a\u0430: %{customdata:.2f} \u043c\u043b\u043d.\u0440\u0443\u0431.&lt;extra&gt;&lt;\/extra&gt;'),                secondary_y = False)  fig.add_trace(go.Bar(x=df['quarter'], y=df['gross_profit_margin'],                       name='\u0412\u0430\u043b\u043e\u0432\u0430\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c',                       customdata = df['gross_profit_margin_mln'], #\u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441 \u0432\u0430\u043b. \u043f\u0440\u0438\u0431\u044b\u043b\u044c\u044e \u0432 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u0445 \u0440\u0443\u0431.                      hovertemplate='&lt;b&gt;%{x}&lt;\/b&gt;&lt;br&gt;' + '\u0412\u0430\u043b.\u043f\u0440\u0438\u0431\u044b\u043b\u044c: %{customdata:.2f} \u043c\u043b\u043d.\u0440\u0443\u0431.&lt;extra&gt;&lt;\/extra&gt;'),                secondary_y = False)  gross_margin_line = [int(num * 4.8) for num in df['gross_margin'].tolist()] fig.add_trace(go.Scatter(x=df['quarter'], y=gross_margin_line,                           name='\u0420\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c',                           #\u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0442\u043e, \u043a\u0430\u043a\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430\u0445                          customdata=df['gross_margin'],                           hovertemplate='&lt;b&gt;%{x}&lt;\/b&gt;&lt;br&gt;' + '\u041c\u0430\u0440\u0436\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c: %{customdata:.2f}%&lt;extra&gt;&lt;\/extra&gt;',                          mode='lines',                           fill='tozeroy'),                secondary_y = True)  fig.update_layout(title=(f'\u0421\u043a\u043e\u043b\u044c\u043a\u043e SKU \u043c\u044b \u043f\u0440\u043e\u0434\u0430\u0435\u043c \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c'),                    title_x=0.1, title_y=0.95,                   height = 350, width = 650,                    xaxis=dict(tickfont_size=10),                   yaxis=dict(tickfont_size=10,                               side='left', range=[0, df['revenue'].max() + 20000000]),                   yaxis2=dict(showticklabels=False, side='right',                               showgrid=False, range=[df['SKU_count'].min()-20, df['SKU_count'].max() + 20]),                   legend_font=dict(size=11),                    legend=dict(orientation=\"h\", yanchor=\"bottom\", y=0.9, xanchor=\"left\", x=0.02, bgcolor='rgba(255, 255, 255, 0)'),                   barmode='overlay',                   margin = dict(t=50, l=50, r=10, b=10)) fig.show()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b2d\/4b6\/796\/b2d4b6796163191abd07ba81d1477985.png\" width=\"988\" height=\"544\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b2d\/4b6\/796\/b2d4b6796163191abd07ba81d1477985.png\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<h4>\u041a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u0438\u0434\u0430 \u043c\u043e\u0435\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u0438\u0431\u043b\u0438\u043b\u0438\u0437\u0438\u0442\u044c \u0435\u0435 \u043a \u0440\u0435\u0444\u0435\u0440\u0435\u043d\u0441\u0443. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u044f \u043d\u0435 \u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u0441\u0435\u0431\u0435 \u0446\u0435\u043b\u044c\u044e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0440\u0435\u0444\u0435\u0440\u0435\u043d\u0441 (\u0445\u043e\u0442\u044f \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442: \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u0441\u0435-\u0436\u0435 \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443.<br \/>\u041c\u043d\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043b\u0430\u0432\u043d\u044b\u043c\u0438 \u043b\u0438\u043d\u0438\u0438 Line Chart \u0438 Area Chart, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043b\u044f \u043d\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0446\u0432\u0435\u0442\u043e\u0432\u0443\u044e \u0441\u0445\u0435\u043c\u0443.<br \/>\u041f\u043e\u0435\u0445\u0430\u043b\u0438!<\/p>\n<div class=\"floating-image\">\n<figure class=\"float bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/238\/2cc\/285\/2382cc285d74b27667bcac470597d833.jpg\" alt=\"\u0420\u0435\u0444\u0435\u0440\u0435\u043d\u0441 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u0441\u0445\u0435\u043c\u044b. \u041d\u0430\u0439\u0434\u0435\u043d\u043e \u0432 Pinterest\" title=\"\u0420\u0435\u0444\u0435\u0440\u0435\u043d\u0441 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u0441\u0445\u0435\u043c\u044b. \u041d\u0430\u0439\u0434\u0435\u043d\u043e \u0432 Pinterest\" width=\"736\" height=\"1104\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/238\/2cc\/285\/2382cc285d74b27667bcac470597d833.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0444\u0435\u0440\u0435\u043d\u0441 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u0441\u0445\u0435\u043c\u044b. \u041d\u0430\u0439\u0434\u0435\u043d\u043e \u0432 Pinterest<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u0441\u0445\u0435\u043c\u044b. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0438\u0434\u0435\u044e \u0438\u0437 Pinterest. <br \/>\u0414\u0430-\u0434\u0430))) \u0426\u0432\u0435\u0442\u043e\u0432\u0430\u044f \u043f\u0430\u043b\u0438\u0442\u0440\u0430 \u043e\u0447\u0435\u043d\u044c \u0434\u0435\u0432\u0447\u0430\u0447\u044c\u044f. \u041d\u043e \u044f \u0434\u0435\u0432\u043e\u0447\u043a\u0430, \u0430 \u0437\u0430 \u043e\u043a\u043d\u043e\u043c \u0432\u0435\u0441\u043d\u0430. <br \/>\u042f \u0437\u0430\u0434\u0430\u043c \u0446\u0432\u0435\u0442\u043e\u0432\u0443\u044e \u043f\u0430\u043b\u0438\u0442\u0440\u0443 \u0438\u0437 \u0448\u0435\u0441\u0442\u0438 \u0446\u0432\u0435\u0442\u043e\u0432 \u043f\u0443\u0442\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0433\u0434\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 Hex Color Code \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043c\u043d\u0435 \u0446\u0432\u0435\u0442\u0430. <\/p>\n<p>\u0427\u0442\u043e \u044f \u0441\u0434\u0435\u043b\u0430\u044e:<br \/>&#8212; \u043d\u0430\u0441\u0442\u0440\u043e\u044e \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435\u00a0\u043b\u0438\u043d\u0438\u0439 Line Chart \u0438 Area Chart, \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u044e \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0432\u0438\u0437\u0443\u0430\u043b \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u043e\u0434\u00a0\u0433\u0440\u0430\u0444\u0438\u043a\u043e\u043c Area Chart;<br \/>&#8212; \u0437\u0430\u0434\u0430\u043c \u0446\u0432\u0435\u0442\u0430 \u0434\u043b\u044f\u00a0\u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u00a0\u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f\u00a0\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u0448\u0440\u0438\u0444\u0442\u043e\u0432 \u043b\u0435\u0433\u0435\u043d\u0434\u044b \u0438 \u0442\u0438\u043a\u043e\u0432, \u0444\u043e\u043d\u0430;<br \/>&#8212; \u0437\u0430\u0434\u0430\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0435\u0442\u043a\u0438 \u043e\u0441\u0435\u0439 Y;<br \/>&#8212; \u043d\u0430\u0441\u0442\u0440\u043e\u044e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c\u0438 Bar Chart.<\/p>\n<\/div>\n<pre><code class=\"python\">fig = make_subplots(specs=[[{'secondary_y': True}]])  #\u0417\u0430\u0434\u0430\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e Hex Color Code \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u0432. dark_1 = '#c46d86' light_1 = '#eab0bb' light_2 = '#f5f5f5' dark_2 = '#6c6c6c' dark_3 = '#26601c' light_3 = '#31a422' fig.add_trace(go.Scatter(x=df['quarter'], y=df['SKU_count'],                           name='\u041a\u043e\u043b-\u0432\u043e SKU',                           mode='lines+markers+text',                           customdata = df['SKU_count'],                           hovertemplate='&lt;b&gt;%{x}&lt;\/b&gt;&lt;br&gt;' + '\u041a\u043e\u043b-\u0432\u043e SKU: %{customdata:.0f}&lt;extra&gt;&lt;\/extra&gt;',                          marker_color=light_3, #\u0437\u0430\u0434\u0430\u044e \u0446\u0432\u0435\u0442 \u043b\u0438\u043d\u0438\u0438                          line=dict(shape='spline', #\u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043b\u0438\u043d\u0438\u0438                                    smoothing=0.9, # \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f)                                    color = light_3), #\u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e \u0446\u0432\u0435\u0442 \u043c\u0430\u0440\u043a\u0435\u0440\u0430                          text = df['SKU_count'].tolist(), #\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f                          textposition='top center', #\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439                          textfont=dict(size=9, color=dark_3, weight='bold')),#\u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430, \u0435\u0433\u043e \u0436\u0438\u0440\u043d\u043e\u0441\u0442\u044c \u0438 \u0446\u0432\u0435\u0442                secondary_y = True)  fig.add_trace(go.Bar(x=df['quarter'], y=df['revenue'],                       name='\u0412\u044b\u0440\u0443\u0447\u043a\u0430',                       customdata = df['revenue_mln'],                       hovertemplate='&lt;b&gt;%{x}&lt;\/b&gt;&lt;br&gt;' + '\u0412\u044b\u0440\u0443\u0447\u043a\u0430: %{customdata:.2f} \u043c\u043b\u043d.\u0440\u0443\u0431.&lt;extra&gt;&lt;\/extra&gt;',                       marker_color=light_1), #\u0446\u0432\u0435\u0442 \u0441\u0442\u043e\u043b\u0431\u0446\u0430               secondary_y = False)  fig.add_trace(go.Bar(x=df['quarter'], y=df['gross_profit_margin'],                       name='\u0412\u0430\u043b\u043e\u0432\u0430\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c',                       customdata = df['gross_profit_margin_mln'],                       hovertemplate='&lt;b&gt;%{x}&lt;\/b&gt;&lt;br&gt;' + '\u0412\u0430\u043b.\u043f\u0440\u0438\u0431\u044b\u043b\u044c: %{customdata:.2f} \u043c\u043b\u043d.\u0440\u0443\u0431.&lt;extra&gt;&lt;\/extra&gt;',                       marker_color=dark_1),  #\u0446\u0432\u0435\u0442 \u0441\u0442\u043e\u043b\u0431\u0446\u0430               secondary_y = False)  gross_margin_line = [int(num * 4.8) for num in df['gross_margin'].tolist()] fig.add_trace(go.Scatter(x=df['quarter'], y=gross_margin_line,                           name='\u0420\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c',                           marker_color=dark_3, #\u0446\u0432\u0435\u0442 \u043b\u0438\u043d\u0438\u0438                           customdata=df['gross_margin'],                           hovertemplate='&lt;b&gt;%{x}&lt;\/b&gt;&lt;br&gt;' + '\u041c\u0430\u0440\u0436\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c: %{customdata:.2f}%&lt;extra&gt;&lt;\/extra&gt;',                          mode='lines+text+markers',                           fill='tozeroy',                          text=[f\"{val:.0f}%\" for val in df['gross_margin']], #\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043e \u0437\u043d\u0430\u043a\u043e\u043c '%'                          textposition='top center', #\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439                          textfont=dict(size=9, color=dark_3, weight='bold'),                          #\u044d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u043a\u0443 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u043e\u0434 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u043c                          fillpattern=dict(shape='\/',  # \u0442\u0438\u043f \u0448\u0442\u0440\u0438\u0445\u043e\u0432\u043a\u0438                                           fgcolor=dark_3,  # \u0446\u0432\u0435\u0442 \u043b\u0438\u043d\u0438\u0439 \u0448\u0442\u0440\u0438\u0445\u043e\u0432\u043a\u0438                                           bgcolor=\"rgba(255, 255, 255, 0)\"),  # \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430, \u044f \u0437\u0430\u0434\u0430\u044e \u0435\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c)                          line=dict(shape='spline', smoothing=0.6)), #\u044d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u0441\u0433\u0440\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043b\u0438\u043d\u0438\u0439                secondary_y = True) #\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0435\u0442\u043a\u0438: \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e \u0446\u0432\u0435\u0442 \u0438 \u0442\u043e\u043b\u0449\u0438\u043d\u0443 \u043b\u0438\u043d\u0438\u0439, \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0443\u0431\u0438\u0440\u0430\u044e \u0441\u0430\u043c\u0443 \u043e\u0441\u044c X: \u043e\u043d\u0430 \u0435\u0441\u0442\u044c, \u043d\u043e \u0435\u0435 \u043d\u0435 \u0432\u0438\u0434\u043d\u043e \u0437\u0430 \u0441\u0447\u0435\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0435\u0435 \u0446\u0432\u0435\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0444\u043e\u043d\u043e\u043c fig.update_yaxes(showgrid=True, gridwidth=1, gridcolor=dark_2, zerolinecolor=light_2)  fig.update_layout(title=(f'\u0421\u043a\u043e\u043b\u044c\u043a\u043e SKU \u043c\u044b \u043f\u0440\u043e\u0434\u0430\u0435\u043c \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c'),                    title_font=dict(size=16, color=dark_3, weight='bold'), #\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0448\u0440\u0438\u0444\u0442\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430                   title_x=0.1, title_y=0.95, height = 350, width = 650,                    xaxis=dict(tickfont_size=10, tickfont_color=dark_2), #\u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e \u0446\u0432\u0435\u0442\u0430 \u0442\u0438\u043a\u043e\u0432                   yaxis=dict(tickfont_size=10, tickfont_color=dark_2, #\u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e \u0446\u0432\u0435\u0442\u0430 \u0442\u0438\u043a\u043e\u0432                              side='left', range=[0, df['revenue'].max() + 20000000]),                   yaxis2=dict(showticklabels=False, side='right',                               showgrid=False, range=[df['SKU_count'].min()-20, df['SKU_count'].max() + 20]),                   legend_font=dict(size=11, color = dark_2), #\u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e \u0446\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u043b\u0435\u0433\u0435\u043d\u0434\u044b                   legend=dict(orientation=\"h\", yanchor=\"bottom\", y=0.9, xanchor=\"left\", x=0.02, bgcolor='rgba(255, 255, 255, 0)'),                   barmode='overlay',                   margin = dict(t=50, l=50, r=10, b=10),                   bargroupgap=0.1, #\u0434\u043e\u0431\u0430\u0432\u043b\u044e \"\u0432\u043e\u0437\u0434\u0443\u0445\" \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c\u0438                   paper_bgcolor = light_2, plot_bgcolor=light_2) #\u0437\u0430\u0434\u0430\u043c \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 fig.show()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6ab\/a84\/49c\/6aba8449cef19888c30b3d155cea4100.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430\" width=\"650\" height=\"350\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6ab\/a84\/49c\/6aba8449cef19888c30b3d155cea4100.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e!  \u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043c\u043d\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0447\u0430\u0440\u0442\u043e\u0432 &#171;\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e SKU&#187; \u0438 &#171;\u0420\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c&#187;: \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u0421 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430 Plotly \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0443\u0436\u0435 \u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0431\u044b \u0432\u043d\u0435\u0441\u043b\u0430 \u0442\u0430\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"python\">#\u0443\u0434\u0430\u043b\u0438\u0442\u044c text=[f\"{val:.0f}%\" for val in df['gross_margin']],  textposition='top center', #\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 textfont=dict(size=9, color=dark_3, weight='bold') #\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c mode='lines+text+markers', \u043d\u0430 mode='lines'<\/code><\/pre>\n<p>\u0418 \u043f\u0440\u0438\u043d\u044f\u043b\u0430 \u043a\u0430\u043a \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d14\/e54\/c58\/d14e54c5851b1b6d8f9eec7a186555ed.png\" alt=\"\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\" title=\"\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\" width=\"650\" height=\"350\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d14\/e54\/c58\/d14e54c5851b1b6d8f9eec7a186555ed.png\"\/><\/p>\n<div><figcaption>\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u0412\u0430\u0448\u0435\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043b\u0443\u0447\u0448\u0435: \u0441 \u043e\u0431\u0438\u043b\u0438\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442?<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/898970\/\"> https:\/\/habr.com\/ru\/articles\/898970\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0411\u0443\u0434\u0443\u0447\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0446\u0435\u0439 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0437\u043c\u0430 \u0432\u043e \u0432\u0441\u0435\u043c, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u044f \u0438\u0437\u0431\u0435\u0433\u0430\u044e \u043f\u043e\u043f\u044b\u0442\u043e\u043a &#171;\u0432\u043f\u0438\u0445\u043d\u0443\u0442\u044c \u043d\u0435\u0432\u043f\u0438\u0445\u0443\u0435\u043c\u043e\u0435&#187; \u0432 \u043e\u0434\u043d\u0443 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u041b\u0443\u0447\u0448\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432. \u041d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0432\u0438\u0437\u0443\u0430\u043b \u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438. <\/p>\n<p>\u042d\u0442\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445. \u041d\u043e \u0437\u0430\u0438\u043d\u0442\u0440\u0438\u0433\u043e\u0432\u0430\u043b \u043c\u0435\u043d\u044f \u0434\u0430\u0436\u0435 \u043d\u0435 \u0441\u0430\u043c \u0434\u0438\u0437\u0430\u0439\u043d, \u0430 \u0442\u0435\u043a\u0441\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0438\u0437 \u0422\u0413\u041a Power BI Design: &#171;\u0422\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435. \u041a\u0430\u043a? \u041d\u0435\u043f\u0440\u043e\u0441\u0442\u043e&#187;. \u0418 \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b\u0430: \u0430 \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 python  \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c plotly?<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0435\u0444\u0435\u0440\u0435\u043d\u0441, \u0432\u0437\u044f\u0442\u043e \u0438\u0437 \u0422\u0413\u041a Power BI Design<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0424\u0438\u043d\u0430\u043b \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0439, \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043d\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430) \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043a\u043e\u043d\u0446\u0435<\/p>\n<figure class=\"full-width\"><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"python\">import numpy as np revenue_fact = np.random.randint(50000000, 100000000, size=12).tolist() #\u0432\u044b\u0440\u0443\u0447\u043a\u0430 SKU_count = np.random.randint(80, 150, size=12).tolist() #\u043a\u043e\u043b-\u0432\u043e SKU quarters_1 = pd.date_range('2022Q1', periods=12, freq='Q') quarters = quarters_1.to_period('Q').astype(str) #\u043f\u0435\u0440\u0438\u043e\u0434\u044b - \u043a\u0432\u0430\u0440\u0442\u0430\u043b\u044b gross_margin = np.random.randint(15, 22, size=12).tolist() #\u0432\u0430\u043b\u043e\u0432\u0430\u044f \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c #\u0441\u043e\u0437\u0434\u0430\u044e \u0444\u0440\u0435\u0439\u043c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b df = pd.DataFrame({        'quarter': quarters,     'revenue': revenue_fact,     'SKU_count': SKU_count,      'percent': persent,      'gross_margin': gross_margin}) df['revenue_mln'] = round(df['revenue']\/1000000,2) df['gross_profit_margin'] = round(df['revenue'] * (df['gross_margin']\/100),2) df['gross_profit_margin_mln'] = round(df['gross_profit_margin']\/1000000,2)<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044e, \u0437\u0430\u0447\u0435\u043c \u044f \u0441\u043e\u0437\u0434\u0430\u044e \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e \u0432\u044b\u0440\u0443\u0447\u043a\u0435 \u0438 \u0432\u0430\u043b\u043e\u0432\u043e\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0432 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u0445 \u0440\u0443\u0431\u043b\u0435\u0439.<\/p>\n<h3>\u041e\u0431\u0449\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430<\/h3>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u0434\u0432\u0443\u043c\u044f \u043e\u0441\u044f\u043c\u0438 Y: \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 (\u043b\u0435\u0432\u0430\u044f) \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f\/\u0432\u0442\u043e\u0440\u0438\u0447\u043d\u0430\u044f (\u043f\u0440\u0430\u0432\u0430\u044f), \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0438 \u0431\u0443\u0434\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u043e\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438. <\/p>\n<pre><code class=\"python\"># \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0441 \u043f\u043e\u0434\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0435 \u043e\u0441\u0438 Y fig = make_subplots(specs=[[{'secondary_y': True}]]) # \u0412 \u043e\u0441\u044c X \u043a\u043b\u0430\u0434\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043f\u0435\u0440\u0432\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a: \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0434\u0430\u043d\u043d\u044b\u0445 SCU # secondary_y = True \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u043a\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043e\u0441\u0438 Y fig.add_trace(go.Scatter(x=df['quarter'],                           y=df['SKU_count'],                           name='\u041a\u043e\u043b-\u0432\u043e SKU',                           mode='lines+markers+text'),               secondary_y = True)  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0432\u0442\u043e\u0440\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a: \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0440\u0443\u0447\u043a\u0438 fig.add_trace(go.Bar(x=df['quarter'], y=df['revenue'],                       name='\u0412\u044b\u0440\u0443\u0447\u043a\u0430'),                secondary_y = False)  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0442\u0440\u0435\u0442\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a: \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0430\u043b\u043e\u0432\u043e\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 fig.add_trace(go.Bar(x=df['quarter'], y=df['gross_profit_margin'],                       name='\u0412\u0430\u043b\u043e\u0432\u0430\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c'),                secondary_y = False)  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a: \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0430\u043b\u043e\u0432\u043e\u0439 \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 fig.add_trace(go.Scatter(x=df['quarter'], y=df['gross_margin'],                           name='\u0420\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c',                           mode='lines',                           fill='tozeroy'),                secondary_y = True)  fig.update_layout(title=(f'\u0421\u043a\u043e\u043b\u044c\u043a\u043e SKU \u043c\u044b \u043f\u0440\u043e\u0434\u0430\u0435\u043c \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c'), #title_x=0.1, title_y=0.95,                   #title_font=dict(size=16, color=dark_3, weight='bold'),                    height = 350, width = 650), fig.show()<\/code><\/pre>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043d\u0435\u043a\u0430\u0437\u0438\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f: \u043c\u0435\u0436\u0434\u0443 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438, \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e SKU \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0430\u043b\u043e\u0432\u043e\u0439 \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0436 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u0441\u0435\u0442\u043a\u0438 \u043e\u0431\u0435\u0438\u0445 \u043e\u0441\u0435\u0439 Y \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043d\u0435\u0440\u0430\u0437\u0431\u0435\u0440\u0438\u0445\u0443 \u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c. \u0418 \u043e\u0445 \u0443\u0436 \u044d\u0442\u0438 \u0446\u0432\u0435\u0442\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e&#8230; \u041c\u043e\u0436\u043d\u043e \u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438: \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043b\u043e\u0445\u0430 \u0438 \u0442\u043e\u0447\u043a\u0430 \u0438  \u044d\u0442\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e<\/p>\n<h2>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435<\/h2>\n<p>\u042f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043b\u0435\u0433\u0435\u043d\u0434\u0443 \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e, \u043a\u0430\u043a \u043d\u0430 \u043c\u043e\u0435\u043c \u0440\u0435\u0444\u0435\u0440\u0435\u043d\u0441\u0435, \u0437\u0430\u0434\u0430\u043c \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432, \u043e\u0442\u043a\u043b\u044e\u0447\u0443 \u0441\u0435\u0442\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u043e\u0439 \u043e\u0441\u0438 Y. \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"python\">fig = make_subplots(specs=[[{'secondary_y': True}]])  fig.add_trace(go.Scatter(x=df['quarter'],                           y=df['SKU_count'],                           name='\u041a\u043e\u043b-\u0432\u043e SKU',                           mode='lines+markers+text'),               secondary_y = True)  fig.add_trace(go.Bar(x=df['quarter'], y=df['revenue'],                       name='\u0412\u044b\u0440\u0443\u0447\u043a\u0430'),                secondary_y = False)  fig.add_trace(go.Bar(x=df['quarter'], y=df['gross_profit_margin'],                       name='\u0412\u0430\u043b\u043e\u0432\u0430\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c'),                secondary_y = False)  fig.add_trace(go.Scatter(x=df['quarter'], y=df['gross_margin'],                           name='\u0420\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c',                           mode='lines',                           fill='tozeroy'),                secondary_y = True)  fig.update_layout(title=(f'\u0421\u043a\u043e\u043b\u044c\u043a\u043e SKU \u043c\u044b \u043f\u0440\u043e\u0434\u0430\u0435\u043c \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c'),                    title_x=0.1, title_y=0.95, #\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430                   height = 350, width = 650,                    yaxis2=dict(showticklabels=False, showgrid=False), #\u043e\u0442\u043a\u043b\u044e\u0447\u0430\u044e \u0441\u0435\u0442\u043a\u0443 \u0438 \u0442\u0438\u043a\u0438 \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0439 (\u043f\u0440\u0430\u0432\u043e\u0439) \u043e\u0441\u0438 Y                    legend_font=dict(size=11), # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e \u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0434\u043b\u044f \u043b\u0435\u0433\u0435\u043d\u0434\u044b, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043c\u043e\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0440\u0438\u044f \u0432 \u043e\u0434\u0438\u043d \u0440\u044f\u0434                    #\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043b\u0435\u0433\u0435\u043d\u0434\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u0444\u043e\u043d \u0434\u043b\u044f \u043b\u0435\u0433\u0435\u043d\u0434\u0430                   legend=dict(orientation=\"h\", yanchor=\"bottom\", y=0.9, xanchor=\"left\", x=0.02, bgcolor='rgba(255, 255, 255, 0)'),                   #\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e \u0440\u0435\u0436\u0438\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432: \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430                                     barmode='overlay',                   # \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432 \u0434\u043b\u044f \u0444\u0438\u0433y\u0440\u044b                   margin = dict(t=50, l=50, r=10, b=10)) fig.show()<\/code><\/pre>\n<p>\u0410 \u044d\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e \u043c\u043e\u0435\u043c\u0443 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0443\u0436\u0435 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u0435\u0435. \u041d\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0435\u0449\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432: \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430 \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u043e\u0441\u0442\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443.<br \/>\u042f \u0431\u0443\u0434\u0443 \u0440\u0435\u0448\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0443\u0442\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043e\u0432 \u043e\u0441\u0435\u0439 Y. <br \/>\u0427\u0442\u043e\u0431\u044b \u0441\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0432\u043d\u0438\u0437 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043b\u0435\u0433\u0435\u043d\u0434\u044b \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a, \u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0443 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u043e\u0441\u0438 Y. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044e \u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0442\u0438\u043a\u043e\u0432 \u043f\u043e \u043e\u0441\u044f\u043c Y \u0438 X. <br \/>\u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u043c\u0435\u0442\u043e\u0434 update_layout.<\/p>\n<pre><code class=\"python\">#\u043c\u0435\u043d\u044f\u044e \u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0442\u0438\u043a\u043e\u0432, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \"range\" \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u043e\u0441\u0435\u0439 xaxis=dict(tickfont_size=10), axis=dict(tickfont_size=10,            side='left', range=[0, df['revenue'].max() + 20000000]), yaxis2=dict(showticklabels=False, side='right', showgrid=False,              range=[df['SKU_count'].min()-20, df['SKU_count'].max() + 20])<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u0434\u0430, \u0433\u0440\u0430\u0444\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/figcaption><\/div>\n<\/figure>\n<h3>\u0423\u0443\u0443\u043f\u043f\u043f\u043f\u0441&#8230; \u0410 \u0433\u0434\u0435 Area Chart?<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0433\u0440\u0430\u0444\u0438\u043a, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<br \/> \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u043e\u0439 \u043e\u0441\u0438 Y \u0441\u0442\u0430\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432 \u043c\u043e\u0435\u043c \u0440\u044f\u0434\u0443.<br \/>\u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u0432\u043e\u0434 \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043c\u043e\u044e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043b\u0443\u0447\u0448\u0435.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u044f \u0438\u0437\u043c\u0435\u043d\u044e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e Area Chart (\u0413\u0440\u0430\u0444\u0438\u043a \u043f\u043b\u043e\u0449\u0430\u0434\u0435\u0439), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0432 \u043e\u0441\u044c Y \u044f \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 df[&#8216;gross_margin&#8217;]. \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0432 ~6 \u0440\u0430\u0437 \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430 df[&#8216;SKU_count&#8217;]. \u042f \u0441\u043e\u0437\u0434\u0430\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439, \u043f\u0443\u0442\u0435\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 n.<\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"python\">fig = make_subplots(specs=[[{'secondary_y': True}]])  fig.add_trace(go.Scatter(x=df['quarter'],                           y=df['SKU_count'],                           name='\u041a\u043e\u043b-\u0432\u043e SKU',                           mode='lines+markers+text'),               secondary_y = True)  fig.add_trace(go.Bar(x=df['quarter'], y=df['revenue'],                       name='\u0412\u044b\u0440\u0443\u0447\u043a\u0430'),                secondary_y = False)  fig.add_trace(go.Bar(x=df['quarter'], y=df['gross_profit_margin'],                       name='\u0412\u0430\u043b\u043e\u0432\u0430\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c'),                secondary_y = False)  #\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0440\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 #\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 n = 4.8 \u0432\u044b\u0431\u0440\u0430\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u043e\u0434\u0431\u043e\u0440\u043e\u043c;  #\u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 gross_margin_line = [int(num * 4.8) for num in df['gross_margin'].tolist()] fig.add_trace(go.Scatter(x=df['quarter'], y=gross_margin_line, #\u041a\u043b\u0430\u0434\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a gross_margin_line \u0432 Y                          name='\u0420\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c',                           mode='lines',                           fill='tozeroy'),                secondary_y = True)  fig.update_layout(title=(f'\u0421\u043a\u043e\u043b\u044c\u043a\u043e SKU \u043c\u044b \u043f\u0440\u043e\u0434\u0430\u0435\u043c \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c'),                    title_x=0.1, title_y=0.95,                   height = 350, width = 650,                    xaxis=dict(tickfont_size=10),                   yaxis=dict(tickfont_size=10,                               side='left', range=[0, df['revenue'].max() + 20000000]),                   yaxis2=dict(showticklabels=False, side='right',                               showgrid=False, range=[df['SKU_count'].min()-20, df['SKU_count'].max() + 20]),                   legend_font=dict(size=11),                    legend=dict(orientation=\"h\", yanchor=\"bottom\", y=0.9, xanchor=\"left\", x=0.02, bgcolor='rgba(255, 255, 255, 0)'),                   barmode='overlay',                   margin = dict(t=50, l=50, r=10, b=10)) fig.show()<\/code><\/pre>\n<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430; \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0441\u0442\u0430\u043b \u044f\u0432\u043d\u043e \u043b\u0443\u0447\u0448\u0435. \u041d\u043e \u0432\u043e\u0442 \u0447\u0442\u043e \u044f \u0438\u043c\u0435\u044e \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435: \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u043e \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430\u0445 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0430 \u043d\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u043d\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0434\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 Area Chart, \u044f \u0441\u0434\u0435\u043b\u0430\u044e \u044d\u0442\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0435\u0434\u0438\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0443\u0442 \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e \u0432\u044b\u0440\u0443\u0447\u043a\u0435 \u0438 \u0432\u0430\u043b\u043e\u0432\u043e\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0432 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u0445 \u0440\u0443\u0431\u043b\u0435\u0439. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0443 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 customdata \u0438 hovertemplate.<\/p>\n<pre><code class=\"python\">fig = make_subplots(specs=[[{'secondary_y': True}]])  fig.add_trace(go.Scatter(x=df['quarter'], y=df['SKU_count'],<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-455220","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/455220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=455220"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/455220\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=455220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=455220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=455220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}