4

Is there any website that collects data from Stack Overflow to display trends on programming languages?

I have not found any website describing Stack Overflow's trends. I'd like to find out trends in different languages and I thought Stack Overflow would be a good resource of data. However, I have not seen any service at Stack Exchange or any 3rd party website displaying statistical trends on programming languages

I might be wrong and probably there is already a website displaying such information. If this is the case I will be a happy user of it!

EDIT

At the end I decided to download the data using the StackExchange API. A few days later I wanted to give a try to Flask, so I used my own need to build a simple website to display the number of questions per tags. In case someone needs the same information as I needed a few weeks ago, now you can find the very simple application I wrote at http://trendsoverflow.educalleja.es.

Note: I only needed information from the most relevant programming languages, so in this website you will only find the information for the top 100 most popular programming languages

6
  • Greg Hewgill put one together a while ago: meta.stackexchange.com/questions/23554/tag-trends-by-week Commented Jan 25, 2016 at 15:49
  • github.com/droyed/stackoverflow_tag_cloud EDIT: Ouch, wrong subset - this only takes users' tag activity. Commented Jan 25, 2016 at 16:11
  • 3
    popular languages that are designed to lead developers towards success can only be undervalued when compared using StackOverflow activity to popular languages that suck and confuse developers. Better to simply use the survey data.
    – user1228
    Commented Jan 25, 2016 at 16:57
  • I agree with your point of view, Won't. However, I was thinking of seeing a visual representation of StackOverflow's activity and did not find anything. I found the posting Brad Larson as mentioned but the data is to old, only containing samples until 2013. Anyway, I might play a little bit with the API to render the information I require.
    – educalleja
    Commented Jan 26, 2016 at 1:21
  • Not about trends but tamgentially relevant: langpop.corger.nl graphs languages according to stackexchange tag usage and lines changed on github. Commented Jan 26, 2016 at 17:11
  • 1
    Your most recent edit should probably be an answer.
    – ale
    Commented Feb 27, 2016 at 14:38

1 Answer 1

6

It is great that there are initiatives to provide data-visualizations of trends on Stack Overflow. I'm not sure if the trends found on Stack Overflow are representative for the industry but if it is used as a first idea for an hypothesis I don't there is much harm. For me it offers an opportunity to craft another sql-query than can be instantly used and forked on the Stack Exchange Data Explorer with data that is about a week old (refreshed on Monday 03:00 UTC).

Looking at your website I fiddled with the following query to mimic something similar. And here is version that takes the tags as a parameter, separated by a pipe-symbol

select *
into #selectedtags
from 
(
-- add unions as much as you like
      select N'python' as tagname
union select N'c#'
union select N'java'
union select N'javascript'

) as selection


declare tag_cur cursor for 
        select tagname 
        from #selectedtags
        order by tagname
declare @curr_tag nvarchar(25)
declare @main_insert nvarchar(max)

set @main_insert = 'select dateadd(m,  -datediff(m, p.creationdate, getdate()),getdate())'

open tag_cur;
fetch next from tag_cur into @curr_tag
WHILE @@FETCH_STATUS = 0
BEGIN
-- use a different aggregate here if needed
set @main_insert = @main_insert + ', sum(case 
          when t.tagname ='''+ @curr_tag + ''' 
          then 1 
          else 0
          end) as ['+ @curr_tag+']';
fetch next from tag_cur into @curr_tag
END
close tag_cur;
set @main_insert = @main_insert + '
from posts p
inner join posttags pt 
        on pt.postid = p.id
inner join tags t 
        on t.id = pt.tagid
inner join #selectedtags st 
        on st.tagname = t.tagname collate database_default
and p.creationdate < eomonth(getdate(),-1) -- full month only
group by datediff(m, p.creationdate, getdate()) -- whole months
order by 1 desc'

print @main_insert
exec (@main_insert)

/*
-- this is what the query looks like that gets dynamically generated
select dateadd(m,  -datediff(m, p.creationdate, getdate()),getdate())
     , sum(case 
          when t.tagname ='python' 
          then 1 
          else 0
          end) as [Python]
     , sum(case 
          when t.tagname ='java' 
          then 1 
          else 0
          end) as [java]
     , sum(case 
          when t.tagname ='c#' 
          then 1 
          else 0
          end) as [c#]
from posts p
inner join posttags pt on pt.postid = p.id
inner join tags t on t.id = pt.tagid
inner join #selectedtags st on st.tagname = t.tagname collate database_default
and p.creationdate < eomonth(getdate(),-1)
group by datediff(m, p.creationdate, getdate())
order by 1 desc
*/

If you run this you can click the graph tab to get this result:

graph trends

I wanted to make it easy to add extra data series for different tags and this why the query is created dynamically and then executed.

To have a look at different tags fork the query and change or add/remove in this bit:

-- add unions as much as you like
      select N'python' as tagname
union select N'c#'
union select N'java'
union select N'javascript'

as much as you like (until either the graph chokes or SEDE times out).

In the SEDE query you'll also find my original start query to give you and ready made and usable start point without the dynamic handling noise.

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