Data Visualization for Web Developers

Rate this content
Bookmark

In this workshop, through hands-on projects we'll learn how to use Observable, a browser-based reactive coding platform, to rapidly build insightful, interactive visualizations in JavaScript. After completing this workshop, you'll have the basic tools & techniques you need to start using dataviz to better understand your code, your projects & your users, and make better data-driven decisions as a developer.

FAQ

Observable is a company that creates a JavaScript notebook environment designed for fast and easy data visualization in the browser. It allows users to quickly create and share dynamic visualizations and computational essays without needing to be an expert in JavaScript or data visualization.

Anjana Vakil is a Developer Advocate at Observable. She has a background in humanities, specifically in philosophy and linguistics, and has experience with Python, data analysis, and visualization before becoming a JavaScript developer.

Observable notebooks allow you to perform data visualization directly in the browser. You can write JavaScript code, visualize data dynamically, collaborate with others in real-time, and share your visualizations easily. It's particularly useful for quick explorations of data and creating interactive visual experiences.

No, you don't have to be an expert in JavaScript, data science, or data visualization to use Observable and create meaningful visualizations. Observable is designed to be accessible for users with varying levels of expertise, allowing them to leverage powerful visualization tools.

Observable is founded by Mike Bostock, the creator of D3.js. While D3.js is a lower-level library for creating complex, highly customizable visualizations, Observable provides a higher-level, more accessible environment that integrates D3.js for data visualization tasks directly in the browser.

Observable allows users to create notebooks where they can write JavaScript code to manipulate and visualize data. It uses a reactive programming model where changes in the data or code automatically update the visualizations. This makes it highly effective for dynamic, real-time data exploration and analysis.

Yes, Observable is highly suitable for educational purposes, particularly in teaching data visualization, programming, and data analysis. It allows educators and students to create interactive, dynamic content that can enhance learning and provide hands-on experience with real data.

With Observable, you can create a wide range of visualizations including charts, graphs, complex visual narratives, and interactive simulations. It supports integration with various JavaScript libraries like D3.js, allowing for extensive customization and creativity in visual representation.

Yes, Observable notebooks can be shared and collaboratively edited in real-time, making it an excellent tool for team projects and collaborations. Teams can work together on data analysis, visualization projects, and more, facilitating efficient teamwork and idea sharing.

Anjana Vakil
Anjana Vakil
139 min
16 Jun, 2021

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Today's workshop focused on data visualization in web development, highlighting its value in understanding user needs, optimizing feature development, and analyzing code bases. The workshop covered various topics such as data wrangling, mapping abstract data values to visual values, and using tools like D3 and Vega-Lite. Participants learned how to create visualizations using Observable notebooks, plot library, and different types of plots. The exercises included working with user behavior and device types, API responses, and adding interactivity to charts. Overall, the workshop emphasized the importance of data visualization in making informed decisions and accessing insights and analytics.

1. Introduction to Data Visualization

Short description:

Welcome, everyone. Today we'll explore data visualization and learn how to create meaningful visualizations without being an expert. We'll discuss what DataVis is and then dive into hands-on exercises to build our own visualizations.

Welcome, everyone. I hope you're all doing well. My name is Anjana Vakil. I am a Developer Advocate at Observable, which is a company that makes a JavaScript notebook environment for doing really fast, and quick, and hopefully easy data visualization in the browser, which we're going to be doing today. We're going to be working in the browser to do some data visualization. So you'll learn a lot more about that.

And I am usually based in San Francisco, California, in the US. But right now, I am coming to you from New York City. I can say a couple more words about myself. So I work as a developer advocate now. I have a background in not in computer science, but in the humanities. So in philosophy and in linguistics, and the social science of linguistics. And so I had some experience with Python and doing a little bit of data analysis and data visualization in that before I became a kind of full stack JavaScript developer a few years ago. working at Observable and kind of back to thinking about data and data visualization. But I definitely am not an expert in visualization. I work with a lot of experts in visualization, so they tell me what I'm wrong about things, which is great. But what I want to convey today is that you don't have to be an expert in JavaScript, in data science, in data visualization to create meaningful visualizations. So what we're going to do today is we're going to talk a little bit about what DataVis is. And I'm going to use DataVis a lot, because saying visualization takes forever. And then we're going to get really hands-on, and we're going to spend most of the workshop working on building our own visualizations. So we'll talk more about how we're going to do that in a moment.

