43

The survey has a Most Popular Developer Environments by Occupation section.

Is there a way to see the most popular environments sorted by language?

I'd like to know for example, which environment is preferred by people who work with python.

1
  • 18
    We'll be releasing the anonymized dataset in a few weeks so you can analyse it yourself soon. Our data scientists are also planning on publishing more analysis. I'll pass this request on. Mar 24, 2017 at 1:35

1 Answer 1

8

I downloaded the survey results and plotted the data.

I selected all the users who answered mentioning Python to the question:

"Which of the following languages have you done extensive development work in over the past year, and which do you want to work in over the next year?"

Lots of users mentioned several languages, which means that the IDEs below are not all necessarily used for Python development. Since there's no question associating an IDE with a particular language, I guess this is as good as it gets.

enter image description here

This one is selecting those users who only used Python in the past year.

enter image description here

import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from collections import Counter


df = pd.read_csv("survey_results_public.csv")

# "Which of the following languages have you done extensive development work
# in over the past year, and which do you want to work in over the next year?"

# Select rows that contain the string 'Python', ie: those who selected Python
# as one of the languages used.
# rows_w_Python = df[
#     df['HaveWorkedLanguage'].str.contains(
#         "Python", na=False)]['HaveWorkedLanguage']

# Rows for users who selected ONLY Python.
rows_w_Python = df['HaveWorkedLanguage'][df['HaveWorkedLanguage'] == 'Python']

idx = rows_w_Python.index.tolist()

# IDEs for each of those rows.
# "Which development environment(s) do you use regularly?"
ides = df['IDE'][idx]

# Put all IDE string into a single list.
ides_flat = []
for r in ides:
    if r is not np.nan:
        s = [_.strip() for _ in r.split(';')]
        ides_flat = ides_flat + s

# Count total number of occurrences for each IDE.
c = Counter(ides_flat)
df = pd.DataFrame.from_dict(c, orient='index')
# To percentage.
dfSort = 100. * df.sort([0]) / df.sum()

# Plot.
ax = dfSort.plot(kind='barh', legend=False, color='#99D4FF')
for p in ax.patches:
    ax.annotate(
        "{:.1f}%".format(p.get_width()), (p.get_x() + p.get_width(),
        p.get_y()), xytext=(2, 2), textcoords='offset points')

for spine in plt.gca().spines.values():
    spine.set_visible(False)
plt.tick_params(top='off', bottom='off', left='off', right='off',
                labelleft='on', labelbottom='off')
# plt.title("Popular IDEs ({}) among users ({}) who\n".format(
#     df.sum()[0], len(idx)) + "have developed in Python over the past year")

plt.title("Popular IDEs ({}) among users ({}) who\n".format(
    df.sum()[0], len(idx)) + "have developed ONLY in Python"
    " over the past year")

plt.show()
3
  • 1
    It's a python script written to answer a question about people who program with python. How does it only have 5 upvotes?! (Maybe you need to include which IDE you wrote it in?) Have my +1 with my incredulity.
    – Patrick M
    Oct 13, 2017 at 19:21
  • Haha thank you for your magical internet points good Sir. I use Sublime BTW.
    – Gabriel
    Oct 13, 2017 at 20:00
  • Oh and your upvote also gave me the Necromancer badge, so double win!
    – Gabriel
    Oct 13, 2017 at 20:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .