<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/india-vs-us-kaggle-users-data-scientists/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://blog.journeyofanalytics.com/india-vs-us-kaggle-users-data-scientists/"> R programming – Journey of Analytics</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<h1><span><b>Introduction</b></span></h1>
<p>This is an analysis of the Kaggle 2018 survey dataset. In my analysis I am trying to understand the similarities and differences between men and women users from US and India, since these are the two biggest segments of the respondent population. The number of respondents who chose someting other than Male/Female is quite low, so I excluded that subset as well.</p>
<p>The complete code is available as a<a rel="nofollow" href="https://www.kaggle.com/anu2analytics/indians-vs-usa-respondents-kaggle-survey?scriptVersionId=7077571" target="_blank"> kernel on the Kaggle website</a>. If you like this post, do login and upvote! <img alt="🙂" src="https://i1.wp.com/s.w.org/images/core/emoji/11/72x72/1f642.png?w=456&ssl=1" class="wp-smiley" data-recalc-dims="1">  This post is a slightly truncated version of the Kernel available on Kaggle.</p>
<p>You can also use the link to go to the dataset and perform your own explorations. Please do feel free to use my code as a starter script.</p>
<p> </p>
<div class="wp-caption"><img sizes="(max-width: 676px) 100vw, 676px" src="https://i0.wp.com/blog.journeyofanalytics.com/wp-content/uploads/2018/11/india_vs_us-1024x366.jpg?w=450&ssl=1" alt="Kaggle users - India vs US" class="wp-image-348" data-recalc-dims="1">
<p class="wp-caption-text">Kaggle users – India vs US</p>
</div>
<h4>Couple of disclaimers:</h4>
<p>NOT intending to say one country is better than the other. Instead just trying to explore the profiles based on what this specific dataset shows.<br>
It is very much possible that there is a response bias and that the differences are due to the nature of the people who are on the Kaggle site, and who answered the survey.<br>
With that out of the way, let us get started. If you like the analysis, please feel to fork the script and extend it further. And do not forget to Upvote! <img alt="🙂" src="https://i1.wp.com/s.w.org/images/core/emoji/11/72x72/1f642.png?w=456&ssl=1" class="wp-smiley" data-recalc-dims="1"></p>
<h1><span><b>Analysis</b></span></h1>
<p>Some questions that the analysis tries to answer are given below:<br>
a. What is the respondent demographic profile for users from the 2 countries – men vs women, age bucket?<br>
b. What is their educational background and major?<br>
c. What are the job roles and coding experience?<br>
d. What is the most popular language of use?<br>
e. What is the programming language people recommend for an aspiring data scientist?</p>
<p>I deliberately did not compare salary because:<br>
a. 16% of the population did not answer and 20% chose “do not wish to disclose”.<br>
b. the lowest bracket is 0-10k USD, so the max limit of 10k translates to about INR 7,00,000 (7 lakhs) which is quite high. A software engineer, entering the IT industry probably makes around 4-5 lakhs per annum, and they earn much more than others in India. So comparing against US salaries feels like comparing apples to oranges. [Assuming an exchange rate of 1 USD = 70 INR].</p>
<h4><span>Calculations / Data Wrangling:</span></h4>
<ol>
<li>I’ve aggregated the age buckets into lesser number of segments, because the number of respondents tapers off in the higher age groups. They are quite self-explanatory, as you will see from the ifesle clause below:
<pre># age - groupings:
ctry_cmp$age_bucket &lt;- ifelse( ctry_cmp$Q2 %in% c(&quot;18-21&quot;, &quot;22-24&quot;), &quot;age1_[18-24]&quot;,
                        ifelse(ctry_cmp$Q2 %in% c(&quot;25-29&quot;, &quot;35-39&quot;), &quot;age2_[25-39]&quot;,
                        ifelse(ctry_cmp$Q2 %in% c(&quot;35-39&quot;, &quot;40-44&quot;), &quot;age3_[35-44]&quot;,
                        ifelse(ctry_cmp$Q2 %in% c(&quot;45-49&quot;, &quot;50-54&quot;), &quot;age4_[45-54]&quot;, &quot;age5_[55+]&quot;))))</pre>
