{ "cells": [ { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "# Most Used Languages for Data Related Jobs" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "We are going to check the most used programming languages for data related jobs based on Stack Overflow Developer Survey 2021 results." ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "### Import Libraries" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "### Load Dataset" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [], "source": [ "result_df = pd.read_csv(\"C:/Users/Marselo/Downloads/Stackoverflow survey results/2021 survey_results_public.csv\")" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "### Overview of the Dataset" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/plain": " ResponseId MainBranch \\\n0 1 I am a developer by profession \n1 2 I am a student who is learning to code \n2 3 I am not primarily a developer, but I write co... \n3 4 I am a developer by profession \n4 5 I am a developer by profession \n\n Employment \\\n0 Independent contractor, freelancer, or self-em... \n1 Student, full-time \n2 Student, full-time \n3 Employed full-time \n4 Independent contractor, freelancer, or self-em... \n\n Country US_State UK_Country \\\n0 Slovakia NaN NaN \n1 Netherlands NaN NaN \n2 Russian Federation NaN NaN \n3 Austria NaN NaN \n4 United Kingdom of Great Britain and Northern I... NaN England \n\n EdLevel Age1stCode \\\n0 Secondary school (e.g. American high school, G... 18 - 24 years \n1 Bachelor’s degree (B.A., B.S., B.Eng., etc.) 11 - 17 years \n2 Bachelor’s degree (B.A., B.S., B.Eng., etc.) 11 - 17 years \n3 Master’s degree (M.A., M.S., M.Eng., MBA, etc.) 11 - 17 years \n4 Master’s degree (M.A., M.S., M.Eng., MBA, etc.) 5 - 10 years \n\n LearnCode YearsCode ... \\\n0 Coding Bootcamp;Other online resources (ex: vi... NaN ... \n1 Other online resources (ex: videos, blogs, etc... 7 ... \n2 Other online resources (ex: videos, blogs, etc... NaN ... \n3 NaN NaN ... \n4 Friend or family member 17 ... \n\n Age Gender Trans Sexuality \\\n0 25-34 years old Man No Straight / Heterosexual \n1 18-24 years old Man No Straight / Heterosexual \n2 18-24 years old Man No Prefer not to say \n3 35-44 years old Man No Straight / Heterosexual \n4 25-34 years old Man No NaN \n\n Ethnicity Accessibility \\\n0 White or of European descent None of the above \n1 White or of European descent None of the above \n2 Prefer not to say None of the above \n3 White or of European descent I am deaf / hard of hearing \n4 White or of European descent None of the above \n\n MentalHealth SurveyLength SurveyEase \\\n0 None of the above Appropriate in length Easy \n1 None of the above Appropriate in length Easy \n2 None of the above Appropriate in length Easy \n3 NaN Appropriate in length Neither easy nor difficult \n4 NaN Appropriate in length Easy \n\n ConvertedCompYearly \n0 62268.0 \n1 NaN \n2 NaN \n3 NaN \n4 NaN \n\n[5 rows x 48 columns]", "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ResponseIdMainBranchEmploymentCountryUS_StateUK_CountryEdLevelAge1stCodeLearnCodeYearsCode...AgeGenderTransSexualityEthnicityAccessibilityMentalHealthSurveyLengthSurveyEaseConvertedCompYearly
01I am a developer by professionIndependent contractor, freelancer, or self-em...SlovakiaNaNNaNSecondary school (e.g. American high school, G...18 - 24 yearsCoding Bootcamp;Other online resources (ex: vi...NaN...25-34 years oldManNoStraight / HeterosexualWhite or of European descentNone of the aboveNone of the aboveAppropriate in lengthEasy62268.0
12I am a student who is learning to codeStudent, full-timeNetherlandsNaNNaNBachelor’s degree (B.A., B.S., B.Eng., etc.)11 - 17 yearsOther online resources (ex: videos, blogs, etc...7...18-24 years oldManNoStraight / HeterosexualWhite or of European descentNone of the aboveNone of the aboveAppropriate in lengthEasyNaN
23I am not primarily a developer, but I write co...Student, full-timeRussian FederationNaNNaNBachelor’s degree (B.A., B.S., B.Eng., etc.)11 - 17 yearsOther online resources (ex: videos, blogs, etc...NaN...18-24 years oldManNoPrefer not to sayPrefer not to sayNone of the aboveNone of the aboveAppropriate in lengthEasyNaN
34I am a developer by professionEmployed full-timeAustriaNaNNaNMaster’s degree (M.A., M.S., M.Eng., MBA, etc.)11 - 17 yearsNaNNaN...35-44 years oldManNoStraight / HeterosexualWhite or of European descentI am deaf / hard of hearingNaNAppropriate in lengthNeither easy nor difficultNaN
45I am a developer by professionIndependent contractor, freelancer, or self-em...United Kingdom of Great Britain and Northern I...NaNEnglandMaster’s degree (M.A., M.S., M.Eng., MBA, etc.)5 - 10 yearsFriend or family member17...25-34 years oldManNoNaNWhite or of European descentNone of the aboveNaNAppropriate in lengthEasyNaN
\n

5 rows × 48 columns

\n
" }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result_df.head(5)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "RangeIndex: 83439 entries, 0 to 83438\n", "Data columns (total 48 columns):\n", " # Column Non-Null Count Dtype \n", "--- ------ -------------- ----- \n", " 0 ResponseId 83439 non-null int64 \n", " 1 MainBranch 83439 non-null object \n", " 2 Employment 83323 non-null object \n", " 3 Country 83439 non-null object \n", " 4 US_State 14920 non-null object \n", " 5 UK_Country 4418 non-null object \n", " 6 EdLevel 83126 non-null object \n", " 7 Age1stCode 83243 non-null object \n", " 8 LearnCode 82963 non-null object \n", " 9 YearsCode 81641 non-null object \n", " 10 YearsCodePro 61216 non-null object \n", " 11 DevType 66484 non-null object \n", " 12 OrgSize 60726 non-null object \n", " 13 Currency 61080 non-null object \n", " 14 CompTotal 47183 non-null float64\n", " 15 CompFreq 52150 non-null object \n", " 16 LanguageHaveWorkedWith 82357 non-null object \n", " 17 LanguageWantToWorkWith 76821 non-null object \n", " 18 DatabaseHaveWorkedWith 69546 non-null object \n", " 19 DatabaseWantToWorkWith 58299 non-null object \n", " 20 PlatformHaveWorkedWith 52135 non-null object \n", " 21 PlatformWantToWorkWith 41619 non-null object \n", " 22 WebframeHaveWorkedWith 61707 non-null object \n", " 23 WebframeWantToWorkWith 52095 non-null object \n", " 24 MiscTechHaveWorkedWith 47055 non-null object \n", " 25 MiscTechWantToWorkWith 38021 non-null object \n", " 26 ToolsTechHaveWorkedWith 72537 non-null object \n", " 27 ToolsTechWantToWorkWith 65480 non-null object \n", " 28 NEWCollabToolsHaveWorkedWith 81234 non-null object \n", " 29 NEWCollabToolsWantToWorkWith 73022 non-null object \n", " 30 OpSys 83294 non-null object \n", " 31 NEWStuck 83052 non-null object \n", " 32 NEWSOSites 83171 non-null object \n", " 33 SOVisitFreq 82413 non-null object \n", " 34 SOAccount 82525 non-null object \n", " 35 SOPartFreq 67553 non-null object \n", " 36 SOComm 82319 non-null object \n", " 37 NEWOtherComms 82828 non-null object \n", " 38 Age 82407 non-null object \n", " 39 Gender 82286 non-null object \n", " 40 Trans 80678 non-null object \n", " 41 Sexuality 73366 non-null object \n", " 42 Ethnicity 79464 non-null object \n", " 43 Accessibility 77603 non-null object \n", " 44 MentalHealth 76920 non-null object \n", " 45 SurveyLength 81711 non-null object \n", " 46 SurveyEase 81948 non-null object \n", " 47 ConvertedCompYearly 46844 non-null float64\n", "dtypes: float64(2), int64(1), object(45)\n", "memory usage: 30.6+ MB\n" ] } ], "source": [ "result_df.info()" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "### Filtering the Dataset" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/plain": "I am a developer by profession 58153\nI am a student who is learning to code 12029\nI am not primarily a developer, but I write code sometimes as part of my work 6578\nI code primarily as a hobby 4929\nI used to be a developer by profession, but no longer am 1237\nNone of these 513\nName: MainBranch, dtype: int64" }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result_df[\"MainBranch\"].value_counts()" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "We are primarily interested with those who code for the purpose of work. So we will isolate these two MainBranch: \"I am a developer by profession\" and \"I am not primarily a developer, but I write code sometimes as part of my work\"." ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/plain": " ResponseId MainBranch \\\n0 1 I am a developer by profession \n2 3 I am not primarily a developer, but I write co... \n3 4 I am a developer by profession \n4 5 I am a developer by profession \n8 9 I am a developer by profession \n\n Employment \\\n0 Independent contractor, freelancer, or self-em... \n2 Student, full-time \n3 Employed full-time \n4 Independent contractor, freelancer, or self-em... \n8 Employed part-time \n\n Country US_State UK_Country \\\n0 Slovakia NaN NaN \n2 Russian Federation NaN NaN \n3 Austria NaN NaN \n4 United Kingdom of Great Britain and Northern I... NaN England \n8 India NaN NaN \n\n EdLevel Age1stCode \\\n0 Secondary school (e.g. American high school, G... 18 - 24 years \n2 Bachelor’s degree (B.A., B.S., B.Eng., etc.) 11 - 17 years \n3 Master’s degree (M.A., M.S., M.Eng., MBA, etc.) 11 - 17 years \n4 Master’s degree (M.A., M.S., M.Eng., MBA, etc.) 5 - 10 years \n8 Bachelor’s degree (B.A., B.S., B.Eng., etc.) 18 - 24 years \n\n LearnCode YearsCode ... \\\n0 Coding Bootcamp;Other online resources (ex: vi... NaN ... \n2 Other online resources (ex: videos, blogs, etc... NaN ... \n3 NaN NaN ... \n4 Friend or family member 17 ... \n8 Coding Bootcamp 6 ... \n\n Age Gender Trans Sexuality \\\n0 25-34 years old Man No Straight / Heterosexual \n2 18-24 years old Man No Prefer not to say \n3 35-44 years old Man No Straight / Heterosexual \n4 25-34 years old Man No NaN \n8 25-34 years old Man No NaN \n\n Ethnicity Accessibility \\\n0 White or of European descent None of the above \n2 Prefer not to say None of the above \n3 White or of European descent I am deaf / hard of hearing \n4 White or of European descent None of the above \n8 South Asian NaN \n\n MentalHealth SurveyLength \\\n0 None of the above Appropriate in length \n2 None of the above Appropriate in length \n3 NaN Appropriate in length \n4 NaN Appropriate in length \n8 I have a concentration and/or memory disorder ... Appropriate in length \n\n SurveyEase ConvertedCompYearly \n0 Easy 62268.0 \n2 Easy NaN \n3 Neither easy nor difficult NaN \n4 Easy NaN \n8 Easy NaN \n\n[5 rows x 48 columns]", "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ResponseIdMainBranchEmploymentCountryUS_StateUK_CountryEdLevelAge1stCodeLearnCodeYearsCode...AgeGenderTransSexualityEthnicityAccessibilityMentalHealthSurveyLengthSurveyEaseConvertedCompYearly
01I am a developer by professionIndependent contractor, freelancer, or self-em...SlovakiaNaNNaNSecondary school (e.g. American high school, G...18 - 24 yearsCoding Bootcamp;Other online resources (ex: vi...NaN...25-34 years oldManNoStraight / HeterosexualWhite or of European descentNone of the aboveNone of the aboveAppropriate in lengthEasy62268.0
23I am not primarily a developer, but I write co...Student, full-timeRussian FederationNaNNaNBachelor’s degree (B.A., B.S., B.Eng., etc.)11 - 17 yearsOther online resources (ex: videos, blogs, etc...NaN...18-24 years oldManNoPrefer not to sayPrefer not to sayNone of the aboveNone of the aboveAppropriate in lengthEasyNaN
34I am a developer by professionEmployed full-timeAustriaNaNNaNMaster’s degree (M.A., M.S., M.Eng., MBA, etc.)11 - 17 yearsNaNNaN...35-44 years oldManNoStraight / HeterosexualWhite or of European descentI am deaf / hard of hearingNaNAppropriate in lengthNeither easy nor difficultNaN
45I am a developer by professionIndependent contractor, freelancer, or self-em...United Kingdom of Great Britain and Northern I...NaNEnglandMaster’s degree (M.A., M.S., M.Eng., MBA, etc.)5 - 10 yearsFriend or family member17...25-34 years oldManNoNaNWhite or of European descentNone of the aboveNaNAppropriate in lengthEasyNaN
89I am a developer by professionEmployed part-timeIndiaNaNNaNBachelor’s degree (B.A., B.S., B.Eng., etc.)18 - 24 yearsCoding Bootcamp6...25-34 years oldManNoNaNSouth AsianNaNI have a concentration and/or memory disorder ...Appropriate in lengthEasyNaN
\n

5 rows × 48 columns

\n
" }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result2_df: pd.DataFrame = result_df.loc[(result_df[\"MainBranch\"]==\"I am a developer by profession\") | (result_df[\"MainBranch\"]==\"I am not primarily a developer, but I write code sometimes as part of my work\")]\n", "result2_df.head(5)" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "Drop the rows if DevType column is null." ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(64731, 48)\n", "(61602, 48)\n" ] } ], "source": [ "print(result2_df.shape)\n", "result2_df = result2_df.dropna(subset=\"DevType\")\n", "print(result2_df.shape)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/plain": "Developer, full-stack 8415\nDeveloper, back-end 5378\nDeveloper, front-end 2304\nDeveloper, front-end;Developer, full-stack;Developer, back-end 2108\nDeveloper, full-stack;Developer, back-end 1759\n ... \nDeveloper, desktop or enterprise applications;Developer, full-stack;Developer, back-end;Database administrator;Developer, QA or test;DevOps specialist;Engineer, site reliability;System administrator;Educator 1\nDeveloper, mobile;Developer, front-end;Developer, desktop or enterprise applications;Developer, full-stack;Other (please specify):;Developer, back-end;Academic researcher;Database administrator;Developer, game or graphics;Developer, embedded applications or devices;DevOps specialist;Designer;System administrator 1\nDeveloper, mobile;Developer, front-end;Developer, desktop or enterprise applications;Developer, full-stack;Developer, back-end;Database administrator;Developer, embedded applications or devices;Designer;System administrator;Educator 1\nDeveloper, front-end;Developer, full-stack;Developer, back-end;Academic researcher;Database administrator;DevOps specialist 1\nDeveloper, mobile;Developer, desktop or enterprise applications;Data scientist or machine learning specialist;Developer, back-end;Engineering manager 1\nName: DevType, Length: 8159, dtype: int64" }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result2_df[\"DevType\"].value_counts()" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "We can see that one person is allowed to choose more than one option for DevType column (separated by ;). Now, we will check options available for DevType column." ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/plain": "array(['Developer, mobile', 'Developer, front-end',\n 'Data scientist or machine learning specialist',\n 'Developer, back-end', 'Developer, full-stack',\n 'Developer, game or graphics',\n 'Developer, embedded applications or devices',\n 'Developer, desktop or enterprise applications',\n 'Data or business analyst', 'Engineer, data',\n 'Academic researcher', 'Other (please specify):',\n 'Engineering manager', 'DevOps specialist',\n 'Senior Executive (C-Suite, VP, etc.)', 'Product manager',\n 'Developer, QA or test', 'Designer', 'Scientist',\n 'System administrator', 'Database administrator', 'Student',\n 'Engineer, site reliability', 'Educator',\n 'Marketing or sales professional'], dtype=object)" }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result2_df.loc[~result2_df[\"DevType\"].str.contains(\";\"), \"DevType\"].unique()" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "These are the available data related jobs for DevType options:\n", "- Data scientist or machine learning specialist\n", "- Data or business analyst\n", "- Engineer, data\n", "- Database administrator\n", "\n", "All data related jobs contain the word \"data\"." ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Int64Index: 12316 entries, 4 to 83436\n", "Data columns (total 48 columns):\n", " # Column Non-Null Count Dtype \n", "--- ------ -------------- ----- \n", " 0 ResponseId 12316 non-null int64 \n", " 1 MainBranch 12316 non-null object \n", " 2 Employment 12316 non-null object \n", " 3 Country 12316 non-null object \n", " 4 US_State 2614 non-null object \n", " 5 UK_Country 758 non-null object \n", " 6 EdLevel 12304 non-null object \n", " 7 Age1stCode 12308 non-null object \n", " 8 LearnCode 12281 non-null object \n", " 9 YearsCode 12179 non-null object \n", " 10 YearsCodePro 11976 non-null object \n", " 11 DevType 12316 non-null object \n", " 12 OrgSize 12105 non-null object \n", " 13 Currency 12143 non-null object \n", " 14 CompTotal 9346 non-null float64\n", " 15 CompFreq 10334 non-null object \n", " 16 LanguageHaveWorkedWith 12257 non-null object \n", " 17 LanguageWantToWorkWith 11452 non-null object \n", " 18 DatabaseHaveWorkedWith 11231 non-null object \n", " 19 DatabaseWantToWorkWith 9688 non-null object \n", " 20 PlatformHaveWorkedWith 8771 non-null object \n", " 21 PlatformWantToWorkWith 7194 non-null object \n", " 22 WebframeHaveWorkedWith 9167 non-null object \n", " 23 WebframeWantToWorkWith 7693 non-null object \n", " 24 MiscTechHaveWorkedWith 9026 non-null object \n", " 25 MiscTechWantToWorkWith 7749 non-null object \n", " 26 ToolsTechHaveWorkedWith 10871 non-null object \n", " 27 ToolsTechWantToWorkWith 9898 non-null object \n", " 28 NEWCollabToolsHaveWorkedWith 12052 non-null object \n", " 29 NEWCollabToolsWantToWorkWith 10930 non-null object \n", " 30 OpSys 12305 non-null object \n", " 31 NEWStuck 12287 non-null object \n", " 32 NEWSOSites 12299 non-null object \n", " 33 SOVisitFreq 12249 non-null object \n", " 34 SOAccount 12261 non-null object \n", " 35 SOPartFreq 10294 non-null object \n", " 36 SOComm 12244 non-null object \n", " 37 NEWOtherComms 12249 non-null object \n", " 38 Age 12212 non-null object \n", " 39 Gender 12189 non-null object \n", " 40 Trans 11984 non-null object \n", " 41 Sexuality 11025 non-null object \n", " 42 Ethnicity 11812 non-null object \n", " 43 Accessibility 11514 non-null object \n", " 44 MentalHealth 11475 non-null object \n", " 45 SurveyLength 12093 non-null object \n", " 46 SurveyEase 12125 non-null object \n", " 47 ConvertedCompYearly 9272 non-null float64\n", "dtypes: float64(2), int64(1), object(45)\n", "memory usage: 4.6+ MB\n" ] } ], "source": [ "data_job_df = result2_df.loc[result2_df[\"DevType\"].str.contains(\"data\", case=False)]\n", "data_job_df.info()" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "Drop the rows if the LanguageHaveWorkedWith column is not available." ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(12316, 48)\n", "(12257, 48)\n" ] } ], "source": [ "print(data_job_df.shape)\n", "data_job_df = data_job_df.dropna(subset=\"LanguageHaveWorkedWith\")\n", "print(data_job_df.shape)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/plain": "Data scientist or machine learning specialist 632\nEngineer, data 358\nEngineer, data;Developer, back-end 316\nData or business analyst 269\nData scientist or machine learning specialist;Data or business analyst 197\n ... \nDeveloper, mobile;Developer, full-stack;Database administrator;Data or business analyst;Senior Executive (C-Suite, VP, etc.) 1\nDeveloper, desktop or enterprise applications;Data scientist or machine learning specialist;Database administrator;Designer 1\nDeveloper, front-end;Developer, full-stack;Developer, back-end;Academic researcher;Database administrator;DevOps specialist 1\nDeveloper, mobile;Developer, front-end;Developer, desktop or enterprise applications;Developer, full-stack;Developer, back-end;Database administrator;Developer, embedded applications or devices;Designer;System administrator;Educator 1\nDeveloper, mobile;Developer, desktop or enterprise applications;Data scientist or machine learning specialist;Developer, back-end;Engineering manager 1\nName: DevType, Length: 4830, dtype: int64" }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data_job_df[\"DevType\"].value_counts()" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "Since the rows with more than one DevType might skew the language count results, we are going to include only the options below:\n", "\"Data scientist or machine learning specialist\", \"Data or business analyst\", \"Engineer, data\", \"Database administrator\"\n" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/plain": "Data scientist or machine learning specialist 632\nEngineer, data 358\nData or business analyst 269\nDatabase administrator 44\nName: DevType, dtype: int64" }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data_job_df = data_job_df[(data_job_df[\"DevType\"] == \"Data scientist or machine learning specialist\") | (data_job_df[\"DevType\"] == \"Data or business analyst\") | (data_job_df[\"DevType\"] == \"Engineer, data\") | (data_job_df[\"DevType\"] == \"Database administrator\")]\n", "data_job_df[\"DevType\"].value_counts()" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "### Data Transformation" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "Now we want to see the programming languages that are used by data related professions." ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/plain": " DevType \\\n9 Data scientist or machine learning specialist \n61 Data or business analyst \n77 Data scientist or machine learning specialist \n137 Data or business analyst \n160 Engineer, data \n... ... \n83112 Data scientist or machine learning specialist \n83120 Data scientist or machine learning specialist \n83203 Engineer, data \n83216 Data or business analyst \n83335 Engineer, data \n\n LanguageHaveWorkedWith \n9 C++;Python \n61 Python;R;VBA \n77 HTML/CSS;Python;R \n137 HTML/CSS;JavaScript;R;SQL \n160 Assembly;Python \n... ... \n83112 Bash/Shell;Perl;Python;R \n83120 C;C++;Java;Kotlin \n83203 Bash/Shell;C#;Ruby;Rust \n83216 HTML/CSS;JavaScript;SQL;VBA \n83335 Bash/Shell;Python;R \n\n[1303 rows x 2 columns]", "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
DevTypeLanguageHaveWorkedWith
9Data scientist or machine learning specialistC++;Python
61Data or business analystPython;R;VBA
77Data scientist or machine learning specialistHTML/CSS;Python;R
137Data or business analystHTML/CSS;JavaScript;R;SQL
160Engineer, dataAssembly;Python
.........
83112Data scientist or machine learning specialistBash/Shell;Perl;Python;R
83120Data scientist or machine learning specialistC;C++;Java;Kotlin
83203Engineer, dataBash/Shell;C#;Ruby;Rust
83216Data or business analystHTML/CSS;JavaScript;SQL;VBA
83335Engineer, dataBash/Shell;Python;R
\n

1303 rows × 2 columns

\n
" }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "language_df: pd.DataFrame = data_job_df.loc[:,[\"DevType\",\"LanguageHaveWorkedWith\"]]\n", "language_df" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "Similar to DevType, one person is allowed to choose more than one option for LanguageHaveWorkedWith column (separated by ;). Now, we will check the options available for DevType column." ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Matlab\n", "Python\n", "SQL\n", "VBA\n", "C#\n", "R\n", "C\n", "Scala\n", "Delphi\n", "Perl\n", "PHP\n", "Java\n", "C++\n", "Clojure\n", "Julia\n", "APL\n", "Swift\n", "HTML/CSS\n" ] } ], "source": [ "languages = language_df.loc[~language_df[\"LanguageHaveWorkedWith\"].str.contains(\";\"), \"LanguageHaveWorkedWith\"].unique()\n", "for language in languages:\n", " print(language)" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "Now we will make a dataframe for each DevType (\"Data scientist or machine learning specialist\", \"Data or business analyst\", \"Engineer, data\", and \"Database administrator\")." ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/plain": " DevType \\\n9 Data scientist or machine learning specialist \n77 Data scientist or machine learning specialist \n161 Data scientist or machine learning specialist \n209 Data scientist or machine learning specialist \n224 Data scientist or machine learning specialist \n... ... \n82900 Data scientist or machine learning specialist \n82906 Data scientist or machine learning specialist \n82921 Data scientist or machine learning specialist \n83112 Data scientist or machine learning specialist \n83120 Data scientist or machine learning specialist \n\n LanguageHaveWorkedWith \n9 C++;Python \n77 HTML/CSS;Python;R \n161 Matlab \n209 C#;HTML/CSS;Matlab;Python;R;SQL \n224 Python \n... ... \n82900 HTML/CSS;Python \n82906 HTML/CSS;Python;R;SQL \n82921 Python;R \n83112 Bash/Shell;Perl;Python;R \n83120 C;C++;Java;Kotlin \n\n[632 rows x 2 columns]", "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
DevTypeLanguageHaveWorkedWith
9Data scientist or machine learning specialistC++;Python
77Data scientist or machine learning specialistHTML/CSS;Python;R
161Data scientist or machine learning specialistMatlab
209Data scientist or machine learning specialistC#;HTML/CSS;Matlab;Python;R;SQL
224Data scientist or machine learning specialistPython
.........
82900Data scientist or machine learning specialistHTML/CSS;Python
82906Data scientist or machine learning specialistHTML/CSS;Python;R;SQL
82921Data scientist or machine learning specialistPython;R
83112Data scientist or machine learning specialistBash/Shell;Perl;Python;R
83120Data scientist or machine learning specialistC;C++;Java;Kotlin
\n

632 rows × 2 columns

\n
" }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ds_df = language_df[language_df[\"DevType\"].str.contains(\"Data scientist or machine learning specialist\")]\n", "ds_df" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [], "source": [ "da_df = language_df[language_df[\"DevType\"].str.contains(\"Data or business analyst\")]\n", "de_df = language_df[language_df[\"DevType\"].str.contains(\"Engineer, data\")]\n", "dba_df = language_df[language_df[\"DevType\"].str.contains(\"Database administrator\")]" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "First we create a new dataframe to store the languages and their count based on each DevType. We calculate the total occurrences for each DevType and the occurrences of each language using a `for` loop. C and C++ are not included in the `for` loop because `str.count` is based on Regex pattern, and they would cause error/miscount." ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [], "source": [ "lang_count_df = pd.DataFrame()\n", "languages = np.delete(languages,(languages == \"C\") | (languages == \"C++\"))\n", "\n", "def add_lang_count(df: pd.DataFrame, job_type: str):\n", " lang_count_df.loc[\"total\", job_type] = df.shape[0]\n", " for language in languages:\n", " lang_count_df.loc[language,job_type] = df[\"LanguageHaveWorkedWith\"].str.count(language).sum()\n", " lang_count_df.loc[\"C\", job_type] = df[\"LanguageHaveWorkedWith\"].str.count(\"C[^\\w+#]\").sum()\n", " lang_count_df.loc[\"C++\", job_type] = df[\"LanguageHaveWorkedWith\"].str.count(\"C\\+\\+\").sum()" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/plain": " Data Scientist Data Analyst Data Engineer Database Administrator\ntotal 632.0 269.0 358.0 44.0\nMatlab 55.0 13.0 29.0 1.0\nPython 595.0 179.0 294.0 18.0\nSQL 315.0 168.0 234.0 36.0\nVBA 25.0 77.0 24.0 7.0\nC# 42.0 34.0 46.0 11.0\nR 219.0 81.0 58.0 9.0\nScala 40.0 2.0 89.0 1.0\nDelphi 0.0 3.0 2.0 1.0\nPerl 10.0 5.0 8.0 2.0\nPHP 14.0 19.0 23.0 5.0\nJava 218.0 115.0 230.0 15.0\nClojure 9.0 6.0 5.0 1.0\nJulia 33.0 5.0 9.0 1.0\nAPL 0.0 5.0 3.0 3.0\nSwift 8.0 4.0 4.0 4.0\nHTML/CSS 113.0 78.0 86.0 11.0\nC 89.0 20.0 49.0 8.0\nC++ 136.0 23.0 58.0 5.0", "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Data ScientistData AnalystData EngineerDatabase Administrator
total632.0269.0358.044.0
Matlab55.013.029.01.0
Python595.0179.0294.018.0
SQL315.0168.0234.036.0
VBA25.077.024.07.0
C#42.034.046.011.0
R219.081.058.09.0
Scala40.02.089.01.0
Delphi0.03.02.01.0
Perl10.05.08.02.0
PHP14.019.023.05.0
Java218.0115.0230.015.0
Clojure9.06.05.01.0
Julia33.05.09.01.0
APL0.05.03.03.0
Swift8.04.04.04.0
HTML/CSS113.078.086.011.0
C89.020.049.08.0
C++136.023.058.05.0
\n
" }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "add_lang_count(ds_df,\"Data Scientist\")\n", "add_lang_count(da_df, \"Data Analyst\")\n", "add_lang_count(de_df, \"Data Engineer\")\n", "add_lang_count(dba_df, \"Database Administrator\")\n", "lang_count_df" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "### Data Analysis and Visualization" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "Import visualization libraries" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/html": " \n " }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import plotly.graph_objs as go\n", "import plotly.express as px\n", "import plotly.offline as pyo\n", "pyo.init_notebook_mode()" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "We will add a new column to calculate the most used programming languages across all data related professions. Note that the sample size of data scientist is larger compared to other groups, and the sample of database administrator is smaller compared to the other groups." ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [], "source": [ "total_ser = lang_count_df.sum(axis = 1)\n", "lang_count_df[\"Total\"] = total_ser" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "Normalize the data to percentage, and add a color code to each language." ] }, { "cell_type": "code", "execution_count": 22, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [], "source": [ "normalize_df = lang_count_df.iloc[1:]/lang_count_df.loc[\"total\"]\n", "normalize_df[\"Color\"] = \"NA\"" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/plain": " Data Scientist Data Analyst Data Engineer Database Administrator \\\nMatlab 0.087025 0.048327 0.081006 0.022727 \nPython 0.941456 0.665428 0.821229 0.409091 \nSQL 0.498418 0.624535 0.653631 0.818182 \nVBA 0.039557 0.286245 0.067039 0.159091 \nC# 0.066456 0.126394 0.128492 0.250000 \nR 0.346519 0.301115 0.162011 0.204545 \nScala 0.063291 0.007435 0.248603 0.022727 \nDelphi 0.000000 0.011152 0.005587 0.022727 \nPerl 0.015823 0.018587 0.022346 0.045455 \nPHP 0.022152 0.070632 0.064246 0.113636 \nJava 0.344937 0.427509 0.642458 0.340909 \nClojure 0.014241 0.022305 0.013966 0.022727 \nJulia 0.052215 0.018587 0.025140 0.022727 \nAPL 0.000000 0.018587 0.008380 0.068182 \nSwift 0.012658 0.014870 0.011173 0.090909 \nHTML/CSS 0.178797 0.289963 0.240223 0.250000 \nC 0.140823 0.074349 0.136872 0.181818 \nC++ 0.215190 0.085502 0.162011 0.113636 \n\n Total Color \nMatlab 0.075211 #FD3216 \nPython 0.833461 #00FE35 \nSQL 0.577897 #6A76FC \nVBA 0.102072 #FED4C4 \nC# 0.102072 #FE00CE \nR 0.281658 #0DF9FF \nScala 0.101305 #F6F926 \nDelphi 0.004605 #FF9616 \nPerl 0.019186 #479B55 \nPHP 0.046815 #EEA6FB \nJava 0.443592 #DC587D \nClojure 0.016117 #D626FF \nJulia 0.036838 #6E899C \nAPL 0.008442 #00B5F7 \nSwift 0.015349 #B68E00 \nHTML/CSS 0.221028 #C9FBE5 \nC 0.127398 #FF0092 \nC++ 0.170376 #22FFA7 ", "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Data ScientistData AnalystData EngineerDatabase AdministratorTotalColor
Matlab0.0870250.0483270.0810060.0227270.075211#FD3216
Python0.9414560.6654280.8212290.4090910.833461#00FE35
SQL0.4984180.6245350.6536310.8181820.577897#6A76FC
VBA0.0395570.2862450.0670390.1590910.102072#FED4C4
C#0.0664560.1263940.1284920.2500000.102072#FE00CE
R0.3465190.3011150.1620110.2045450.281658#0DF9FF
Scala0.0632910.0074350.2486030.0227270.101305#F6F926
Delphi0.0000000.0111520.0055870.0227270.004605#FF9616
Perl0.0158230.0185870.0223460.0454550.019186#479B55
PHP0.0221520.0706320.0642460.1136360.046815#EEA6FB
Java0.3449370.4275090.6424580.3409090.443592#DC587D
Clojure0.0142410.0223050.0139660.0227270.016117#D626FF
Julia0.0522150.0185870.0251400.0227270.036838#6E899C
APL0.0000000.0185870.0083800.0681820.008442#00B5F7
Swift0.0126580.0148700.0111730.0909090.015349#B68E00
HTML/CSS0.1787970.2899630.2402230.2500000.221028#C9FBE5
C0.1408230.0743490.1368720.1818180.127398#FF0092
C++0.2151900.0855020.1620110.1136360.170376#22FFA7
\n
" }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "for n in range(normalize_df.shape[0]):\n", " normalize_df.iloc[n, -1] = px.colors.qualitative.Light24[n]\n", "normalize_df" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "Extract the top 5 languages from each job type. `sort_index()` is used to give a better visualization result." ] }, { "cell_type": "code", "execution_count": 24, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/plain": " Total Color\nHTML/CSS 0.221028 #C9FBE5\nJava 0.443592 #DC587D\nPython 0.833461 #00FE35\nR 0.281658 #0DF9FF\nSQL 0.577897 #6A76FC", "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
TotalColor
HTML/CSS0.221028#C9FBE5
Java0.443592#DC587D
Python0.833461#00FE35
R0.281658#0DF9FF
SQL0.577897#6A76FC
\n
" }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "top_5_total = normalize_df[[\"Total\",\"Color\"]].sort_values(\"Total\", ascending=False)[:5].sort_index()\n", "top_5_ds = normalize_df[[\"Data Scientist\", \"Color\"]].sort_values(\"Data Scientist\", ascending=False)[:5].sort_index()\n", "top_5_da = normalize_df[[\"Data Analyst\", \"Color\"]].sort_values(\"Data Analyst\", ascending=False)[:5].sort_index()\n", "top_5_de = normalize_df[[\"Data Engineer\", \"Color\"]].sort_values(\"Data Engineer\", ascending=False)[:5].sort_index()\n", "top_5_dba = normalize_df[[\"Database Administrator\", \"Color\"]].sort_values(\"Database Administrator\", ascending=False)[:5].sort_index()\n", "\n", "top_5_list = [top_5_total, top_5_ds, top_5_da, top_5_de, top_5_dba]\n", "for df in top_5_list:\n", " df.columns = [\"Total\", \"Color\"]\n", "\n", "top_5_total" ] }, { "cell_type": "code", "execution_count": 25, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "marker": { "color": [ "#C9FBE5", "#DC587D", "#00FE35", "#0DF9FF", "#6A76FC" ], "line": { "color": "black", "width": 2 } }, "opacity": 0.7, "r": [ 0.2210283960092095, 0.44359171143514964, 0.8334612432847276, 0.2816577129700691, 0.577897160399079 ], "theta": [ "HTML/CSS", "Java", "Python", "R", "SQL" ], "width": 0.45, "type": "barpolar" } ], "layout": { "template": { "data": { "barpolar": [ { "marker": { "line": { "color": "rgb(237,237,237)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "bar": [ { "error_x": { "color": "rgb(51,51,51)" }, "error_y": { "color": "rgb(51,51,51)" }, "marker": { "line": { "color": "rgb(237,237,237)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "carpet": [ { "aaxis": { "endlinecolor": "rgb(51,51,51)", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "rgb(51,51,51)" }, "baxis": { "endlinecolor": "rgb(51,51,51)", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "rgb(51,51,51)" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "type": "choropleth" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "type": "contourcarpet" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "colorscale": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ], "type": "contour" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "colorscale": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ], "type": "heatmapgl" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "colorscale": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ], "type": "heatmap" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "colorscale": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ], "type": "histogram2dcontour" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "colorscale": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ], "type": "histogram2d" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scattermapbox" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scatterpolargl" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scatterpolar" } ], "scatter": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scatter" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "colorscale": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "rgb(237,237,237)" }, "line": { "color": "white" } }, "header": { "fill": { "color": "rgb(217,217,217)" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "colorscale": { "sequential": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ], "sequentialminus": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ] }, "colorway": [ "#F8766D", "#A3A500", "#00BF7D", "#00B0F6", "#E76BF3" ], "font": { "color": "rgb(51,51,51)" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "rgb(237,237,237)", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "paper_bgcolor": "white", "plot_bgcolor": "rgb(237,237,237)", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside" }, "bgcolor": "rgb(237,237,237)", "radialaxis": { "gridcolor": "white", "linecolor": "white", "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside" } }, "scene": { "xaxis": { "backgroundcolor": "rgb(237,237,237)", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "rgb(237,237,237)", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "rgb(237,237,237)", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside", "zerolinecolor": "white" } }, "shapedefaults": { "fillcolor": "black", "line": { "width": 0 }, "opacity": 0.3 }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside" }, "baxis": { "gridcolor": "white", "linecolor": "white", "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside" }, "bgcolor": "rgb(237,237,237)", "caxis": { "gridcolor": "white", "linecolor": "white", "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside" } }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside", "title": { "standoff": 15 }, "zerolinecolor": "white" }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside", "title": { "standoff": 15 }, "zerolinecolor": "white" } } }, "polar": { "radialaxis": { "range": [ 0, 1.0 ], "showticklabels": false, "ticks": "" }, "angularaxis": { "showticklabels": true, "ticks": "" } } }, "config": { "plotlyServerURL": "https://plotly.com" } }, "text/html": "
" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig = go.Figure(go.Barpolar(\n", " r= top_5_total[\"Total\"],\n", " theta= top_5_total.index,\n", " width=0.45,\n", " marker_color=top_5_total[\"Color\"],\n", " marker_line_color=\"black\",\n", " marker_line_width=2,\n", " opacity=0.7\n", "))\n", "\n", "fig.update_layout(\n", " template=\"ggplot2\",\n", " polar = dict(\n", " radialaxis = dict(range=[0, 1.0], showticklabels=False, ticks=''),\n", " angularaxis = dict(showticklabels=True, ticks='')\n", " )\n", ")\n", "\n", "fig.show()" ] }, { "cell_type": "code", "execution_count": 26, "metadata": { "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "marker": { "color": [ "#22FFA7", "#DC587D", "#00FE35", "#0DF9FF", "#6A76FC" ], "line": { "color": "black", "width": 2 } }, "opacity": 0.7, "r": [ 0.21518987341772153, 0.3449367088607595, 0.9414556962025317, 0.34651898734177217, 0.49841772151898733 ], "theta": [ "C++", "Java", "Python", "R", "SQL" ], "width": 0.45, "type": "barpolar", "subplot": "polar", "hovertemplate": "%{theta}: %{r:.0%}" }, { "marker": { "color": [ "#C9FBE5", "#DC587D", "#00FE35", "#0DF9FF", "#6A76FC" ], "line": { "color": "black", "width": 2 } }, "opacity": 0.7, "r": [ 0.2899628252788104, 0.4275092936802974, 0.6654275092936803, 0.30111524163568776, 0.6245353159851301 ], "theta": [ "HTML/CSS", "Java", "Python", "R", "SQL" ], "width": 0.45, "type": "barpolar", "subplot": "polar2", "hovertemplate": "%{theta}: %{r:.0%}" }, { "marker": { "color": [ "#C9FBE5", "#DC587D", "#00FE35", "#6A76FC", "#F6F926" ], "line": { "color": "black", "width": 2 } }, "opacity": 0.7, "r": [ 0.24022346368715083, 0.6424581005586593, 0.8212290502793296, 0.6536312849162011, 0.24860335195530725 ], "theta": [ "HTML/CSS", "Java", "Python", "SQL", "Scala" ], "width": 0.45, "type": "barpolar", "subplot": "polar3", "hovertemplate": "%{theta}: %{r:.0%}" }, { "marker": { "color": [ "#FE00CE", "#C9FBE5", "#DC587D", "#00FE35", "#6A76FC" ], "line": { "color": "black", "width": 2 } }, "opacity": 0.7, "r": [ 0.25, 0.25, 0.3409090909090909, 0.4090909090909091, 0.8181818181818182 ], "theta": [ "C#", "HTML/CSS", "Java", "Python", "SQL" ], "width": 0.45, "type": "barpolar", "subplot": "polar4", "hovertemplate": "%{theta}: %{r:.0%}" } ], "layout": { "template": { "data": { "barpolar": [ { "marker": { "line": { "color": "rgb(237,237,237)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "bar": [ { "error_x": { "color": "rgb(51,51,51)" }, "error_y": { "color": "rgb(51,51,51)" }, "marker": { "line": { "color": "rgb(237,237,237)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "carpet": [ { "aaxis": { "endlinecolor": "rgb(51,51,51)", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "rgb(51,51,51)" }, "baxis": { "endlinecolor": "rgb(51,51,51)", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "rgb(51,51,51)" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "type": "choropleth" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "type": "contourcarpet" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "colorscale": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ], "type": "contour" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "colorscale": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ], "type": "heatmapgl" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "colorscale": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ], "type": "heatmap" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "colorscale": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ], "type": "histogram2dcontour" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "colorscale": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ], "type": "histogram2d" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scattermapbox" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scatterpolargl" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scatterpolar" } ], "scatter": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scatter" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" }, "colorscale": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "rgb(237,237,237)" }, "line": { "color": "white" } }, "header": { "fill": { "color": "rgb(217,217,217)" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "tickcolor": "rgb(237,237,237)", "ticklen": 6, "ticks": "inside" } }, "colorscale": { "sequential": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ], "sequentialminus": [ [ 0, "rgb(20,44,66)" ], [ 1, "rgb(90,179,244)" ] ] }, "colorway": [ "#F8766D", "#A3A500", "#00BF7D", "#00B0F6", "#E76BF3" ], "font": { "color": "rgb(51,51,51)" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "rgb(237,237,237)", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "paper_bgcolor": "white", "plot_bgcolor": "rgb(237,237,237)", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside" }, "bgcolor": "rgb(237,237,237)", "radialaxis": { "gridcolor": "white", "linecolor": "white", "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside" } }, "scene": { "xaxis": { "backgroundcolor": "rgb(237,237,237)", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "rgb(237,237,237)", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "rgb(237,237,237)", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside", "zerolinecolor": "white" } }, "shapedefaults": { "fillcolor": "black", "line": { "width": 0 }, "opacity": 0.3 }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside" }, "baxis": { "gridcolor": "white", "linecolor": "white", "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside" }, "bgcolor": "rgb(237,237,237)", "caxis": { "gridcolor": "white", "linecolor": "white", "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside" } }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside", "title": { "standoff": 15 }, "zerolinecolor": "white" }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "showgrid": true, "tickcolor": "rgb(51,51,51)", "ticks": "outside", "title": { "standoff": 15 }, "zerolinecolor": "white" } } }, "polar": { "domain": { "x": [ 0.0, 0.45 ], "y": [ 0.625, 1.0 ] }, "radialaxis": { "range": [ 0, 1.0 ], "showline": false, "showticklabels": false, "ticks": "" }, "angularaxis": { "showticklabels": true, "ticks": "", "linecolor": "black", "linewidth": 1.5 } }, "polar2": { "domain": { "x": [ 0.55, 1.0 ], "y": [ 0.625, 1.0 ] }, "radialaxis": { "range": [ 0, 1.0 ], "showline": false, "showticklabels": false, "ticks": "" }, "angularaxis": { "showticklabels": true, "ticks": "", "linecolor": "black", "linewidth": 1.5 } }, "polar3": { "domain": { "x": [ 0.0, 0.45 ], "y": [ 0.0, 0.375 ] }, "radialaxis": { "range": [ 0, 1.0 ], "showline": false, "showticklabels": false, "ticks": "" }, "angularaxis": { "showticklabels": true, "ticks": "", "linecolor": "black", "linewidth": 1.5 } }, "polar4": { "domain": { "x": [ 0.55, 1.0 ], "y": [ 0.0, 0.375 ] }, "radialaxis": { "range": [ 0, 1.0 ], "showline": false, "showticklabels": false, "ticks": "" }, "angularaxis": { "showticklabels": true, "ticks": "", "linecolor": "black", "linewidth": 1.5 } }, "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "Data Scientist", "x": 0.225, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper", "yshift": 20 }, { "font": { "size": 16 }, "showarrow": false, "text": "Data Analyst", "x": 0.775, "xanchor": "center", "xref": "paper", "y": 1.0, "yanchor": "bottom", "yref": "paper", "yshift": 20 }, { "font": { "size": 16 }, "showarrow": false, "text": "Data Engineer", "x": 0.225, "xanchor": "center", "xref": "paper", "y": 0.375, "yanchor": "bottom", "yref": "paper", "yshift": 20 }, { "font": { "size": 16 }, "showarrow": false, "text": "Database Administrator", "x": 0.775, "xanchor": "center", "xref": "paper", "y": 0.375, "yanchor": "bottom", "yref": "paper", "yshift": 20 }, { "font": { "size": 14 }, "showarrow": false, "text": "tmtsmrsl.github.io", "x": 1.05, "y": -0.1 } ], "font": { "color": "darkblue", "family": "Helvetica" }, "title": { "font": { "color": "darkblue", "family": "Helvetica", "size": 24 }, "text": "Popular Languages for Data Professionals" }, "margin": { "t": 150 }, "paper_bgcolor": "#DEDCC6", "height": 800, "width": 1000, "showlegend": false }, "config": { "plotlyServerURL": "https://plotly.com" } }, "text/html": "
" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from plotly.subplots import make_subplots\n", "\n", "fig = make_subplots(rows=2, cols=2, specs=[[{'type': 'polar'}]*2]*2, subplot_titles=(\"Data Scientist\", \"Data Analyst\", \"Data Engineer\", \"Database Administrator\"))\n", "\n", "fig.add_trace(go.Barpolar(\n", " r= top_5_ds[\"Total\"],\n", " theta= top_5_ds.index,\n", " width=0.45,\n", " marker_color=top_5_ds[\"Color\"],\n", " marker_line_color=\"black\",\n", " marker_line_width=2,\n", " opacity=0.7\n", "), 1, 1)\n", "fig.add_trace(go.Barpolar(\n", " r= top_5_da[\"Total\"],\n", " theta= top_5_da.index,\n", " width=0.45,\n", " marker_color=top_5_da[\"Color\"],\n", " marker_line_color=\"black\",\n", " marker_line_width=2,\n", " opacity=0.7\n", "), 1, 2)\n", "fig.add_trace(go.Barpolar(\n", " r= top_5_de[\"Total\"],\n", " theta= top_5_de.index,\n", " width=0.45,\n", " marker_color=top_5_de[\"Color\"],\n", " marker_line_color=\"black\",\n", " marker_line_width=2,\n", " opacity=0.7\n", "), 2, 1)\n", "fig.add_trace(go.Barpolar(\n", " r= top_5_dba[\"Total\"],\n", " theta= top_5_dba.index,\n", " width=0.45,\n", " marker_color=top_5_dba[\"Color\"],\n", " marker_line_color=\"black\",\n", " marker_line_width=2,\n", " opacity=0.7\n", "), 2, 2)\n", "fig.update_traces(hovertemplate='%{theta}: %{r:.0%}')\n", "fig.update_layout(\n", " font_color=\"darkblue\",\n", " font_family=\"Helvetica\",\n", " title_font_color=\"darkblue\",\n", " title_font_family=\"Helvetica\",\n", " title_font_size=24,\n", " margin = dict(t = 150),\n", " paper_bgcolor='#DEDCC6',\n", " height = 800,\n", " width = 1000,\n", " showlegend = False,\n", " title=dict(text=\"Popular Languages for Data Professionals\"),\n", " template=\"ggplot2\",\n", " polar = dict(\n", " radialaxis = dict(range=[0, 1.0], showline = False, showticklabels=False, ticks=''),\n", " angularaxis = dict(showticklabels=True, ticks='', linecolor='black', linewidth=1.5)\n", " ),\n", " polar2 = dict(\n", " radialaxis = dict(range=[0, 1.0], showline = False, showticklabels=False, ticks=''),\n", " angularaxis = dict(showticklabels=True, ticks='', linecolor='black', linewidth=1.5)\n", " ),\n", " polar3 = dict(\n", " radialaxis = dict(range=[0, 1.0], showline = False, showticklabels=False, ticks=''),\n", " angularaxis = dict(showticklabels=True, ticks='', linecolor='black', linewidth=1.5)\n", " ),\n", " polar4 = dict(\n", " radialaxis = dict(range=[0, 1.0], showline = False, showticklabels=False, ticks=''),\n", " angularaxis = dict(showticklabels=True, ticks='', linecolor='black', linewidth=1.5)\n", " )\n", "\n", ")\n", "fig.update_annotations(yshift=20)\n", "fig.add_annotation({\n", " \"x\": 1.05,\n", " \"y\": -0.1,\n", " \"font\": {\"size\": 14},\n", " \"text\": \"tmtsmrsl.github.io\",\n", " \"showarrow\": False\n", "})\n", "\n", "fig.show()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.12" } }, "nbformat": 4, "nbformat_minor": 1 }