DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
What's in store for DevOps in 2023? Hear from the experts in our "DZone 2023 Preview: DevOps Edition" on Fri, Jan 27!
Save your seat
  1. DZone
  2. Data Engineering
  3. Data
  4. Analyzing Stack Overflow Developers Survey Dataset With MongoDB Charts

Analyzing Stack Overflow Developers Survey Dataset With MongoDB Charts

MongoDB Charts is a great tool for analyzing and visualizing your datasets. Read on for quick run through of how to work with MongoDB Charts!

Atish A user avatar by
Atish A
CORE ·
Dec. 19, 18 · Tutorial
Like (5)
Save
Tweet
Share
7.38K Views

Join the DZone community and get the full member experience.

Join For Free

Visualizations allow understanding and communicating your data to find patterns and trends within your datasets. MongoDB Charts is a visualization tool to create meaningful visualization of your MongoDB data.

Why MongoDB Charts?

The existing ways to visualize and analyze your MongoDB data is writing your own custom code to visualize data sitting in MongoDB or exporting MongoDB data to external ETL pipelines and visualize it using BI tools or use MongoDB connectors to export MongoDB data in BI tools and create visualizations. Using MongoDB charts allows you to take advantage of built-in aggregation frameworks and preserves the richness of your data using nested arrays and objects in your charts.

Setting Up Your Environment

This hands-on tutorial involves setting up working components to analyze Stack Overflow 2018 Developer Survey data using MongoDB charts:

  1. MongoDB Server (Running on your local machine, AWS EC2 or MongoDB Atlas): Guide
  2. MongoDB Charts Application (Runs inside a docker container): Guide
  3. Stack Overflow 2018 Developer Survey Dataset (Available on Kaggle public datasets).
  4. Import Stack Overflow 2018 Developer Survey Dataset to MongoDB server.

Upon completing the environment setup successfully, you should be able to connect a charts application to your browser on port 80. Log in using username and password created in Step 2.

Image title

Import Dataset to MongoDB

Import Stack Overflow 2018 Developer Survey Dataset to MongoDB server:

 mongoimport --host `hostname` --port 27017 --db stackoverflow_survey --type csv --headerline survey_results_public.csv

Create Data Source in Charts:

Image title

The newly created data source will be listed in charts:

Image title

Create a Dashboard and Start Building Charts

Image title

Chart 1: Developer Demographics by Country

Choose the stackoverflow_survery data source from Data Source. From the Fields section, select Country key and drag the Country to Y-axis encoding channel. This determines which key to aggregate on.

Select _id from Fields section and drag it to the X-axis encoding channel.

Select AGGREGATED_VALUE on the Y-axis menu and sort descending from 9-1.

Apply appropriate filter to filer "NA" values from your result.

Image title

Chart 2: Commonly Used Communication Tools

Image title

Chart 3: Operating System Primarily Used by Developers

Image title

Add All the Charts to the Dashboard

Image title

Summary

This was a getting started guide with MongoDB Charts. Explore more powerful features of MongoDB charts and build dashboards for your data using this guide.

MongoDB Chart Stack overflow dev Overflow (software) Data (computing)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Spring Cloud: How To Deal With Microservice Configuration (Part 1)
  • Unleashing the Power of JavaScript Modules: A Beginner’s Guide
  • The ChatGPT Model: A Real-Life Example
  • Leaders Make Their Own Problems

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: