Releasing the StackLite Dataset of Stack Overflow Questions and Tags
Stack Overflow has introduced a new resource called the "StackLite Dataset". Read on to find out more about it and what it can do for you.
Join the DZone community and get the full member experience.Join For Free
at stack overflow we’ve always been committed to sharing data: all content contributed to the site is cc-by-sa licensed, and we release regular “data dumps” of our entire history of questions and answers.
i’m excited to announce a new resource specially aimed at data scientists, analysts and other researchers, which we’re calling the stacklite dataset .
what’s in the stacklite dataset?
for each stack overflow question asked since the beginning of the site, the dataset includes:
- question id
- creation date
- closed date, if applicable
- deletion date, if applicable
- owner user id (except for deleted questions)
- number of answers
this is ideal for performing analyses such as:
- the increase or decrease in questions in each tag over time
- correlations among tags on questions
- which tags tend to get higher or lower scores
- which tags tend to be asked on weekends vs weekdays
- rates of question closure or deletion over time
- the speed at which questions are closed or deleted
examples in r
the dataset is provided as csv.gz files, which means you can use almost any language or statistical tool to process it. but here i’ll share some examples of a simple analysis in r.
the question data and the question-tag pairings are stored separately. you can read in the dataset (once you’ve cloned or downloaded it from github ) with:
file has one row for each question:
file has one row for each question-tag pair:
as one example, you could find the most popular tags:
or plot the number of questions asked per week:
many of the most interesting issues you can examine involve tags, which describe the programming language or technology used in a question. you could compare the growth or decline of particular tags over time:
how this compares to other stack overflow resources
almost all of this data is already public within the stack exchange data dump . but the official data dump requires a lot of computational overhead to download and process (the posts fit in a 27 gb xml file), even if the question you want to ask is very simple. the stacklite dataset, in contrast, is designed to be easy to read in and start analyzing. (for example, i was really impressed with joshua kunst’s analysis of tags over time , and want to make it straightforward for others to write posts like that).
similarly, this data can be examined within the stack exchange data explorer (sede), but it requires working with separate queries that each return at most 50,000 rows. the stacklite dataset offers analysts the chance to work with the data locally using their tool of choice.
i’m hoping other analysts find this dataset interesting and use it to perform meaningful and open research. (be sure to comment below if you do!)
i’m especially happy to have this dataset public and easily accessible since it gives me the chance to blog more analyses of stack overflow questions and tags while keeping my work reproducible and extendable by others. keep an eye out for such posts in the future!
Published at DZone with permission of David Robinson. See the original article here.
Opinions expressed by DZone contributors are their own.