{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"<div style=\"font-size:28px;text-align:center\"><b>The change in Kaggle competitions in the past 2 years</div>\n\nCategory: Kaggle Competitions\n    \n**1.Introduction**\n\nKaggle is an important web community in data science and artificial intelligence. It was very early to focus on data science and train data scientists. The first Kaggle competition began at 2000-01-01 00:00:00. Artificial Intelligence things are hotting and swarming. And It has brought great change to data science and Kaggle’s community in the past 2 years. How did Kaggle’s community change in the past 2 years? A suitable and efficient procedure is important to find the change in Kaggle competitions.\n\n**2.Procedure**\n\nThis part will introduce the procedure to get ready-to-use data.\n> **2.1 Data Structure**\n\n> For the change of Kaggle competitions, the relative data of the date must be collected and processed. After analyzing Meta-Kaggle, Table 1 was obtained. In the screening process, tree categories are obvious and useful. First one includes Competitions.csv, Datasets.csv, Tags.csv. Tags.csv contains classification, which is important to find the relatives of AI. The second one is Submissions.csv, Users.csv, Teams.csv, which contribute to Kaggle competitions. The last has some diversity expansion, which consists of code, discussion, organization in communities.","metadata":{}},{"cell_type":"markdown","source":"<div style=\"text-align:center\"><b>Table 1. The data structure of Kaggle Competition</div>\n\n<figure>\n  <img src=\"https://storage.googleapis.com/kagglesdsdata/datasets/3360281/6084579/The%20data%20structure%20of%20Kaggle%20Competition.png?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=databundle-worker-v2%40kaggle-161607.iam.gserviceaccount.com%2F20230705%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20230705T153827Z&X-Goog-Expires=345600&X-Goog-SignedHeaders=host&X-Goog-Signature=757aa9f92e85343be65e86d235cae278bc09b3f6903be6c1543988dd4f734dcaf02fc2bc0dc16c4f780b714d72ec2192ca4a0d312ecb25ee9b9fc4612884da28b9532538e2bcdecbe7592fcb4bf47076ade1748a37da20da05a3a89fb83b1a7c558d82b169c1f73e39633762693925f91fb418814def514ec1fb32c72cae4b85710606fa39d07dc2add45b0dab8c79f42bfecf64365576078d82bd0a45b59dc150be1bfd61865cda6ea367a5ba68f65f6ab0568eab90c7cd9de9ca8f41ec0b776fb67bedd6ac9f40a77f7dc231f3f2780edca024aa2ffe17e38a70df963ac13469888204c4ccf009934140e4cad4a5239269199f72224523162d601572579a1b\" alt=\"Trulli\" style=\"width=100%\">\n</figure>\n","metadata":{}},{"cell_type":"markdown","source":"> **2.2 Target Data**\n\n> According to the start date of the Kaggle AI Report (20230511) and 2 years, the target data is obtained by screening the data, including Competitions.csv, Datasets.csv, Submissions.csv, Kernels.csv.\n\n> **2.3 Need to discuss continuously the competitions with AI**\n\n> For Tags.csv, by observing the variables(ParentTagId, FullPath), it can be known that the tag is classified with a tree structure. And the size of Tags.csv is small. Through observing FullPath one by one, the tag of artificial intelligence is found in Table 2.","metadata":{}},{"cell_type":"markdown","source":"<div style=\"text-align:center\"><b>Table 2. The tag of artificial intelligence</div>\n\n<figure>\n  <img src=\"https://storage.googleapis.com/kagglesdsdata/datasets/3360281/6084579/The%20tag%20of%20artificial%20intelligence.png?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=databundle-worker-v2%40kaggle-161607.iam.gserviceaccount.com%2F20230705%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20230705T155412Z&X-Goog-Expires=345600&X-Goog-SignedHeaders=host&X-Goog-Signature=7b92646052ed99d75f564ab81bdc3bd7e528e8f345917f2520ae7a6795539f29ee4302adeb79830bbf4ac8f051638b15e7f2a4444c5a352680dc9e6fc93d40edfc38776aa9d2b3f36cd5a4cb49b833317cc9eb4f984b7b94c245befc0e857a43b6389971a4efde997bd06f5149d127dc8509bfc127c76de9b362064cbc86cfdd50d2e46b867c7f93047af160cb001c21eb7e88d53c19734f07ece1ffad5f9fd48dfc1fffe9ab5aadf2a6783e255cfc94f707229fc751d66c207f2a19f7b1ef54bf5d6a0485bffc9c5ddec378b35d57d06d8bbe1e39943d7c1d11aa7dbcde261e133972671e6f449698e230aed9640b55fd8a47ead304db27096464cfef399658\" alt=\"Trulli\" style=\"width=100%\">\n</figure>\n","metadata":{}},{"cell_type":"markdown","source":"> Then it is easy to get CompetitionId from 'CompetitionTags.csv' and find the detail from 'Competitions.csv' as Table 3.","metadata":{}},{"cell_type":"markdown","source":"<div style=\"text-align:center\"><b>Table 3. The detail of competitions with AI</div>\n\n<figure>\n  <img src=\"https://storage.googleapis.com/kagglesdsdata/datasets/3360281/6084579/The%20detail%20of%20competitions%20with%20AI.png?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=databundle-worker-v2%40kaggle-161607.iam.gserviceaccount.com%2F20230705%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20230705T155332Z&X-Goog-Expires=345600&X-Goog-SignedHeaders=host&X-Goog-Signature=4ebc89175dca30ef64a4e29ae81e100a7b66ac6ad2cfc16af316bf0f36014b1e6576dafdb05652dc853cde43c07b868835006984abd279c8e0548ba5bde014999eac47fd76388a2dea7b90b6120a7449b438cb82a5e0912883076e4fffa4e90439f06c6942d3d467190b8e6e36d55096ab3447edf972cfe69881237098ac5ab76750bd3583db29acfede546a4b6a731be76ad3d97d69a007343b5ce80b35b6bb9ee0e591d8308e055f605b536a459daa1781ac9fad932b1d248fa63f3afd5de4d7bd5fcf3040d5b823009692c3a98b8550d2a8db5b2cf55ddcea0a67b0b4329f4c561f83b4d875d1419e75d3ba68ce60d869219553bc84cefc7b20e10b83e9f7\" alt=\"Trulli\" style=\"width=100%\">\n</figure>\n","metadata":{}},{"cell_type":"markdown","source":"**3 Summary**\n\nSome statistical characteristics are needed. This part will introduce some insights into Kaggle competitions in the past two years.\n\nAs shown in Table 4, the competitions’ percentage is the same as submissions percentage. Kernels and datasets percentage are almost 1.5 times and 2.5 times as much as them, respectively. More importantly, it happened in just two years, which is faster than the time from the earliest date.","metadata":{}},{"cell_type":"markdown","source":"<div style=\"text-align:center\"><b>Table 4. The target data in past two years</div>\n\n<figure>\n  <img src=\"https://storage.googleapis.com/kagglesdsdata/datasets/3360281/6084579/The%20target%20data%20in%20past%20two%20years.png?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=databundle-worker-v2%40kaggle-161607.iam.gserviceaccount.com%2F20230705%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20230705T155654Z&X-Goog-Expires=345600&X-Goog-SignedHeaders=host&X-Goog-Signature=30805ff48fa2c5d30476be167fce8be76d492c77d4b94e13af64555465053e54c3e08b3c89ffb0efe672a0731aba8f56de440e0aee41f45db7f9e90477e0698f5f37a830e902a247cd7fed079bced55aefa0635e1d69b9fed1becf70a3cde5e2ee2bd34c80ea4cefcbbdd84b15e7cf0cd41f63f7991a8888dbb80f42ba924a03ed5dc756e7181214d9dc82b6739551c4753dc655dc9d2fd95856bc4e19e0c8f87614641ebbce735fa58c040aad8dd630b0fe323345871bbe5f7da967c74ed2c543335da2d7bf91db6c9fa4057bc34cfcbc756b7cd2c46a34bd56f2a54b0edc71ece63a314b890474a2cfbd0f73543daed63ddfcb244190c5ffac58a4bca0b75f\" alt=\"Trulli\" style=\"width=100%\">\n</figure>\n","metadata":{}},{"cell_type":"markdown","source":"In the next tables, the variables are presented in a grouping sort order. \n\nTable 5 shows the top 10 competitions in submissions. The total number of submissions is correlated with competitors’ and teams and does not necessarily correlate with reward quantity and prizes’ number. It indicates that more rewards and prizes produce more submissions and fiercer competition in general. Simultaneously, some special topics have some function.","metadata":{}},{"cell_type":"markdown","source":"<div style=\"text-align:center\"><b>Table 5. Top 10 of Competitions submissions</div>\n\n<figure>\n  <img src=\"https://storage.googleapis.com/kagglesdsdata/datasets/3360281/6084579/Top%2010%20of%20Competitions%20submissions.png?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=databundle-worker-v2%40kaggle-161607.iam.gserviceaccount.com%2F20230705%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20230705T155753Z&X-Goog-Expires=345600&X-Goog-SignedHeaders=host&X-Goog-Signature=a91e87e55ec8f853ff3d31a7b4917c72c64a45c41ca96731c1280a45e582b85a809f4da584d33d41c3f76c691e5e666df01337534e294f0cc89fb99ce9b56ce86ba9007d1f7b8f5f223c2d651204c9e7a1464f54d3c2496eaba10ee1d07b90b2fb9a594f704342b35f7caa53e3e576eba1c9fb382325abcfc25c726912ca1a4e8701c4a4c864cdc985acaa2ad91889a17da9dd0a0be1150d51008d04a8e6a89846158223ae02fb0bb54eeeba7c34f1787749e7ac8c7d110fa5abcb576b9f403a0194e617dec73d7e67a9ab08eccc9664a216f76f752f5ccea934578f9a8d948c1faff4b3419e3a4c3f59e3a95788f8929bbaa70a2282e4fa1fdd817e8d314c5f\" alt=\"Trulli\" style=\"width=100%\">\n</figure>\n","metadata":{}},{"cell_type":"markdown","source":"Table 6 shows the top 10 datasets in kernels’ number. Usually, competitions come with several datasets so that Table 6 reflects the contribution of competition to community from other side. It found that the total number of views, votes, downloads doesn’t increase as the total number of kernel increase. The total number of votes is correlated with downloads to some degree. It's not necessarily that more submissions lead to more attention.","metadata":{}},{"cell_type":"markdown","source":"<div style=\"text-align:center\"><b>Table 6. Top 10 of Datasets total kernels</div>\n\n<figure>\n  <img src=\"https://storage.googleapis.com/kagglesdsdata/datasets/3360281/6084579/Top%2010%20of%20Datasets%20total%20kernels.png?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=databundle-worker-v2%40kaggle-161607.iam.gserviceaccount.com%2F20230705%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20230705T155825Z&X-Goog-Expires=345600&X-Goog-SignedHeaders=host&X-Goog-Signature=217b9b4e88a56e267bf96110ceff7af02e695358bb5debb39801d3e2c9a46390b0ec34e6ffa26969b96e49463071f0fc723768a5d8e0a06204d7494d3de0f2defe08aad05f65d627fd6af77a16840283a4307012680b760143e972a053a862da867c76c386453088b2b8a50e6d2689323635c19e4daeacad6e88704b0bfc80b43ceaef5a8f0fd50e7bc4f51bc935572dc0e0607ee4018e22e21a7287dd419f47229180bbcbeb3bd9af6df148fc4cb42f5eb7db1ee4a13d8a1588184547cde5cf25d48557c652e56cd38804e2c5f86b27d0080d0511dad87b8946b3d52f03a89ed17a2e952cafbdaea91818395d77e6b8feff6b8e5fd6a3b062b45a1eb61d6696\" alt=\"Trulli\" style=\"width=100%\">\n</figure>\n","metadata":{}},{"cell_type":"markdown","source":"Table 7 shows the top 10 kernels in views. From Table 6, it is not easy to find the relations between the total number of views and votes. But from Table 7, the total number of views doesn’t bring the bigger number of votes and medal. It indicates that kernels’ recognition from community or organizer does not necessarily relate to its attention.","metadata":{}},{"cell_type":"markdown","source":"<div style=\"text-align:center\"><b>Table 7. Top 10 of Kernels total views</div>\n\n<figure>\n  <img src=\"https://storage.googleapis.com/kagglesdsdata/datasets/3360281/6084579/Top%2010%20of%20Kernels%20total%20views.png?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=databundle-worker-v2%40kaggle-161607.iam.gserviceaccount.com%2F20230705%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20230705T155854Z&X-Goog-Expires=345600&X-Goog-SignedHeaders=host&X-Goog-Signature=58ccee86f51f96dba3890600447aefa7d4a2f70f7c802c5073fa9c4d0b55756ccb3694aab0fca4f980c3375e8a76c388ba17b997231410de675962874de000b98be9aaff3a33baa155d398b00d693f2ae8bb2309812aef8abd4ec180956afb4561121d36e71b0eacb4594b6638caca01348a5582b7844062701954699a45a34a0cab00f89d632281db22141c444c0a45cdae04c5ca524eb1deaa42e93e183ad1d296a43dc924a5652f35550414b4ffd1267bbec447a5ce952c9ceb7b0557d429afcb0b0ee2d4b87f0d8b77b3cc54939390ccdabbf96244edff9250255f19e99c16be6576ac73c9a044afeae0d625843cfe1dce19e41fb8016874e91a9f93967e\" alt=\"Trulli\" style=\"width=100%\">\n</figure>\n","metadata":{}},{"cell_type":"markdown","source":"**4 Supporting Material**\n> **4.1 codes**","metadata":{}},{"cell_type":"code","source":"import pandas as pd\nimport time\npath_basic = \"/kaggle/input/meta-kaggle/\"\n\ndef screen_date(data_path, drop_col, drop_v):\n    data = pd.read_csv(data_path)\n    data = data.drop(drop_col, axis=1)\n    data[drop_v] = pd.to_datetime(data[drop_v])\n    x = len(data)\n    early_date = min(data[drop_v])\n    data = data[data[drop_v] > pd.Timestamp(2021, 5, 10)]\n    return [early_date, len(data), len(data) / x]\n\nfilenames = ['Competitions.csv', 'Datasets.csv', 'Submissions.csv', 'Kernels.csv']\ndrop_col = {'Competitions.csv':\n                    ['Slug', 'Subtitle', 'HostSegmentTitle', 'ForumId', 'OrganizationId', 'DeadlineDate',\n                     'ProhibitNewEntrantsDeadlineDate', 'TeamMergerDeadlineDate',\n                     'TeamModelDeadlineDate', 'ModelSubmissionDeadlineDate',\n                     'FinalLeaderboardHasBeenVerified', 'HasKernels', 'OnlyAllowKernelSubmissions', 'HasLeaderboard',\n                     'LeaderboardDisplayFormat', 'EvaluationAlgorithmAbbreviation',\n                     'EvaluationAlgorithmName', 'EvaluationAlgorithmDescription',\n                     'EvaluationAlgorithmIsMax', 'MaxDailySubmissions',\n                     'MaxTeamSize', 'BanTeamMergers','EnableTeamModels', 'RewardType', 'RewardQuantity',\n                     'UserRankMultiplier', 'CanQualifyTiers', 'ValidationSetName',\n                     'ValidationSetValue', 'EnableSubmissionModelHashes', 'EnableSubmissionModelAttachments', 'HostName',\n                     'NumScoredSubmissions', 'TotalTeams', 'TotalCompetitors', 'TotalSubmissions', 'CompetitionTypeId'],\n                'Datasets.csv':\n                    ['OwnerUserId', 'OwnerOrganizationId', 'CurrentDatasetVersionId',\n                     'CurrentDatasourceVersionId', 'Type', 'LastActivityDate',\n                     'TotalDownloads', 'TotalVotes', 'TotalKernels'],\n                'Submissions.csv':\n                    ['SourceKernelVersionId', 'ScoreDate', 'IsAfterDeadline',\n                     'PublicScoreFullPrecision', 'PrivateScoreFullPrecision'],\n                'Kernels.csv':\n                    ['CurrentKernelVersionId', 'ForkParentKernelVersionId', 'ForumTopicId',\n                     'FirstKernelVersionId', 'EvaluationDate', 'MadePublicDate',\n                     'IsProjectLanguageTemplate', 'CurrentUrlSlug']}\ndrop_v = {'Competitions.csv': 'EnabledDate',\n              'Datasets.csv': 'CreationDate',\n              'Submissions.csv': 'SubmissionDate',\n              'Kernels.csv': 'CreationDate'}\nresults = []\nfor filename in filenames:\n    data_path = path_basic + filename\n    result = screen_date(data_path, drop_col[filename], drop_v[filename])\n    results.append(result)\nresults","metadata":{"execution":{"iopub.status.busy":"2023-06-08T08:43:30.855805Z","iopub.execute_input":"2023-06-08T08:43:30.856218Z","iopub.status.idle":"2023-06-08T08:46:18.033711Z","shell.execute_reply.started":"2023-06-08T08:43:30.856186Z","shell.execute_reply":"2023-06-08T08:46:18.031641Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import pandas as pd\nimport time\npath_basic = \"/kaggle/input/meta-kaggle/\"\n\ndata = pd.read_csv(path_basic + \"Tags.csv\")\ndata = data.drop(['Slug', 'Description',\n                      'DatasetCount', 'CompetitionCount', 'KernelCount'], axis=1)\nprint(data.columns, len(data))\nprint(data[data['Name'] == 'artificial intelligence']['Id'].tolist()[0])\nprint(data[data['Name'] == 'artificial intelligence']['FullPath'].tolist()[0])","metadata":{"execution":{"iopub.status.busy":"2023-06-08T08:43:23.364085Z","iopub.execute_input":"2023-06-08T08:43:23.364465Z","iopub.status.idle":"2023-06-08T08:43:23.464669Z","shell.execute_reply.started":"2023-06-08T08:43:23.364435Z","shell.execute_reply":"2023-06-08T08:43:23.463756Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import pandas as pd\ntable1 = pd.read_csv('/kaggle/input/the-relative-data-in-kaggle-ai-report/The data structure of Kaggle Competition.csv')\ntable2 = pd.read_csv('/kaggle/input/the-relative-data-in-kaggle-ai-report/The tag of artificial intelligence.csv')\ntable3 = pd.read_csv('/kaggle/input/the-relative-data-in-kaggle-ai-report/The detail of competitions with AI.csv')\ntable4 = pd.read_csv('/kaggle/input/the-relative-data-in-kaggle-ai-report/The target data in past two years.csv')\ntable5 = pd.read_csv('/kaggle/input/the-relative-data-in-kaggle-ai-report/Top 10 of Competitions submissions.csv')\ntable6 = pd.read_csv('/kaggle/input/the-relative-data-in-kaggle-ai-report/Top 10 of Datasets total kernels.csv')\ntable7 = pd.read_csv('/kaggle/input/the-relative-data-in-kaggle-ai-report/Top 10 of Kernels total views.csv')\ndata = pd.read_csv(\"/kaggle/input/the-relative-data-in-kaggle-ai-report/submission.csv\")\ndata","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"> **4.2 Reference**\n\n> [[1] ANTHONY WYNNE. AI report - Meta Kaggle data joins.](https://www.kaggle.com/code/anthony35813/ai-report-meta-kaggle-data-joins)","metadata":{}}]}