Closed venkatrajam closed 4 years ago
js=Java Script P5.js is a JS library created by Lauren McCarthy which allows for a sketch-based approach, built on Processing. It was started with the goal of make programming available to artists, designers, educators, beginners, which makes it a good starting point for design students, especially those new to coding.
Here's an Introduction to P5 which has some pretty good documentation covering different aspects of it.
P5 allows us execute a lot of creative projects, with easy to handle code. It's not just for handling data, but can be utilized for data visualization. The P5 code is contained in a JavaScript file (the 'sketch'), which uses variables and keywords along with some special functions. Some of these functions are:
We can use an HTML file is used to wrap the JavaScript sketch so as to run it on the browser, or can make use of the Web-based P5 editor which runs online (however, it cannot run off a local server, which is often required when we source data locally from our devices). The HTML file looks something like this:
In this example, "sketch.js" is the JavaScript file which contains the actual code for the P5 sketch.
I started learning P5.js only a few days before taking the tool tute in class, meaning to say, the 'newbie' perspective was pretty fresh. From this angle, I can go on and say that it is fairly easy to progress after a couple of false starts/teething trouble, till we get the hang of the basic working of the tool. Once that is out of the way, the tool is flexible and extremely fun to play around with!
Some interesting examples (particularly from our perspective of Data Visualization) that I came across are here: This very Basic Bar Graph example which we can modify as per our requirements This Codepen with an animated Circular Array of Bars This geo-visualization in the form of a Cost of Living Map
There aren't too many DataViz-specific examples of P5, probably owing to the fact that P5 can be used for a variety of creative projects, not all of which are data-driven
I found an article by the Visual Data Analysis Lab here which looks at hands-on data visualization using P5, and I tried to follow along with the project discussed here. The project included a nice, clean dataset of different flights in the airports across the world, which the article discussed how to color-code as international and domestic. I further modified it to generate a tool which could be used to explore connecting flights, which looked somewhat like this:
P5 can handle data by accessing it live from online sources, or in the form of JSON or CSV files.
The advantage of using a JavaScript library (which applies to P5 as well) is that it can be extended to suit our purpose. This is done through using other libraries. Some libraries which can be particularly useful to us in our endeavour to visualize data are:
Grafica.js - which is pretty versatile and specifically meant for 2D plotting of data. It is capable of handling a lot of data and some examples such as this bubble plot which lets us hover and zoom interactively.
Mappa - lets us create some pretty good geo-visualizations with inbuilt map data
P5.Play - a fun library which makes use of sprites for animation, and can be used to quickly scrub through well-designed static visualizations to animate them with a few lines of code
Depending on our intended use-case, there are several libraries which can help us achieve our goals easily, with reduced coding-effort.
P5. js is a very versatile tool, and can be used effectively for Data Visualization among other forms of visual coding. However, it is not as data-driven as some other tools like D3.js, nor as objective-focussed as Chart.js or Timeline.js. As it is not directed towards dataviz, finding relevant examples or tutorials can be tricky. Certain basic functionalities of the library can be difficult to discover for a newbie, but the documentation helps. That being said, it is a very handy and powerful tool, and is extremely flexible, giving us as much control as we'd like to have. As the essential part of the code is only a few easy-to-apply lines, it makes for a good transition into coding for beginners, while it can be expanded to adapt to our specific goals depending on our skill level.
Hope I've covered the basics of the tool to make you interested enough to try it out for your next design project, especially if you're planning to create something wonderful with lots of data and a bit of code. The original presentation which I made in class is here
Happy Data Visualizing! -Maulashree
This was one of the easiest and quickest tools. To demonstrate the tool, I decided to use the data from the DVS and show a live demonstration of how to create a chart using DataWrapper. It functions like most other tools:
Step 1: Select the template you want to reuse Step 2: Upload Data Step 3: Check and Describe the Data with attributes Step 4: Proceed to visualization (customize it to your taste) Step 5: Publish it online/ use the code to embed in your website
Some key points to remember if you want to use DataWrapper:
I found this resource extremely useful to analyse the tool. In conclusion, if you are in a hurry to create a simple visualization, DataWrapper is what you need.
Last Edit 27/10/2019
R is a language and environment for statistical computing and graphics.
Stats + Graphics = Data Visualisation
Shiny is a way to share interactive Data Visualizations made in R on the Internet.
The Shiny Parts of R Shiny:
A general rule would be to use R Shiny when dealing with complex data, complex visualisations, or when you want complete control over everything in your visualisation.
The not-so-Shiny Parts of R Shiny
The slides used in class can be found here. Please go through the presentation to see the list of nice Shiny examples, as well as the nice Shiny typography I used in some places.
Before the presentation, I had asked people in class to:
I based my presentation on this incredibly accessible tutorial by the good people at R Studio. It covers everything you need to know about Shiny, and you can get started even if you have little to no knowledge of R.
Apart from that, the best way to learn about R is to have a reason to learn it and begin from there. The R Cookbook is a great place to start learning to code in R, and I've included it in the resources folder linked above. Some general resources for R Shiny are linked below:
In case you have any questions about R or Shiny, feel free to ask.
That's all for now, Rishi
👋Hello all, Observable is an interactive playground for D3 data visualisations. Let's look at how to use it today.
Contents:
An american computer scientist who co-created D3.JS has developed Observable HQ. This is a fast and robust online playground for data visualisation and analytics. You can take a look at his notebooks here.
A place to quickly write complex data visualisations built on D3. This opens to the true development of D3 and allows you to download, fork, collaborate.
Becuase observable allows you to connect to any dataset and databases with D3 and various other scripting techniques lot of people have made cool visualisations and blew my mind. Find insipiration here.
Observable works on github so you can fork, share, merge. But you can also publish on observable or download the code and include in your source code. Learn more about sharing here.
Observable is an monster web app 😎Start exploring this right now.
`
Chart.js is a JavaScript library that allows you to draw different types of charts by using the HTML5 canvas element.
There are 6 basic charts that you can create on chart.js:
The java script, which can be downloaded via NPM, is wrapped in an HTML tag, and the charts are displayed as part of the webpage through a canvas element
.
Documentation for this can be found here. The documentation contains the links to getting the package installed and some starting points with many examples.
The JS part involves defining the arrays that appear on the X and Y axis. This can be done by linking the script to a csv or, in the case of small number of data points, by defining the array.
The canvas element is referenced back and there are various parameters that can help define the look of the chart.
Chart.js is a very quick and easy tool to make interactive visualisations that look really good, without needing as much effort as is needed with other charting libraries such D3, P5, etc.
It is a product of Stanford’s Humanities + Design Lab, a web based visualization tool for complex humanities data.
Fair warning : Lots of bugs, so needs patient handling. Also if you refresh the page you lose everything, if your tab accidentally closes you lose everything, if you go back you lose everything.
Here is a set of tutorials I used for understanding the tool.
RAW is an open source web tool developed at the DensityDesign Research Lab (Politecnico di Milano) to create custom vector-based visualizations on top of the amazing d3.js library by Mike Bostock. This is one of the simplest data visualisation tools available
Steps to create a plot
Pros:
Cons: The limitation is mostly at the mapping dimension. its not flexible enough to interchange numbers and strings. Its restricted to predefined parameters.
About Leaflet Leaflet is an open-source JavaScript library that allows for the development of mobile-friendly interactive maps.
Getting Started Leaflet library is well documentation and supported by lots of plugins. To set-up and start, I would recommend to follow the tutorials. Leaflet allows you to make custom made geo-markers, with pop-ups. As it supports GeoJSON files, one may mark areas or territories, make choropleths or may use multiple markers for the geo-location. Its functions gives us immense zoom controls and may group or separate data points depending on zoom levels.
Following which one may create a static or interactive heatmap, or develop custom game maps or everything that's possible using JS. It also supports video overlays triggered and controlled upon use of the webpage.
P.S.: The library supports both Mapbox and Open Street Maps map tiles, though mapbox map API's require an access token key to be procured from the respective mapbox user.
***Tangle Tangle is a JS library to make reactive HTML documents. It is used to make explanatory content which the reader can interact with and explore.
There is unfortunately little documentation about the library as it was built as an experiment, but it has interesting implementations.
For the presentation, I made a reactive document that could help explore how the P and T stat in the ongoing DRM course worked. The html file can be accessed here.
Accompanying that was a presentation that you can go through which talks about the ways this library can be used and how it compares to other JS libraries which are more broad.
Thanks!
Circos is a free and open source software package for visualizing data in a circular layout i.e. as chord diagrams. It has been featured in many scientific and other publications (including the covers of both Science and Nature), so it's safe to say science people really like it.
Circos is ideal for creating publication-quality infographics and illustrations with a high data-to-ink ratio, richly layered data and pleasant symmetries. You have fine control each element in the figure to tailor its focus points and detail to your audience.
Circos is used extensively for the analysis of genomic alterations over time, or differences between two or more genomes. You can take a look here.
From the Circos landing page…
Creation of images is controlled through a plain-text configuration file. There is no interactive user interface. This approach to configuration should be very familiar to you if you have UNIX experience.
The emphasis here is mine, but after spending a while trying to understand the complex system of config files you need to setup, I realised that there is also an online version called Circos Online that allows less flexibility and customization options, but can still be used for visualizing simple tables.
Now that we know what Circos can do, let's try and use it!
You can pick whatever you like, but I decided to visualize the patterns in key issue and return for the media lab at IDC. I used the last two filled pages of the key register, which looks like this:
Circos uses :
Chances are you have your data in a table, isolate just the two values you'd like to look at the relationship between. In my case, I took just the name of the person issuing the keys, and the name of the person returning the keys.
But that poses an issue as Circos can't technically represent tables.
What Circos can do is represent matrices. What's the difference? In mathematics, a matrix is a rectangular array of numbers (whereas a table can have any kinds of values).
The matrix takes each pair of (key-in-person, key-out-person) data and inserts +1 into the corresponding position on the matrix. I did this manually, but if you can code, it's essentially a matter of converting key-value pairs into a matrix .
Also remember to put the text "labels" on the top left cell, or Circos Online won't accept the input. Make sure your headers don't have any spaces in them, or Circos will fail and throw a bunch of scary looking errors at you.
In Google Sheets, go to File
> Download
> Tab-separated values (.tsv, Current sheet)
Upload the .tsv to Circos Online. Leave the checkboxes unchecked for now and click on Visualize Table
.
It may take a few seconds to load, but once it does, you can pat yourself on the back for a beautiful data visualization.
You can now download a large image
or a zip with data, images (PNG/SVG) and configuration
from Circos online.
This data comes from the Data Visualization Community Survey 2019 Challenge.
I extracted the education and gender for people who responded to the survey, and got this.
Education | Gender | Count |
---|---|---|
Masters | Man | 353 |
Bachelors | Man | 291 |
Masters | Woman | 198 |
PhD | Man | 143 |
Bachelors | Woman | 128 |
PhD | Woman | 72 |
Technical School | Man | 31 |
Masters | Prefer not to say | 11 |
Bachelors | Prefer not to say | 9 |
PhD | Prefer not to say | 5 |
Technical School | Woman | 4 |
Bachelors | Non-binary | 2 |
Masters | Non-binary | 2 |
Masters | Woman | 2 |
Technical School | Non-binary | 1 |
PhD | Non-binary | 1 |
After (once again, manually) converting to a matrix, we get this matrix.
labels | Man | Woman | NonBinary | PreferNotToSay |
---|---|---|---|---|
Bachelors | 291 | 128 | 2 | 9 |
Masters | 353 | 198 | 2 | 11 |
PhD | 143 | 71 | 1 | 5 |
TechnicalSchool | 31 | 4 | 1 | - |
The result looks something like this:
Content of presentation: Introduction User interface and feature Working demo What’s Working & What’s Missing
Introduction:
It is just a free data visualization tool by Google
Google data studio is based on the simple principle
Connect visualize and share.
It has a simple drag-and-drop interface, so anyone with a Google account can easily add charts and build reports without needing any deep technical knowledge.
Data Studio dashboards consist of two parts:
the dashboard and the data source.
- you can add data from google drive, google analytics, other google sister app as well as third-party app.
third party apps and many more app
User interface and feature the starting screen of the Google data studio has three tabs below the header and one left sidebar
Reports let you visualize your data, gain insights, and share those insights with others.
Working demo
Connecting Data Studio to your other account systems from data source (ex. google sheets, google adsense, google drive, or any other supported third party app)
go to create
data source and connect data source app such as google analytics, google sheets or upload the data.
Once you've added a data source to your account, it's available for you to use anytime you need. Data sources provide a live connection to your Google data studio.
Explore or create report
Data sources let you manage connections to your data and configure the fields you can use in your report.
you can adjust connections ex. field, type of field, descriptions aggregate etc to create report and chart after that click on create explore or create a report.
you will get an option to customize charts according to your data set sorting and formating. you can customize style, data set of report
this option is available at the right sidebar of the interface.
by customizing the report artboard and adding various chart type you can create and visualise data.
What’s Working & What’s Missing
Google data studio is not limited to just 18 widgets You have the ability to add as many report pages as you would like You can connect reports with multiple Google Analytics accounts and views. More inclined towards business than data visualization.
What’s Working
what's missing
Not Enough Visualization Options
the variety of charts and visualization options are missing from google data studio. other data viz tools like flourish data, data wrapper has many visualisation options.
you can see on right sidebar, the chart options and type are restricted to less options
the link to the final presentation is here
Candela is an open-source suite of interoperable web visualization components for Kitware’s Resonant platform. Candela focuses on making visualizations available with a normalized API for use in real-world data science applications.
Here is the documentation of Candela.
With some knowledge of programming, one can learn to create visualizations. Those who are not equipped with the coding skills can use the Resonant lab tool for creating visualizations.
The Resonant lab tool is available in beta and is fairly easy to use but it is limited by the quality of tools. There are a few bugs in the tool that have not been solved yet. overall, it can be used for basic level data visualizations.
Here is the link for the presentation of a tool that includes introduction to Candela and Resonant lab.
I won't suggest this as a good tool for data visualization because of poor quality outcomes and fewer tools available on the platform. Moreover, no tutorials are available to learn the Candela tool and the documentation available on their website does not really help in guiding how to use.
That's all, Thanks!
In this assignment each of you will select one of the following 18 tools, explore it as thoroughly as you can (download, install, tryout, and use it to create something), and do a demonstration/overview of the tool to the rest of the class. The objective is to introduce the tool to the class, and highlight its possibilities & limitations so the audience can make a well informed choice of available tools. In your comments include links to the resources you used (if any) in your presentations, capturing your personal insights about the tool, and a carefully curated set of related resources.