We are going to probably take what we're going to be working, we're going to be alternating kind of talking as a group and working on our on our own hands free. So feel free to take breaks or turn off your video or do whatever you need to do. We're all in this virtual world together. So no worries if you need to drop out, come back, go off video, whatever. And I think I think with that, that pretty much covers our basis. We will definitely take breaks as needed. But please, you know, feel free to just just holler if you if you need a break or if you have any questions.

2. Data Visualization in Web Development

Short description:

Data visualization is the process of translating data into a visual representation, allowing us to quickly grasp the meaning and patterns in the data. As web developers, data visualization can help us with feature development, understanding performance, and analyzing code bases. By visualizing usage data, we can identify user pain points and prioritize feature development. We can also analyze performance data to optimize our sites and services. Additionally, visualizing code-related data helps us understand the development process and collaborate effectively. These are just a few examples of how data visualization can be valuable to web developers.

Alrighty. So hopefully, everyone can see my screen. So what I'm going to do is try to drop you all the link to these slides just in case anybody is having difficulty finding or seeing the slides. So this... Sorry. One second. Just making sure I have the right link here. Yes, I think so. Goodness, virtual life is hard. No? I think so. It's certainly a lot easier when we could all be in person. But then again, we wouldn't all be able to be scattered all over the world right now if we were at an in-person conference. Okay, virtual presentation, here we go. This link, let me know if it doesn't work for you, but it should be accessible, has the presentation that we're going to be going through. And if I can get my windows straight, okay. So data visualization, what is it, why do we care if we're web developers? And how can we go about starting to use data visualization to get some of our web development work done and level up as developers. That is what we're going to be digging into today. Okay. So what is data visualization? That is a complicated question with a lot of possible answers. One possibly boring, if very correct answer, would say that data visualization is the process of translating data, so some values in a spreadsheet or in a JASON object or something, into a visual, graphical representation of that data. So mechanically that is what we're doing when we're visualizing data. We're taking some numbers or some strings or some whatever values we have, and we're turning them into something we can see. But that's sort of a boring way to describe it. Because, like, what is that? Why is that important? Well, maybe it's important to us because data visualization is this big, fancy topic that lots of people are seeking out, people with skills in, and so it's like a fancy skill that we can learn and we can put on our resumes and put in our portfolios and get exciting new opportunities from, which is totally true. It's still not maybe the core motivation of why we as web developers should probably be interested in data visualization, although it is definitely a great skill to have and something that employers definitely value. So that's a bonus. But really, data visualization is a means to an end. The goal that we have when we have some data is to find meaning in that data, to find insights about the world or in our case, the web development that we're doing through that data. And so visualization, when we can actually see that data, can be a really great way to quickly grasp the meaning and the patterns in that data and what that data means for us in the real world. So that's where more we're getting into the core objective here. And as we said, the reason that we're trying to do that is because if we can quickly take a huge table or JSON file or whatever it is and understand what it means for our day to day lives as developers, we can do our jobs better. We can make better decisions. We can be more productive. We can learn insights about the things that we're building, the users that we're building them for. So that is really the motivation here. That is the idea of what we're trying to do. We are trying to use visuals to quickly discover meaning and patterns and insights from data.

