How Devographics Surveys Are Run, 2022 Edition
Published: 2022-11-30 04:00:48

---
title: How Devographics Surveys Are Run, 2022 Edition
published: true
description: An updated overview of what it takes to make the State of JS and State of CSS surveys run (more or less) smoothly
tags: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jv1mp6zxv4sdej3klrm4.png
---

(You can find an updated version of this post [here](https://dev.to/sachagreif/how-the-devographics-surveys-are-run-2023-edition-1p6a))

(Note: this is an updated version of [the original post from 2021](https://dev.to/sachagreif/how-the-state-of-js-css-surveys-are-run-4lnb))

People sometimes ask me how they can help contribute to the [State of JS](http://stateofjs.com/) and [State of CSS](http://stateofcss.com) surveys.

To make our convoluted infrastructure easier to understand, I thought I'd write down once and for all an exhaustive list of everything that goes into running one of our surveys. Whether you're interested in contributing or maybe want to run your own, hopefully this list will do a better job than my off-the-cuff explanations usually do!

Here are the different areas of work, in a rough chronological order, from survey conception to releasing the results, along with a "help wanted" section that outline what needs we have for each step. 

### Survey Design

The first step with any survey is to come up with a list of questions. This means balancing several criteria such as:

- **Continuity**: asking the same questions as last year means we can analyze data over time.
- **Fairness**: we need to have a good rationale as to why we decide to include some libraries or projects and not others.
- **Inclusivity**: we need to make sure the language we use is inclusive and representative. 
- **Brevity**: the survey itself shouldn't grow too long.
- **Ability to Process**: we need to make sure we can actually do something with the data we collect.
- **Actionability**: will the data collected from a question make a difference? Are people interested in it?

All of this needs to be done in an open, transparent, and inclusive manner, and we use our [Working Group newsletter](https://www.devographics.com/working-group/) to keep everybody informed, and then [GitHub issues](https://github.com/Devographics/surveys/issues) to hold discussions. 

And while this step isn't really visible from the outside, I basically never stop contacting as many people as I can in between each survey to ask them if they'd be interested in providing their feedback to make the next one even better. 

##### Help Wanted

- Review the questions for accessibility and inclusivity
- Review the questions for technical accuracy
- Suggest new questions

### Survey Config

The result of this survey design process is the creation of YAML config files, which we store in our [main config repo](https://github.com/Devographics/surveys/), alongside with any survey-specific elements such as the GraphQL queries used to generate the survey's data, the data itself, and any survey-specific images. 

### Translation

Once the survey content is finalized in English, it can now be [translated into other languages](https://github.com/Devographics/locale-en-US) by our awesome community of volunteer translators. 

At this stage although we've finalized the contents of the survey itself, we haven't started writing the contents of the survey *results*. Still, in order to centralize translation we try to already anticipate what that will look like, and especially share as many strings as possible between the questions and results (as well as between different surveys). 

<figure><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y64epv7iqozdihyomp00.png"><figcaption>The survey results translated in Japanese</figcaption></figure>

#### Help Wanted

- Translate the survey in your language.
- Set up a separate API to serve translation data.
- Help set up a better translation workflow.

### SurveyForm App

With the questions translated, we can now launch the survey to collect data. 

In the past we've relied on third-party survey apps to do this, but we now have [our own data collection app](https://github.com/Devographics/Monorepo/tree/main/surveyform), which lets us do cool things like translate the UI in many languages and process data on the fly.

Note that this app, like most of our other code, lives in a central pnpm-powered [monorepo](https://github.com/Devographics/Monorepo).

This app is itself is a [Next.js](https://nextjs.org/) app that relies on [Vulcan.js](http://vulcanjs.org/), a full-stack JavaScript framework that I originally created for [Meteor](https://meteor.com/), and that [Eric Burel](https://twitter.com/ericbureltech) later ported to Next.js. But we will likely phase out the Vulcan.js part eventually to make it a more standard codebase. 

#### Help Wanted

- Improve survey app accessibility

### SurveyAdmin App

At this point there is also a normalization stage, where we copy any freeform data inputted by respondents into a more standardized format based on our own list of ["entities"](https://github.com/Devographics/entities) (frameworks, features, people, etc.). 

This is done through [a separate Next.js app](https://github.com/Devographics/Monorepo/tree/main/surveyadmin) that I basically only run locally on my own machine. Since that app has full access to our database, keeping it offline seemed safer from a data security point of view. 

#### Help Wanted

- Improve normalization logic

### Outreach & Promotion

A survey is no use if nobody fills it out. At this stage, I'll reach out to as many people as I can to help distribute the survey. 

This is a key stage because the channels we use here will influence the data we get in return. For example, this is where efforts to diversify our audience (whether in terms of gender, background, language, etc.) can come in. 

Although time-consuming, writing blog posts or guest posts at this stage can be a good way of generating additional interest around a survey. 

#### Help Wanted

- Help connect us to organizations such as [Girls Who Code](https://girlswhocode.com/), [Black Girls Code](https://www.blackgirlscode.com/), etc.
- Share the survey in non-English-speaking channels. 

### Data API

Once the survey is closed, we can now process the data. Our infrastructure at this point is still pretty ad-hoc. The survey app stores data in a Mongo database, and we have a separate Node app that uses Mongo aggregations to output that data in a usable format through our [GraphQL API](https://graphiql.devographics.com/).

<figure><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jvw55tgo73dlc2ocjwqk.png"><figcaption>Querying the API with GraphiQL</figcaption></figure>

This is another [fairly complex codebase](https://github.com/Devographics/Monorepo/tree/main/api), as we need to not only correctly process the data (which means both designing the right aggregations and calculations, and also implementing them correctly) but also make sure the API is designed in a way that makes sense and is easy to use for others. 

#### Help Wanted

- Write new aggregations and calculations.
- Rethink the API to better handle multiple different surveys.

### Internal API

Note that we also have [a *separate* Node API](https://github.com/Devographics/Monorepo/tree/main/api-internal) that mainly handles providing internationalization data.

We split out this part of the logic so that even if the data API somehow got overloaded or ran into any other issue, the separate internal API would still be able to provide translated content to the surveys. 

As a bonus the internal API codebase is also much simpler and easier to maintain compared to the "main" data API. 

### Survey Results

The next step is setting up the [Gatsby app](https://github.com/Devographics/Monorepo/tree/main/results) that power the survey results sites like [https://2021.stateofjs.com/](https://2021.stateofjs.com/) or [https://2021.stateofcss.com/](https://2021.stateofcss.com/).

This is no small feat either because these codebases have little in common with the typical Gatsby app. To begin with, each entire site is dynamically generated from a YAML file instead of relying on static `Home.js` pages.

We also handle internationalization, as well as generating permalinks and metadata for each individual chart. And all of this needs to be done in an accessible manner (which isn't quite the case currently, but is definitely high on the list of things to improve!). 

#### Help Wanted

- Help create a dynamic query builder to add filtering to charts.
- Create translation widget to translate strings in-line.

### Image Generation

As an aside, we even have a [separate little app](https://github.com/StateOfJS/capture) just for generating [image previews](https://github.com/StateOfJS/images) so that every chart can have its own thumbnail when you share it. 

#### Help Wanted

- Find way to integrate this step into build process of results app. 

### Data Visualization

While data visualizations are technically part of the survey result app, they're almost a whole step by themselves. 

First, we need to decide what we want to visualize, and how. This usually takes the form of either notebook sketches or rough Figma mock-ups. 

<figure><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/umsfbj6x22xzcl6aelk9.png"><figcaption>Experimenting with new dataviz ideas</figcaption></figure>

Then, we can think about the implementation. We use [Nivo](https://nivo.rocks/) for most data visualizations, but we do have a few that either use straight HTML/CSS, or use [D3](https://d3js.org/) directly. 

#### Help Wanted

- Create new data visualizations.
- Help fix readability/accessibility issues with current charts.

### Content Writing

We'll also typically at least write an introduction and conclusion, but often have section headings, picks, notes, etc. all of which will also need to be translated. 

This doesn't usually take that long, but it can still be hard to find time to fit it in given everything else that needs doing!

#### Help Wanted

- Write guest intros/opinions. 

### More Promotion

I don't do this every time, but this can also be a good time to keep interest alive with preview blog posts or even [small side projects](https://whatsmissingfromcss.com/) to tide people over until the full results come out. 

#### Help Wanted

- Create content around the survey.

### Sponsorships & Shirts

Although profit is not the main motivation behind the survey, I'm a big believer in trying to make any project as self-sustaining as possible, so I've been exploring different ways to monetize the surveys since the start. 

The two that have worked best so far are sponsorships in the form of sponsored resource links, and selling t-shirts. 

<figure><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hgmgiashe4z5ow2myhd2.png"><figcaption>A "CSS sky chart" t-shirt concept that never saw the light of day</figcaption></figure>

Sponsorships take time in the form of finding the right partners, emailing back and forth, and actually entering the content. 

As for t-shirts, while designing them is one of my favorite part of the entire process, it's also very time consuming. And so is setting everything up properly with the printer, to say nothing of handling logistics (although we now use [Cotton Bureau](https://cottonbureau.com/products/state-of-js-2020-edition) which manages everything for us).

#### Help Wanted

- Help connect us with new sponsoring partners.
- Wear our t-shirts!

### Project Homepage

Each survey homepage (stateofjs.com, stateofcss.com, etc.) is actually [generated from the same codebase](https://github.com/Devographics/Monorepo/tree/main/homepage) using [Astro](https://astro.build/), based on our global survey configs. 

#### Help Wanted

- Design better homepages.

### Launch & Livestream

After this ridiculous amount of work, it's finally time to launch! 

By now we have a sizable email list which ensures we won't launch to crickets, but I still try to encourage people to share the survey results as much as I can. I'm especially thrilled when I see that a podcast mentioned the results or that a YouTube channel reacted to them!

<figure><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nklx1t6670a9uykia6oa.png"><figcaption>The State of JS 2020 livestream</figcaption></figure>

We'll try to have some kind of special event, usually a [livestream](https://youtu.be/h2BITbzYX9I) to discuss the results with other community members. 

#### Help Wanted

- Share the survey results.
- Talk/write/podcast about the survey results.

---

So there you go. Even though we aim to reuse as many pieces of our stack from survey to survey, in practice we always need to invest time into maintaining or improving our processes.

Still, the reception we get from the community every time a survey is released makes it worth it! And if you're interested in contributing, hopefully this list will show you that there's definitely no shortage of tasks you can potentially help with. Just [come by our Discord](https://discord.com/invite/zRDb35jfrt) and say hello, or email hello at stateofjs.com!