</li>
<li>Similarly, cleaned up the special characters in the educational qualifications. Also added a tag to the empty values in the following variables – jobrole (Q6), exp_group (Q8), proj(Q40), years in coding (Q24), major (Q5).</li>
<li>I also created some frequency using the sqldf() function. You could use the summarise() from the dplyr package. It really is a matter of choice.</li>
</ol>
<h1></h1>
<h1><span><b>Observations</b></span></h1>
<h4>Gender composition:</h4>
<p>As seen in the chart below, many more males (~80%) responded to the survey than women (~20%).<br>
Among women, almost 2/3rd are from US, and only ~38% from India.<br>
The men are almost split 50/50 among US and India.</p>
<p><img sizes="(max-width: 715px) 100vw, 715px" src="https://i0.wp.com/blog.journeyofanalytics.com/wp-content/uploads/2018/11/gender2.jpg?w=450&ssl=1" alt="" class="wp-image-350" data-recalc-dims="1"></p>
<p> </p>
<h4>Age composition:</h4>
<p>There is a definite trend showing that the Indian respondents are quite young, with both men and women showing >54% in the youngest ge bucket (18-24), and another ~28% falling in the (25-29) category. So almost 82% of the population is under 30 years of age.<br>
Among US respondents, the women seem a bit more younger, with 68% under 30 years, compared to ~57% men of women. However, both men and women had a larger segment in the 55+ category (~20% for women, and 25% for men. Compare it with Indians, where the 55+ group is barely 12%.</p>
<p><img sizes="(max-width: 1293px) 100vw, 1293px" src="https://i0.wp.com/blog.journeyofanalytics.com/wp-content/uploads/2018/11/age.jpg?w=450&ssl=1" alt="" class="wp-image-351" data-recalc-dims="1"></p>
<p> </p>
<h4>Educational background:</h4>
<p>Overall, this is an educated lot, and most had a bachelors degree or more.<br>
US women were the most educated of the lot, with a whopping 55% with masters degrees and 16% with doctorates.<br>
Among Indians, women had higher levels of education – 10% with Ph.D, 43% masters degree, compared with men where ~34% had a masters degree and only 4% had a doctorate.<br>
Among US men, ~47% had a masters degree, and 19% had doctorates.<br>
This is interesting because Indians are younger compared to US respondents, so many more Indians seem to be pursuing advanced degrees.</p>
<h4>Undergrad major:</h4>
<p>Among Indians, the majority of respondents added Computer Science as their major.<br>
Maybe because :<br>
(a) Indians have to declare a major when they join, and the choice of majors is not as wide as in the US. ,</p>
<ol start="2">
<li>Parents tend to force kids towards majors which are known to translate into a decent paying job, which is engineering or medicine.</li>
<li>A case of response bias? The survey came from Kaggle, so not sure if non-coding majors would have even bothered to respond.Among US respondents, the major is also computer science, but followed by maths &amp; stats for women.<br>
For men, the second category was a tie between non-compsci Engg , followed by maths&amp;stats.</li>
</ol>
<p><img sizes="(max-width: 1465px) 100vw, 1465px" src="https://i1.wp.com/blog.journeyofanalytics.com/wp-content/uploads/2018/11/major.jpg?w=450&ssl=1" alt="" class="wp-image-353" data-recalc-dims="1"></p>
<p> </p>
<h4>Job Roles:</h4>
<p>Among Indians, the biggest segment are predominantly students (30%). Among Indian men, the second category is software engineer.<br>
Among US women, the biggest category was also “student” but followed quite closely by “data scientist”. Among US men , the biggest category was “data scientist” followed by “student”.<br>
Note, “other” category is something we created now, so not considering those. They are not the biggest category for any sub-group anyway.<br>
<strong><em>CEOs, not surprisingly are male, 45+ years from the US, with a masters degree.</em></strong></p>
<p><img sizes="(max-width: 1054px) 100vw, 1054px" src="https://i2.wp.com/blog.journeyofanalytics.com/wp-content/uploads/2018/11/jobs.jpg?w=450&ssl=1" alt="" class="wp-image-357" data-recalc-dims="1"></p>
<p> </p>
<h4></h4>
<h4>Coding Experience:</h4>
<p>Among Indians, most answered &lt;1year of coding experience , which correlates well with the fact that most of them are under 30, with a huge population of students.<br>
Among US respondents, the split is even between 1-2 years of coding and 3-5 years of coding.<br>
Men seem to have a bit more coding experience than women, again explained by the fact that women were slightly younger overall, compared to US men.</p>
<p><img sizes="(max-width: 1475px) 100vw, 1475px" src="https://i1.wp.com/blog.journeyofanalytics.com/wp-content/uploads/2018/11/coding-gender.jpg?w=450&ssl=1" alt="" class="wp-image-352" data-recalc-dims="1"></p>
<p> </p>
<h4>Most popular programming language:</h4>
<p>Python is the most popular language, discounting the number of people who did not answer. However, among US women, R is also popular (16% favoring it).</p>
<p>I found this quite interesting because I’ve always used R at work, at multiple big-name employers. (Nasdaq, Td bank, etc.) Plus, a lot of companies that used SAS seem to have found it easier to move code to R. Again this is personal opinion.<br>
Maybe it is also because many colleges teach Python as a starting programming language?</p>
<p> </p>
<h1><span><b>Conclusions:</b></span></h1>
<ol>
<li>Overall, Indians tended to be younger with more people pursuing masters degrees.</li>
<li>US respondents tended to older with stronger coding experience, and many more are practicing data scientists.<br>
This seems like a great opportunity for Kaggle, if they could match the Indian students with the US data scientists, in a sort of mentor-matching service. <img alt="🙂" src="https://i1.wp.com/s.w.org/images/core/emoji/11/72x72/1f642.png?w=456&ssl=1" class="wp-smiley" data-recalc-dims="1"></li>
</ol>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://blog.journeyofanalytics.com/india-vs-us-kaggle-users-data-scientists/"> R programming – Journey of Analytics</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/B8or8yKFhRM" height="1"></a></div>