Okay, so looking at data is pretty easy, like we can and let me know if this is too small, but we can we can take some data in a table and we can visualize it in the sense of just laying it out in a tabular format and seeing all the values. But what does this how easy is it to find actual meaning in data that's just laid out in a table like this? I think it's pretty hard, but if we turn that into a visual representation where here we're looking at some build times for integration test jobs, which we're going to talk a lot more about in our next project, we can see like, ooh, this, this, this lint job is running really quickly. But some of these tests on Mac os are taking forever sometimes and, you know, they're, the Ubuntu tests are a little faster. I use Ubuntu, so I like to see Ubuntu performing well. But anyway, that's neither here nor there. The point is, I think, and I don't know if you agree, but I think it's a lot easier to So that is the idea that we're that we're going for, with data visualization here. And of course, in our case, since we're web developers, we're going to be particularly interested in data relevant to our work building websites. OK. So now why, as we would we particularly, we web developers or aspiring web developers, be interested in doing data viz? Or how can it help us directly? So one thing it can help us with is feature development. So as we're trying to figure out new features for our websites, for the for the UIs that we build, for the products. We can look at usage data to see what are people really struggling with, or what are they missing, or what do other sites have that we don't. Like what should we build? What are some of the pain points in our user behavior, in our user workflows? Like what are the different use cases that people coming to our websites have? And how can we prioritize between them to really prioritize our precious development time? So we can we can do data viz before we build something to understand how, what we should build, and how we should prioritize our decisions around it. Then once we have built a feature, we can look at the data afterwards to see like, okay, how well is this being adopted? Is it actually serving the people that we were hoping to serve with it? Are they enjoying it? Are they using it the way we expected? Or are they using it in interesting new ways? And how can we continue to improve on it? How can we keep iterating on these features that we're building? Because if you're as a web developer, you often we're spending a lot of time kind of making gradual improvements and trying to give people a better and better user experience, in a lot of cases. Whether that be on the front end, in the UI, or in the backend, in terms of how people are using our APIs, or being able to get information from our site. So feature development and looking at how people actually use the things we build is one big area where visualization can be helpful. We're going to look at some examples of that in our projects today. Another thing that it can really help us with, and maybe you've seen this around the web world, is understanding performance. Understanding how our sites and our services are moving. Are they moving quickly enough? Are they doing what they're supposed to do, when they're supposed to do it, on a timeline that's reasonable? So how fast are we? How fast are our sites and our services? How reliable are they? Are they giving errors a lot of the time or are they giving people what they want? When they want it. Where are the little pain points, maybe in our performance? Where are the bottlenecks where we could most efficiently focus our energies to give people a more performant experience? And then once we've tried to look at one of those bottles and bottlenecks and make some changes to improve the performance of our site, we can look at the data afterwards to see how well that investment worked out for us, how well our efforts paid off. So performance is definitely another big area where as web developers we can benefit a lot from looking at our data visually. Another way that benefits us as web developers or whatever kind of software developers we may be is to look at data around the code we write, the code bases we work in, and how we collaborate on those code bases. And this is especially true for things like open-source data where we have big contributor communities, but even if we're working on closed-source internally to a company or maybe even on hobby projects, we can use data about the code and our Git commits and our changes to the code to understand things about how the process of development is working out for us. So for example, we can visualize how a code base is organized or how the development workflow is running, like are my teammates able to give me reviews on a timely manner, are the builds that we need to make in order to just have our kind of operational day-to-day as developers go smoothly, are they working well, how productive am I, how productive is my team, is my company, is my collaborator community in terms of are we taking a really long time to get to each other's pull requests, are we pushing a lot of code with a lot of errors that we have to then keep a rerunning, repushing to fix the integration tests and things like that. And if we have, if we do work in the open-source especially, we can understand like how many contributors do we have, how engaged are we, how can we help them have a better experience if we're open-source maintainers or if we're trying to learn how to contribute to a new project. We can understand the community that we're trying to join. So those are just a few of the areas where data visualization, I think can be really valuable to web developers in particular. But I would love to know and if folks want to share any thoughts either coming off mute or in the chat, if folks have seen any other really useful use cases for data visualization in the day-to-day life of a web developer. So if there's other things. I mean, these are just a few examples, but if there's other things that you've seen that well, you know, data is really helped me out in this case like we love to hear about them if you want to drop a note in the chat or come off mute and say hi. Okay, just going to give folks a second think on it and I am going to take a sip of water. Yeah, we use them a lot in like I work for a security company and we use them to make graphs of like attacks to people's products. So there's always like a history of like today, you were tagged once yesterday was three times and things like that and we have always like graphs available and they can filter on the time they want to be showing on the screen and things like that.

