INTRODUCTION Metricsgraphics is an htmlwidget interface to the MetricsGraphics.js JavaScript/D3 chart library. Usage Building metricsgraphics charts follows the “piping” idiom, made popular through the magrittr, ggvis and dplyr packages. This makes it possible to avoid one giant function with a ton of parameters and facilitates, breaking out the chart and building into logical steps. While […]
Exercises (beginner)
K-Means Clustering in R – Exercises
K-means is efficient, and perhaps, the most popular clustering method. It is a way for finding natural groups in otherwise unlabeled data. You specify the number of clusters you want defined and the algorithm minimizes the total within-cluster variance. In this exercise, we will play around with the base R inbuilt k-means function on some labeled […]
Parsing Dates and Time – Part 2: Exercises
In the exercises below, we will continue working with lubridate and examine more features of the library. Answers to these exercises are available here. Please check the previous exercise here. If you obtained a different (correct) answer than those listed on the solutions page, please feel free to post your answer as a comment on […]
How to Visualize Data With Highcharter: Exercises
INTRODUCTION Highcharter is an R wrapper for Highcharts’ JavaScript library and its modules. Highcharts is very mature and flexible on JavaScript’s charting library. It has a great and powerful API. Before proceeding, please follow our short tutorial. Look at the examples given and try to understand the logic behind them. Then, try to solve the […]
Simple Numerical Modeling in R – Part 2: Exercises
In this exercise, we will continue to build our model from our previous exercise here, specifically to revise the errors that may be generated from the model, including rounding and truncating errors. Answers to these exercises are available here. If you obtained a different (correct) answer than those listed on the solutions page, please feel […]
Parsing Dates and Time – Part 1: Exercises
In the exercises below we will work with anytime and lubridate package to see how to manipulate date and time Answers to the exercises are available here. If you obtained a different (correct) answer than those listed on the solutions page, please feel free to post your answer as a comment on that page. Exercise […]
How to Start Plotting Interactive Maps With Leaflet: Exercises
INTRODUCTION Leaflet is one of the most popular open-source JavaScript libraries for interactive maps. It provides features like Interactive panning/zooming, Map tiles, Markers, Polygons, Lines, Popups, GeoJSON, creating maps right from the R console or RStudio, embedding maps in knitr/R Markdown documents and Shiny apps. It also allows you to render spatial objects from the […]
Simple Numerical Modeling in R – Part 1: Exercises
The modeling process is just one of the methods to find a solution for a certain problem. It can be a combination between empirical simulation approaches. The empirical method is data-based analysis that relies upon mathematical function and often has no meaning in real life. An approach using simulation is more based on scientific understanding […]
How To Plot Air Pollution Data With Openair: Exercises
INTRODUCTION The openair package is specifically designed to plot air pollution data. This tutorial will give a brief introduction to many of the plotting functions in openair. This tutorial will cover the following openair functions. SummaryPlot() windRose() pollutionRose() percentileRose() timePlot() calendarPlot() Before proceeding, please follow our short tutorial. Look at the examples given and try […]
Modeling With ANCOVA – Part 2: Exercises
In this 2nd part of ANCOVA modeling exercises, we will focus on the extend of ANCOVA visualization using the predict function. The function will help us to plot the linear regression of ANCOVA and also predict other useful information that aids our interpretation (We’ll see later.) The previous exercise can be found here. Answers to these […]