How to Create a Datazar Chart (GUI)
In this guide we will go through the steps needed to create a chart. Charts on Datazar provide a GUI (Graphical User Interface) so there is no need to code or program anything.
Selecting the Dataset
The first thing you need when you want to create a chart is the data. Navigate to any of your datasets. If you don't have a dataset yet, go ahead and upload one or create a new one. The guides for uploading and creating a dataset can be found here and here, respectively.
Once you're on the dataset file page, you'll see a bunch of icons below the dataset preview. The box that contains these icons has the title 'Visualize Your Dataset in Your Browser.' These icons all represent the different charts you can create for your dataset. For this guide, let's pick the 'Area Plot.' It's the first icon in the grid.
When we click it, we'll get redirected to the chart dashboard immediately where we can start pdjusting the parameters. There are a few parameters we can play around with in the chart dashboard, but let's pick two now: the rows we want to visualize and the columns. There are other things we can change, like the theme (we'll use the 'Light' theme here).
The rows selectors help with adjusting what part of the dataset you want to visualize. For example: row 24 to row 131. Doing this will help visualize only the needed parts of the dataset.
The column selectors allow us to select exactly what columns we want to visualize. You can add and remove any of the columns. You can visualize multiple columns or just a single column. Depeding on the type of chart we're creating, the columns will be divided in axes. For example in this 'Area Plot' chart, we'll have a two axes: the 'X-Axis' and the 'Y-Axis.' In the map charts for example, we'll have the axes 'Latitude' and 'Longitude.'
Once you have selected the rows and columns, it's time to render the chart. To render the charts, we use the 'Render' button located on the top left corner of the chart dashboard. Right next to it is the 'Save' button that allows us to save the changes to the chart. Once the render shows the chart, go ahead and click on the 'Save' button to make sure all changes are saved. And that's it! You have created your area plot.
R Plot Function - The Options
R's plot function is probably the most used visualization function in R. It's simple, easy and gets the job done. It's also highly customizable. Adding unnecessary styling and information on a visualization/plot is not really recommended because it can take away from what's being portrayed, but there are times when you have just have to. Whether it's for pure aesthetics, to convey multiple things in one plot, or any other reason, here are the options you can use in R's base
The Data Points
We're going to be using the
So if we were to simply plot the dataset using just the data as the only parameter, it'd look like this:
The default data points are circles with an empty fill. To change the style of the dots (the data points), we use the option 'pch':
The 'pch' accepts several codes, here is a grid with all the different data point styles (the default is 1):
Data Point Size
To change the size of the data point, we use the 'cex' option:
Data Point Color
The default color for the data points is black, to change that we use the 'col' option:
The 'col' option takes in both words and integers to identify the color. So you can use words like 'green', 'wheat', 'red' etc... and color codes. To get all the colors, just run
If you work in a team, or even if you work alone (but especially if you work with a group), always label your axes. If the dataset you're using has headers or column titles, the plot function will automatically use those as the labels for the plot axes. To add your own, use the
Plot legends can be called using the
You want the legend symbol to match the symbol used in the plot. The legend takes in the same pch codes used in the
These are just what I call the essentials, a lot more in the documentation (see below).
And that's it. Like I said before, there are several other options you can use like regression/trend lines, plot sizing etc... These are just the essentials when you want a little something extra on your visualization. In particular stages of the data analysis process, the less you add to your plots, the better.
References and Documentation
Plotting Multiple Columns in D3
From the wide range of things you can do with D3, still one of the best things to make is the timeseries plot. In this post, I'll walk through the basics of making a multi-column point plot/scatter plot. We'll use a GISS dataset from NASA; dataset can be found here.
Loading the Dataset
First things first, let's load the dataset into the visualization using the
Loading Libraries (optional)
Now that the dataset in contained in the variable "data", let's setup the libraries we need. In this case we only need one external library, the
Defining the Columns
Since we're not going to be using all the columns from the dataset, we need to define which columns we're going to be plotting.
Once we have defined the columns, let's also define what our x-axis is going to be; it's the years in the dataset. And then let's declare what our axes labels are.
Getting Started With Datazar
Hello and welcome to Datazar! We're glad to have you here. This guide will help you get started with Datazar and show you everything you need to get up and running with your first project.
Completing Your Profile
The first thing you should do when you join Datazar is complete your profile. When you first sign up, you'll get a chance to do that as the on-boarding process will ask you to input a few things about yourself. If you skipped that part, don't worry we all do it, you can always naviagte to your settings and update your information.
The reason it's important to have a full profile is that when you publish your data and/or research, people who consume it have higher confidence in it and you if they know you're a real person.
So having a full profile always boosts people's confidence in your work.
Creating Your First Project
Projects are where all your data, scripts and any other material go when you're working on a particular research project. Let's use an example project. We'll call it 'Project Sigma'. Everything that has anything to do with that research project will go under 'Proect Sigma'.
When you first register, you'll have a default project called 'Getting Started.' This project has a few examples including datasets, r scripts, charts and LaTeX documents. It's your sandbox when you want to experiment as a new user.
Back to 'Project Sigma.' To create a new project, click on the 'New Project' button located in top right corner of any page. This button is available on any page once you're logged in. Clicking on it will prompt a popup with a few fields.
Enter 'Project Sigma' in the field 'project name' and then enter a project description (it's optional). Lastly, choose if you want to make your project Private or Public. To create a Private project, you must have a Student, Pro or Team account. You're all done, click on the button 'Create Project' and you'll be taken to your newly minted project.
Uploading Your First File
Uploading files is a breeze. First navigate to any of your projects. If you're following from the above section, navigate to the projet we just created-'Project Sigma.' You'll be greeted by the Overview section. In the Overview section, there is a grid of file types you can choose from to create. There is also a button with a plus sign on it and the text 'Upload File.'
Once you click on it, you'll see a popup. Click on the 'Choose File' button to select a file from your computer. Fill out description field if you want to describe what the file is about (always recommended if you want people/collaborators to understand easily).
Once you have selected the file, you can optionally change its name on upload by editing the 'name' field next to the 'Choose File' button. If you're done, click on the 'Upload' button. And that's it! The 'Upload' button will appear grayed out and disabled if you haven't selected a file from your computer. Once a file is selected the button will glow green letting you know you're all set for upload.
Creating Your First File
In Datazar, you can upload files and you can also create files directly from your browser. The list of supported files that can be created is always growing so be sure to check the product page for updates.
For this example, let's create an R Notebook. An R Notebook let's you run R commands and get results in realtime all in your browser.
Navigate to any of your projects and you'll land on the Overview section. The overview section contains a grid of file types you can choose from to create.
For this example let's click on the blue 'R Document' button. This will prompt a popup asking us what type of R Document we want to create. We can choose between 'R Console', 'R Notebook' and 'R Script' but for this guide we'll go with R Notebook.
As soon as we click on 'R Notebook', we'll be redirected to the notebook interface to start typing R notebooks!
Using the API
Datazar has a full REST API where you can stream data and send data directly. If you have devices that you want to send data or have applications that consume some data, you can connect them to the Datazar API and have them send data to and from datasets in your projects.
The API inherits the permissions you set from your projects. Private datasets won't be accessible by users who do not have access to them through the Datazar web interface. To view the full documentation of the REST API, head over to docs.datazar.com.
To access the REST API, you'll need an API token. API tokens let you access the API and serve as your password to the API so that you don't have to use your account password. Tokens can be revoked at anytime by the owner (the account that created them). There is no limit to how many tokens you can create.
To create a token, head to the settings page of your account. Tokens are project and file agnostic so you create them from your account settings and not from the project settings. The settings can be found by click on your profile picture in the top right corner of any page. The profile picture will display a dropdown. Click on 'Settings.' Once on the 'Settings' page, navigate to the 'Tokens' section. All you have to do now is click on the 'Create New Token' button. This will display a popup where you have to name the token for reference purposes.
Once you're done naming the token, click on the 'Create Token' button. And you're done! When you have clicked the 'Create Token' button, you'll be asked to save the token. For security reasons, this will the only time the token will be displayed so go ahead and click on the 'copy' button. This will copy the newly created token to your clipboard so you can paste is somewhere safe.
Finding People and Projects on Datazar
One way to make the most out of your experience with Datazar is to follow different people and collaborate on projects you find interesting. Did you know you can contribute data and help with analyzing datasets on any public projects?
To find people and projects, head over to the Explore Page and filter using keywords that interest you. In the same note, having tags in your profile ensures people with similar interests follow you and contribute to your open projects.
And that's it! We hope this has helped in getting started with Datazar! Don't forget, you can find more guides on docs.datazar.com/guides. If you have any questions, don't hesistate to contact us on firstname.lastname@example.org.