Watch more workshops on topic

Painting with Data: Intro to d3.js
JSNation Live 2021JSNation Live 2021
130 min
Painting with Data: Intro to d3.js
Workshop
Ian Johnson
Ian Johnson
D3.js is a powerful JavaScript library for building data visualizations, but anyone who has tried to use it quickly finds out that it goes deeper picking your favorite chart type. This workshop is designed to give you a hands-on introduction to the essential concepts and techniques for creating custom data visualizations with d3.js. By the end of this workshop you will have made an interactive and animated visualization on a realistic dataset that you can easily swap out with your own.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

(Easier) Interactive Data Visualization in React
React Advanced Conference 2021React Advanced Conference 2021
27 min
(Easier) Interactive Data Visualization in React
Top Content
If you’re building a dashboard, analytics platform, or any web app where you need to give your users insight into their data, you need beautiful, custom, interactive data visualizations in your React app. But building visualizations hand with a low-level library like D3 can be a huge headache, involving lots of wheel-reinventing. In this talk, we’ll see how data viz development can get so much easier thanks to tools like Plot, a high-level dataviz library for quick & easy charting, and Observable, a reactive dataviz prototyping environment, both from the creator of D3. Through live coding examples we’ll explore how React refs let us delegate DOM manipulation for our data visualizations, and how Observable’s embedding functionality lets us easily repurpose community-built visualizations for our own data & use cases. By the end of this talk we’ll know how to get a beautiful, customized, interactive data visualization into our apps with a fraction of the time & effort!
GPU Accelerating Node.js Web Services and Visualization with RAPIDS
JSNation 2022JSNation 2022
26 min
GPU Accelerating Node.js Web Services and Visualization with RAPIDS
The expansion of data size and complexity, broader adoption of ML, as well as the high expectations put on modern web apps all demand increasing compute power. Learn how the RAPIDS data science libraries can be used beyond notebooks, with GPU accelerated Node.js web services. From ETL to server side rendered streaming visualizations, the experimental Node RAPIDS project is developing a broad set of modules able to run across local desktops and multi-GPU cloud instances.
Never Have an Unmaintainable Jupyter Notebook Again!
ML conf EU 2020ML conf EU 2020
26 min
Never Have an Unmaintainable Jupyter Notebook Again!
Data visualisation is a fundamental part of Data Science. The talk will start with a practical demonstration (using pandas, scikit-learn, and matplotlib) of how relying on summary statistics and predictions alone can leave you blind to the true nature of your datasets. I will make the point that visualisations are crucial in every step of the Data Science process and therefore that Jupyter Notebooks definitely do belong in Data Science. We will then look at how maintainability is a real challenge for Jupyter Notebooks, especially when trying to keep them under version control with git. Although there exists a plethora of code quality tools for Python scripts (flake8, black, mypy, etc.), most of them don't work on Jupyter Notebooks. To this end I will present nbQA, which allows any standard Python code quality tool to be run on a Jupyter Notebook. Finally, I will demonstrate how to use it within a workflow which lets practitioners keep the interactivity of their Jupyter Notebooks without having to sacrifice their maintainability.
Sharing is Caring: Reusing Web Data Viz in React Native
React Summit 2022React Summit 2022
26 min
Sharing is Caring: Reusing Web Data Viz in React Native
At Shopify, the Insights team creates visualization experiences that delight and inform. We've done a lot of great work prioritizing accessibility and motion design for web. Our mobile experiences though, were a bit of an afterthought, but not anymore! In this talk, we'll go through how we created our data viz components library; How we encapsulated core logic, animation, types and even UI components for web and mobile; and also why keeping things separate sometimes is better - to create awesome UX.