{"id":299176,"date":"2020-02-24T21:00:08","date_gmt":"2020-02-24T21:00:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=299176"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=299176","title":{"rendered":"\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0438\u0433\u0440\u0435 World of Tanks"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/489762\/\">\n<p>\u0412 \u044d\u0442\u043e\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u043a\u0430\u043a \u0434\u0430\u043b\u044c\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0441\u043f\u0430\u0440\u0441\u0438\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u043e\u0432 \u043a\u043b\u0430\u043d\u043e\u0432 \u0438\u0437 \u0438\u0433\u0440\u044b <a href=\"https:\/\/ru.wargaming.net\/ru\/games\/wot\" rel=\"nofollow\">World of Tanks<\/a> \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b, \u043a\u0430\u043a \u0440\u0435\u0439\u0442\u0438\u043d\u0433 \u043a\u043b\u0430\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/do\/rr\/-z\/dorr-zhqlqd5dcgf9-xdzatyz_y.png\"><\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h3 id=\"1-parsing-dannyh\">1. \u041f\u0430\u0440\u0441\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>  <\/p>\n<pre><code class=\"python\">import numpy as np import pandas as pd from scrapy.selector import Selector import matplotlib.pyplot as plt import seaborn as sns %matplotlib inline  sns.set(rc={'figure.figsize':(20, 5)})<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 <a href=\"https:\/\/ru.wargaming.net\/clans\/wot\/leaderboards\/#ratingssearch&amp;offset=0&amp;limit=25&amp;order=-cr\" rel=\"nofollow\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443<\/a> \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 javascript \u0432\u0438\u0434\u0436\u0435\u0442\u044b, \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 <a href=\"https:\/\/scrapy.org\/\" rel=\"nofollow\">scrapy<\/a> \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c html \u0431\u0435\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 (\u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.selenium.dev\/\" rel=\"nofollow\">selenium<\/a>) \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b <code>scrapy Selector<\/code> \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">#https:\/\/ru.wargaming.net\/clans\/wot\/leaderboards\/#ratingssearch&amp;offset=0&amp;limit=25&amp;order=-cr with open('\u0420\u0435\u0439\u0442\u0438\u043d\u0433\u0438 _ Wargaming.net.html', 'r') as f:     html_text = f.read()  selector = Selector(text=html_text)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 <code>xpath<\/code> \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0430 <a href=\"https:\/\/www.youtube.com\/results?search_query=xpath\" rel=\"nofollow\">youtube.com<\/a>, \u0431\u043b\u0430\u0433\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435 \u043c\u043d\u043e\u0433\u043e. \u0412 \u043a\u043e\u0434\u0435 \u043d\u0438\u0436\u0435 \u044f \u0441\u043f\u0430\u0440\u0441\u0438\u043b \u043f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0442.\u043a. \u043e\u043d\u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443 (\u0441\u043c. <a href=\"https:\/\/ru.wargaming.net\/clans\/wot\/leaderboards\/#ratingssearch&amp;offset=0&amp;limit=25&amp;order=-cr\" rel=\"nofollow\">\u0441\u0430\u0439\u0442<\/a>), \u0434\u0430\u043b\u0435\u0435 \u044f \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u043b \u043a\u0430\u0436\u0434\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u043f\u0440\u0438\u0447\u0451\u043c \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0431\u044b\u043b\u043e \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 <code>text<\/code> \u0441 \u043a\u043e\u043d\u0446\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0440\u043e\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 (\u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430), \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u043e\u0433\u043e\u0442\u0438\u043f\u043e\u0432 \u0435\u0441\u0442\u044c \u0446\u0438\u0444\u0440\u0430, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0440\u043e\u0441\u0442, \u0443 \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0435\u0442. <\/p>\n<p>  <\/p>\n<pre><code class=\"python\">df = pd.DataFrame()  # \u043f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 + \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 table = selector.xpath('\/\/div[@class=&quot;js-widget-content&quot;]\/div[2]\/div[2]\/div') + selector.xpath('\/\/div[@class=&quot;js-widget-content&quot;]\/div[2]\/div[4]\/div')  for row in table:     text = row.xpath('*\/\/text()').extract()     clan = text[-10]      cr = int(text[-7].replace(' ',''))     wpr = int(text[-6].replace(' ',''))      abd = float(text[-5].replace(',', '.'))      avl_10 = int(text[-4])      fsh = int(text[-3].replace(' ',''))      wgm = int(text[-2].replace(' ',''))      wsh = int(text[-1].replace(' ',''))         df = df.append({'Clan' : clan,      # \u043a\u043b\u0430\u043d                     'CR' : cr,          # \u0440\u0435\u0439\u0442\u0438\u043d\u0433 \u043a\u043b\u0430\u043d\u0430                     'wPR' : wpr,        # \u0421\u0440\u0435\u0434\u043d\u0435\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0439\u0442\u0438\u043d\u0433 \u0438\u0433\u0440\u043e\u043a\u043e\u0432 \u043f\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0438\u0433\u0440\u043e\u043a\u043e\u0432 \u0432 \u043a\u043b\u0430\u043d\u0435 (100)                     'aB_D' : abd,       # \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u043e\u0451\u0432 \u0432 \u0434\u0435\u043d\u044c \u0432\u043e \u0432\u0441\u0435\u0445 \u0440\u0435\u0436\u0438\u043c\u0430\u0445 \u043d\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430                     'aVL10' : avl_10,   # \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0435\u0445\u043d\u0438\u043a\u0438, \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0432\u0448\u0435\u0439 \u0432 \u0431\u043e\u044e, \u0432 \u043b\u044e\u0431\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430                     'fSH' : fsh,        # \u0421\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430 \u0423\u043a\u0440\u0435\u043f\u0440\u0430\u0439\u043e\u043d\u0430                     'wGM' : wgm,        # \u0421\u0440\u0435\u0434\u043d\u0435\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0439\u0442\u0438\u043d\u0433 \u042d\u043b\u043e \u043d\u0430 \u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0435                     'wSH' : wsh},       # \u0421\u0440\u0435\u0434\u043d\u0435\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0439 \u0420\u0435\u0439\u0442\u0438\u043d\u0433 \u042d\u043b\u043e \u0432 \u0423\u043a\u0440\u0435\u043f\u0440\u0430\u0439\u043e\u043d\u0435                     ignore_index=True)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b \u0432 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0435 <code>df<\/code>, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0441\u0442\u0440\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0430 <a href=\"https:\/\/ru.wargaming.net\/clans\/wot\/leaderboards\/#ratingssearch&amp;offset=0&amp;limit=25&amp;order=-cr\" rel=\"nofollow\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/a> \u0438\u0445 \u0440\u043e\u0432\u043d\u043e 25, \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0435\u0440\u0432\u044b\u0445 5 \u0441\u0442\u0440\u043e\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">print('\u041a\u043e\u043b-\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435:', len(df))<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\u041a\u043e\u043b-\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435: 25<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">df.head()<\/code><\/pre>\n<table border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>CR<\/th>\n<th>Clan<\/th>\n<th>aB_D<\/th>\n<th>aVL10<\/th>\n<th>fSH<\/th>\n<th>wGM<\/th>\n<th>wPR<\/th>\n<th>wSH<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>0<\/th>\n<td>15486.0<\/td>\n<td>[CM-1]<\/td>\n<td>18.20<\/td>\n<td>34.0<\/td>\n<td>4083.0<\/td>\n<td>2253.0<\/td>\n<td>10325.0<\/td>\n<td>2294.0<\/td>\n<\/tr>\n<tr>\n<th>1<\/th>\n<td>15148.0<\/td>\n<td>[R-BOY]<\/td>\n<td>18.86<\/td>\n<td>37.0<\/td>\n<td>3745.0<\/td>\n<td>1943.0<\/td>\n<td>10267.0<\/td>\n<td>2066.0<\/td>\n<\/tr>\n<tr>\n<th>2<\/th>\n<td>15041.0<\/td>\n<td>[CYS]<\/td>\n<td>17.47<\/td>\n<td>32.0<\/td>\n<td>3649.0<\/td>\n<td>2300.0<\/td>\n<td>10251.0<\/td>\n<td>1857.0<\/td>\n<\/tr>\n<tr>\n<th>3<\/th>\n<td>14984.0<\/td>\n<td>[I-YAN]<\/td>\n<td>16.85<\/td>\n<td>28.0<\/td>\n<td>4080.0<\/td>\n<td>2468.0<\/td>\n<td>8992.0<\/td>\n<td>2290.0<\/td>\n<\/tr>\n<tr>\n<th>4<\/th>\n<td>14952.0<\/td>\n<td>[YETT1]<\/td>\n<td>17.41<\/td>\n<td>29.0<\/td>\n<td>4222.0<\/td>\n<td>2159.0<\/td>\n<td>8387.0<\/td>\n<td>2474.0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"2-analitika-dannyh\">2. \u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>  <\/p>\n<p>\u0418\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438, \u043b\u0438\u0431\u043e \u0441\u0438\u043d\u0442\u0435\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u043d\u0438\u0436\u0435 \u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b \u0433\u0440\u0430\u0444\u0438\u043a \u0440\u043e\u0441\u0442\u0430 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430 \u043a\u043b\u0430\u043d\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043c\u0435\u0441\u0442\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"python\">plt.xticks(rotation=45, ha=&quot;right&quot;) ax = sns.lineplot(x='Clan', y='CR', data=df, marker='o', color='r', sort=False) ax.set(xlabel='\u041a\u043b\u0430\u043d', ylabel='\u0420\u0435\u0439\u0442\u0438\u043d\u0433 \u043a\u043b\u0430\u043d\u0430') ax.set(xticks=df['Clan'].values);<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xz\/x1\/kc\/xzx1kc6h6khylxpw1jzfoo0h1wy.png\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u0434\u0432\u0443\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445 \u043d\u0438\u0436\u0435 \u044f \u043d\u0430\u043b\u043e\u0436\u0438\u043b \u0433\u0440\u0430\u0444\u0438\u043a \u0440\u043e\u0441\u0442\u0430 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430 \u043a\u043b\u0430\u043d\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438\u0445 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438. \u0417\u0434\u0435\u0441\u044c \u044f \u043f\u0440\u043e\u0431\u0443\u044e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441, \u0430 \u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u044b\u0441\u043a\u043e\u0433\u043e \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430?<\/p>\n<p>  <\/p>\n<pre><code class=\"python\"># \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430 def draw_corr(df, y1, y1_label, y2='CR', y2_label='\u0420\u0435\u0439\u0442\u0438\u043d\u0433 \u043a\u043b\u0430\u043d\u0430'):     fig, ax = plt.subplots()     plt.xticks(rotation=45, ha=&quot;right&quot;)     sns.lineplot(x='Clan', y=y1, data=df, marker='o', color='b', label=y1_label, sort=False)     ax.set(xlabel='\u041a\u043b\u0430\u043d', ylabel=y1_label)     plt.legend(bbox_to_anchor=(0.01, 0.95), loc='upper left')     ax2 = ax.twinx()     sns.lineplot(x='Clan', y=y2, data=df, marker='o', color='r', label=y2_label, sort=False)     ax2.set(ylabel=y2_label)     plt.legend(bbox_to_anchor=(0.01, 0.85), loc='upper left');   <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">draw_corr(df, 'wPR', '\u0421\u0440\u0435\u0434\u043d\u0435\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0439\u0442\u0438\u043d\u0433 \u0438\u0433\u0440\u043e\u043a\u043e\u0432')<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hf\/sr\/cj\/hfsrcjbnzray4h1vcrg5vc-ylsg.png\"><\/p>\n<p>  <\/p>\n<pre><code class=\"python\">draw_corr(df, 'aVL10', '\u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u0435\u0445\u043d\u0438\u043a\u0438')<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tk\/tj\/j_\/tktjj_a4s8yxry9f7-aqiecnbto.png\"><\/p>\n<p>  <\/p>\n<h3 id=\"3-vyvody\">3. \u0412\u044b\u0432\u043e\u0434\u044b<\/h3>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0432 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u043d\u0435\u0442. \u0418\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438, \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0436\u0443\u043d\u043e, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u044b \u0438 \u0442.\u0434.<\/p>\n<p>  <\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/cdies\/WoT\" rel=\"nofollow\">\u043a\u043e\u0434<\/a>.<\/p>\n<\/div>\n<p> \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\/post\/489762\/\"> https:\/\/habr.com\/ru\/post\/489762\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/489762\/\">\n<p>\u0412 \u044d\u0442\u043e\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u043a\u0430\u043a \u0434\u0430\u043b\u044c\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0441\u043f\u0430\u0440\u0441\u0438\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u043e\u0432 \u043a\u043b\u0430\u043d\u043e\u0432 \u0438\u0437 \u0438\u0433\u0440\u044b <a href=\"https:\/\/ru.wargaming.net\/ru\/games\/wot\" rel=\"nofollow\">World of Tanks<\/a> \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b, \u043a\u0430\u043a \u0440\u0435\u0439\u0442\u0438\u043d\u0433 \u043a\u043b\u0430\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/do\/rr\/-z\/dorr-zhqlqd5dcgf9-xdzatyz_y.png\"><\/p>\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-299176","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299176","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=299176"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299176\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}