{"id":177,"date":"2022-03-15T11:32:59","date_gmt":"2022-03-15T10:32:59","guid":{"rendered":"https:\/\/yb-isn.fr\/2021\/nsi\/carla\/?p=177"},"modified":"2022-05-03T11:57:47","modified_gmt":"2022-05-03T09:57:47","slug":"projet-vortex","status":"publish","type":"post","link":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/?p=177","title":{"rendered":"Projet vortex"},"content":{"rendered":"<p>On cherche a trouver des m\u00e9thodes pour classer toutes les parties jou\u00e9es dans des cases selon quel mode ont-ils pris, le nombre de joueurs, la date etc.<\/p>\n<p>pour faire cela il faudrait donc ouvrir le document, que le logiciel differencie les donn\u00e9es qu&rsquo;il recoit (la date differenci\u00e9e du nombre de joueurs par exemple)<\/p>\n<p>puis qu&rsquo;il arrive a cr\u00e9er de nouvelles colones pour trier les parties. d&rsquo;abord deux grandes colones pour apocalipse et une autre pour origine, une colone pour la date et l&rsquo;heure puis une colone de valeur 1 pour pouvoir les compter en parties par jour.<\/p>\n\n\n<p> <a href=\"https:\/\/colab.research.google.com\/drive\/1F85HKIH9SzVGADUjnZytJElTsYSYEDfg?usp=sharing\">h.google.com\/drive\/1F85HKIH9SzVGADUjnZytJElTsYSYEDfg?usp=sharing<\/a>  mon google colab<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"728\" height=\"491\" src=\"https:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-8.png\" alt=\"\" class=\"wp-image-181\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-8.png 728w, http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-8-300x202.png 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" \/><figcaption>on importe les fichiers<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"971\" height=\"759\" src=\"https:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-9.png\" alt=\"\" class=\"wp-image-182\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-9.png 971w, http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-9-300x235.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-9-768x600.png 768w\" sizes=\"(max-width: 971px) 100vw, 971px\" \/><figcaption>On a tri\u00e9 en deux tableaux apocalypse et origine<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"985\" height=\"593\" src=\"https:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-10.png\" alt=\"\" class=\"wp-image-184\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-10.png 985w, http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-10-300x181.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-10-768x462.png 768w\" sizes=\"(max-width: 985px) 100vw, 985px\" \/><figcaption>on filtre en triant par le stratDatetime<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"978\" height=\"740\" src=\"https:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-11.png\" alt=\"\" class=\"wp-image-189\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-11.png 978w, http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-11-300x227.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/03\/image-11-768x581.png 768w\" sizes=\"(max-width: 978px) 100vw, 978px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"963\" height=\"534\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/04\/image-1.png\" alt=\"\" class=\"wp-image-210\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/04\/image-1.png 963w, http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/04\/image-1-300x166.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/04\/image-1-768x426.png 768w\" sizes=\"(max-width: 963px) 100vw, 963px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"962\" height=\"695\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/04\/image-2.png\" alt=\"\" class=\"wp-image-211\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/04\/image-2.png 962w, http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/04\/image-2-300x217.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/04\/image-2-768x555.png 768w\" sizes=\"(max-width: 962px) 100vw, 962px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>import pandas as pd\r\n\r\nfrom google.colab import files\r\ndata_to_load = files.upload()\r\n\r\nmatches= pd.read_csv('BORDEAUX matches.csv',encoding = \"ISO-8859-1\")\r\n\r\ndef simplifie_date(val):\r\n  return str(val).split('T')&#091;0]\r\n\r\nindexNames = matches&#091;matches&#091;'startDatetime'].isnull()|matches&#091;'game'].isnull()|matches&#091;'__v'].isnull()].index\r\nmatches.drop(indexNames , inplace=True)\r\n\r\nmatches&#091;'date']=matches&#091;'startDatetime'].apply(simplifie_date)\r\nmatches&#091;'\u00e9quipe']=1\r\n\r\ngames = matches.groupby(\"game\")\r\norigine= games.get_group('5fc126fcabc9c6bb54078531')\r\napocalypse=games.get_group('604743157d0d2804c8abb4f8')\r\n\r\norigine_players=origine.groupby(&#091;'date'])&#091;'__v'].agg('sum').to_frame()\r\norigine_equipe=origine.groupby(&#091;'date'])&#091;'\u00e9quipe'].agg('sum').to_frame()\r\norigine_matches=pd.DataFrame()\r\norigine_players_equipe = pd.merge(origine_players,origine_equipe, on='date')\r\n\r\ndico={'__v':'players_origine','\u00e9quipe':'equipe_origine'}\r\norigine_players_equipe.rename(columns=dico,inplace=True)\r\n\r\napocalypse_players=apocalypse.groupby(&#091;'date'])&#091;'__v'].agg('sum').to_frame()\r\napocalypse_equipe=apocalypse.groupby(&#091;'date'])&#091;'\u00e9quipe'].agg('sum').to_frame()\r\napocalypse_matches=pd.DataFrame()\r\napocalypse_players_equipe = pd.merge(apocalypse_players,apocalypse_equipe, on='date')\r\napocalypse_players_equipe.rename(columns={'__v':'players_apocalypse','\u00e9quipe':'equipe_apocalypse'},inplace=True)\r\n\r\norigine_apocalypse_jour = pd.merge(origine_players_equipe,apocalypse_players_equipe, on='date')\r\n\r\norigine_apocalypse_jour&#091;'players']=origine_apocalypse_jour&#091;'players_origine']+origine_apocalypse_jour&#091;'players_apocalypse']\r\norigine_apocalypse_jour&#091;'equipes']=origine_apocalypse_jour&#091;'equipe_origine']+origine_apocalypse_jour&#091;'equipe_apocalypse']\r\n\r\norigine_apocalypse_jour.to_excel('1matches_origine_apocalypse_jour.xlsx',sheet_name='bordeaux')\r\n\r\nimport matplotlib.pyplot as plt\r\ngraphiques=&#091;'players_origine','players_apocalypse','players','equipe_origine','equipe_apocalypse','equipes']\r\nax=origine_apocalypse_jour.plot(y=graphiques,grid=True,kind=\"bar\",figsize=(20,10)) \r\nax.set_ylabel('nombre de joueurs par jour')\r\nax.set_xlabel('date')\r\nplt.show()<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"573\" src=\"https:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/05\/image-3-1024x573.png\" alt=\"\" class=\"wp-image-220\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/05\/image-3-1024x573.png 1024w, http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/05\/image-3-300x168.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/05\/image-3-768x429.png 768w, http:\/\/yb-isn.fr\/2021\/nsi\/carla\/wp-content\/uploads\/sites\/5\/2022\/05\/image-3.png 1039w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>On cherche a trouver des m\u00e9thodes pour classer toutes les parties jou\u00e9es dans des cases selon quel mode ont-ils pris, le nombre de joueurs, la date etc. pour faire cela il faudrait donc ouvrir le document, que le logiciel differencie les donn\u00e9es qu&rsquo;il recoit (la date differenci\u00e9e du nombre de joueurs par exemple) puis qu&rsquo;il&hellip; <a class=\"more-link\" href=\"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/?p=177\">Poursuivre la lecture <span class=\"screen-reader-text\">Projet vortex<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=\/wp\/v2\/posts\/177"}],"collection":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=177"}],"version-history":[{"count":10,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=\/wp\/v2\/posts\/177\/revisions"}],"predecessor-version":[{"id":221,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=\/wp\/v2\/posts\/177\/revisions\/221"}],"wp:attachment":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=177"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}