{"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":"Published on June 03, 2023. By Marília Prata, mpwolke.","metadata":{}},{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport plotly.express as px\nimport plotly.graph_objs as go\n\nimport plotly\nplotly.offline.init_notebook_mode(connected=True)\nimport plotly.io as pio\npio.templates.default = \"plotly_white\"\n\nfrom pathlib import Path\n\n#Ignore warnings\nimport warnings\nwarnings.filterwarnings('ignore')\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","_kg_hide-input":true,"_kg_hide-output":true,"execution":{"iopub.status.busy":"2023-06-03T21:45:16.318401Z","iopub.execute_input":"2023-06-03T21:45:16.319072Z","iopub.status.idle":"2023-06-03T21:45:20.095891Z","shell.execute_reply.started":"2023-06-03T21:45:16.319038Z","shell.execute_reply":"2023-06-03T21:45:20.094739Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"DATA_DIR = Path(\"/kaggle/input/2023-kaggle-ai-report/\")\ndf = pd.read_csv(DATA_DIR / \"kaggle_writeups_20230510.csv\")\nsub = pd.read_csv(DATA_DIR / \"sample_submission.csv\")\ndf.head()","metadata":{"execution":{"iopub.status.busy":"2023-06-03T21:45:26.598726Z","iopub.execute_input":"2023-06-03T21:45:26.599157Z","iopub.status.idle":"2023-06-03T21:45:27.032791Z","shell.execute_reply.started":"2023-06-03T21:45:26.599122Z","shell.execute_reply":"2023-06-03T21:45:27.031777Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Convert date column to datetime datatype ","metadata":{}},{"cell_type":"code","source":"#Rahul Chavan https://www.kaggle.com/code/rahulchavan99/instagram-reach-analysis-with-plotly\n\n#Convert date column to datetime datatype \n\ndf['date'] = pd.to_datetime(df['Competition Launch Date'])\ndf['date']","metadata":{"execution":{"iopub.status.busy":"2023-06-03T21:45:33.043214Z","iopub.execute_input":"2023-06-03T21:45:33.044048Z","iopub.status.idle":"2023-06-03T21:45:33.110712Z","shell.execute_reply.started":"2023-06-03T21:45:33.044001Z","shell.execute_reply":"2023-06-03T21:45:33.109972Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig = go.Figure()\nfig.add_trace(go.Scatter(x=df['date'], \n                         y=df['Title of Competition'], \n                         mode='lines', name='Title of Competition'))\nfig.update_layout(title='Title of Competition Trend', xaxis_title='date', \n                  yaxis_title='Title of Competition')\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-06-03T20:45:21.237035Z","iopub.execute_input":"2023-06-03T20:45:21.237441Z","iopub.status.idle":"2023-06-03T20:45:21.447310Z","shell.execute_reply.started":"2023-06-03T20:45:21.237412Z","shell.execute_reply":"2023-06-03T20:45:21.446368Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df[\"Title of Competition\"].value_counts().head(10)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T20:54:34.629292Z","iopub.execute_input":"2023-06-03T20:54:34.629726Z","iopub.status.idle":"2023-06-03T20:54:34.644502Z","shell.execute_reply.started":"2023-06-03T20:54:34.629693Z","shell.execute_reply":"2023-06-03T20:54:34.643448Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"riid = df[(df['Title of Competition']=='Riiid Answer Correctness Prediction')].reset_index(drop=True)\nriid.head(2)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T21:59:17.771864Z","iopub.execute_input":"2023-06-03T21:59:17.772277Z","iopub.status.idle":"2023-06-03T21:59:17.789681Z","shell.execute_reply.started":"2023-06-03T21:59:17.772245Z","shell.execute_reply":"2023-06-03T21:59:17.788609Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\n#Code by Varun Sai Kanuri https://www.kaggle.com/code/varunsaikanuri/plotly-notebook-for-beginners\n\nfig=px.bar(riid.head(20),x='date',y='Title of Competition',color='Title of Writeup', title='<b>Riiid Answer Correctness Prediction</b>')\nfig.update_layout(title_x=0.5)\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-06-03T21:11:59.237085Z","iopub.execute_input":"2023-06-03T21:11:59.237560Z","iopub.status.idle":"2023-06-03T21:11:59.424947Z","shell.execute_reply.started":"2023-06-03T21:11:59.237525Z","shell.execute_reply":"2023-06-03T21:11:59.424104Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"##Code by Taha07  https://www.kaggle.com/taha07/data-scientists-jobs-analysis-visualization/notebook\n\nfrom wordcloud import WordCloud\nfrom wordcloud import STOPWORDS\nstopwords = set(STOPWORDS)\nwordcloud = WordCloud(background_color = 'green',\n                      colormap= 'Set2',\n                      height =2000,\n                      width = 2000\n                     ).generate(str(riid[\"Title of Competition\"]))\nplt.rcParams['figure.figsize'] = (10,10)\nplt.axis(\"off\")\nplt.imshow(wordcloud)\nplt.title(\"Riiid Answer Correctness Prediction\")\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2023-06-03T22:02:24.264910Z","iopub.execute_input":"2023-06-03T22:02:24.265351Z","iopub.status.idle":"2023-06-03T22:02:25.802382Z","shell.execute_reply.started":"2023-06-03T22:02:24.265318Z","shell.execute_reply":"2023-06-03T22:02:25.801204Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"jig = df[(df['Title of Competition']=='Jigsaw Rate Severity of Toxic Comments')].reset_index(drop=True)\njig.head(2)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T22:04:15.770833Z","iopub.execute_input":"2023-06-03T22:04:15.771235Z","iopub.status.idle":"2023-06-03T22:04:15.788334Z","shell.execute_reply.started":"2023-06-03T22:04:15.771206Z","shell.execute_reply":"2023-06-03T22:04:15.787079Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"##Code by Taha07  https://www.kaggle.com/taha07/data-scientists-jobs-analysis-visualization/notebook\n\nfrom wordcloud import WordCloud\nfrom wordcloud import STOPWORDS\nstopwords = set(STOPWORDS)\nwordcloud = WordCloud(background_color = 'black',\n                      colormap= 'Set3',\n                      height =2000,\n                      width = 2000\n                     ).generate(str(jig[\"Title of Competition\"]))\nplt.rcParams['figure.figsize'] = (10,10)\nplt.axis(\"off\")\nplt.imshow(wordcloud)\nplt.title(\"Jigsaw Rate Severity of Toxic Comments\")\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-06-03T22:04:22.711726Z","iopub.execute_input":"2023-06-03T22:04:22.712132Z","iopub.status.idle":"2023-06-03T22:04:24.304369Z","shell.execute_reply.started":"2023-06-03T22:04:22.712101Z","shell.execute_reply":"2023-06-03T22:04:24.303589Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\n#Code by Varun Sai Kanuri https://www.kaggle.com/code/varunsaikanuri/plotly-notebook-for-beginners\n\nfig=px.bar(jig.head(20),x='date',y='Title of Competition',color='Title of Writeup', title='<b>Jigsaw Rate Severity of Toxic Comments</b>')\nfig.update_layout(title_x=0.5)\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-06-03T21:35:50.606627Z","iopub.execute_input":"2023-06-03T21:35:50.607171Z","iopub.status.idle":"2023-06-03T21:35:50.781887Z","shell.execute_reply.started":"2023-06-03T21:35:50.607137Z","shell.execute_reply":"2023-06-03T21:35:50.780889Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"shopee = df[(df['Title of Competition']=='Shopee - Price Match Guarantee')].reset_index(drop=True)\nshopee.head(2)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T21:46:12.103815Z","iopub.execute_input":"2023-06-03T21:46:12.104200Z","iopub.status.idle":"2023-06-03T21:46:12.124506Z","shell.execute_reply.started":"2023-06-03T21:46:12.104171Z","shell.execute_reply":"2023-06-03T21:46:12.123312Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"##Code by Taha07  https://www.kaggle.com/taha07/data-scientists-jobs-analysis-visualization/notebook\n\nfrom wordcloud import WordCloud\nfrom wordcloud import STOPWORDS\nstopwords = set(STOPWORDS)\nwordcloud = WordCloud(background_color = 'OrangeRed',\n                      colormap= 'Pastel2',\n                      height =2000,\n                      width = 2000\n                     ).generate(str(shopee[\"Title of Competition\"]))\nplt.rcParams['figure.figsize'] = (10,10)\nplt.axis(\"off\")\nplt.imshow(wordcloud)\nplt.title(\"Shopee - Price Match Guarantee'\")\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2023-06-03T22:08:03.029789Z","iopub.execute_input":"2023-06-03T22:08:03.030191Z","iopub.status.idle":"2023-06-03T22:08:04.523893Z","shell.execute_reply.started":"2023-06-03T22:08:03.030161Z","shell.execute_reply":"2023-06-03T22:08:04.522845Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\n#Code by Varun Sai Kanuri https://www.kaggle.com/code/varunsaikanuri/plotly-notebook-for-beginners\n\nfig=px.bar(shopee.head(20),x='date',y='Title of Competition',color='Title of Writeup', title='<b>Shopee - Price Match Guarantee</b>')\nfig.update_layout(title_x=0.5)\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-06-03T21:47:20.527505Z","iopub.execute_input":"2023-06-03T21:47:20.527895Z","iopub.status.idle":"2023-06-03T21:47:21.097721Z","shell.execute_reply.started":"2023-06-03T21:47:20.527867Z","shell.execute_reply":"2023-06-03T21:47:21.096307Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"amex = df[(df['Title of Competition']=='American Express - Default Prediction')].reset_index(drop=True)\namex.head(2)","metadata":{"execution":{"iopub.status.busy":"2023-06-03T21:46:23.858988Z","iopub.execute_input":"2023-06-03T21:46:23.859678Z","iopub.status.idle":"2023-06-03T21:46:23.876225Z","shell.execute_reply.started":"2023-06-03T21:46:23.859635Z","shell.execute_reply":"2023-06-03T21:46:23.875101Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"##Code by Taha07  https://www.kaggle.com/taha07/data-scientists-jobs-analysis-visualization/notebook\n\nfrom wordcloud import WordCloud\nfrom wordcloud import STOPWORDS\nstopwords = set(STOPWORDS)\nwordcloud = WordCloud(background_color = 'MediumBlue',\n                      colormap= 'Pastel2',\n                      height =2000,\n                      width = 2000\n                     ).generate(str(amex[\"Title of Competition\"]))\nplt.rcParams['figure.figsize'] = (10,10)\nplt.axis(\"off\")\nplt.imshow(wordcloud)\nplt.title(\"American Express - Default Prediction\")\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-06-03T22:10:19.215964Z","iopub.execute_input":"2023-06-03T22:10:19.216336Z","iopub.status.idle":"2023-06-03T22:10:20.783757Z","shell.execute_reply.started":"2023-06-03T22:10:19.216308Z","shell.execute_reply":"2023-06-03T22:10:20.782720Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by Varun Sai Kanuri https://www.kaggle.com/code/varunsaikanuri/plotly-notebook-for-beginners\n\nfig=px.bar(amex.head(20),x='date',y='Title of Competition',color='Title of Writeup', title='<b>American Express - Default Prediction</b>')\nfig.update_layout(title_x=0.5)\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-06-03T21:48:39.911705Z","iopub.execute_input":"2023-06-03T21:48:39.912124Z","iopub.status.idle":"2023-06-03T21:48:40.084132Z","shell.execute_reply.started":"2023-06-03T21:48:39.912090Z","shell.execute_reply":"2023-06-03T21:48:40.083037Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Is AI going to knock down the Top of Maslow's Pyramid?\n\nLet's talk about the recent trendy subject of almost all medias.\n\nThe Z generation (digital natives) is fascinated by technologies. Imagine what they will do when they apply AI on their whole lives? Better say, what will AI do with this generation?\n\nMaybe they will delegate so much to AI that they might end up turning into a plant asking the robot's help even to brush their teeth. I'm kidding.\n\nOr like on the movie \"Triangle of Sadness\", When the passengers of a yacht that passes through a storm, found themselves on an island without eletricity and obviously No Internet. Arriving there, the best succeded character was the cleaning woman, since she was the only one that had survival skills (catching fish and starting a fire, in other words: The bottom of Maslow: Phisiological needs). The others are just used to delegate things to the Help/staff.\n\nOn the top of Maslow's Pyramid we find Self-Actualization. Which means creativity, innovation, learning and creating in a high-level, spontaneity, morality, experience purpose that will connect who we really are, our actions, our values and our beliefs.\n\nTherefore, AI should be applied to help us to keep our endless learning path.","metadata":{}},{"cell_type":"markdown","source":"![](https://www.ultrasomething.com/photos/blogphotos/2012.Q4/Maslow-2.jpg)https://www.ultrasomething.com/2012/11/the-inverted-maslow/","metadata":{}},{"cell_type":"markdown","source":"#Acknowledgements:\n\nVarun Sai Kanuri https://www.kaggle.com/code/varunsaikanuri/plotly-notebook-for-beginners\n\nTaha07  https://www.kaggle.com/taha07/data-scientists-jobs-analysis-visualization/notebook\n\nRahul Chavan https://www.kaggle.com/code/rahulchavan99/instagram-reach-analysis-with-plotly","metadata":{}},{"cell_type":"markdown","source":"#Quite like what we have on Kaggle:\n\n![](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQHFb3HQL_2DTNsZTIyDVYKNDVa0kYQ7QUdx5vwvUNMS2EcZAEyKfWkUVFb4OqqMJFC5K0&usqp=CAU)A-Z Quotes","metadata":{}}]}