Resources
This carefully curated collection of resources will help you find packages and learning resources to help you on your R journey.
Building R packages with devtools and usethis | RStudio - YouTube
This YouTube video provides a tutorial on building R packages using devtools and usethis in RStudio.
Go to Resource

Building Shiny apps - an interactive tutorial
An interactive tutorial on building Shiny apps, which are interactive web pages built using R.
Go to Resource

Building Stories With Data - Fixing awkward backgrounds in ggplot2
In this article, Cara Thompson shares a solution for fixing awkward backgrounds in ggplot2 when using fixed coordinate systems like coord_sf() or coord_polar(). The issue arises when the background color does not cover the entire export area. She offers several solutions, including one that she finds more elegant, involving the use of the {cowplot} package. By implementing a simple function, one can ensure the background color fills the full plotting area, enhancing the visual consistency of custom-themed graphs and maps within documents.
Go to Resource

Building Stories With Data - Optimising the use of colours for storytelling in a spaghetti plot
This article provides guidance on enhancing storytelling in spaghetti plots by optimizing color usage. It discusses data visualization challenges specific to plots with multiple overlapping trend lines, making them difficult to read. Aimed at helping a client who frequently uses these plots, it details strategies to improve clarity and convey stories more effectively. Specifically, the article focuses on altering the 'Orange' dataset in R, including adding fictitious data for illustration. It includes code snippets to modify the dataset, create plots with ggplot2, and improve interpretability by decluttering and selecting harmonious colors, inspired by Piccia Neri's painting.
Go to Resource

Calculating and Analyzing Measures of Deprivation in the United States with deprivateR
deprivateR is an R package designed to provide a unified API for calculating and accessing various socioeconomic deprivation indices in the United States, such as the Area Deprivation Index (ADI), Neighborhood Deprivation Index (NDI), and Social Vulnerability Index (SVI), along with the Gini Coefficient. It offers a straightforward interface to compare indices across years and geographies, useful in research and public health. Though valuable, users should note some indices have limited validation for certain Census geographies. The package is available on CRAN and GitHub for easy installation and includes core functions like dep_get_index() and dep_calc_index() for computing deprivation scores using data like the American Community Survey.
Go to Resource

Chat with Large Language Models • {ellmer}
The 'ellmer' package facilitates the use of large language models (LLMs) directly from R. It provides access to multiple LLM providers and features like streaming outputs and structured data extraction. 'ellmer' supports models such as Anthropic's Claude, AWS Bedrock, and OpenAI's GPT, among others. The package offers interactive and programmatic ways to converse with models, maintaining the conversation state, which is useful for building on previous interactions. 'ellmer' is practical for both organizational and personal use, accommodating various IT restrictions and preferences.
Go to Resource

Choropleth Map with Bar Chart in R – the R Graph Gallery
This R Graph Gallery tutorial demonstrates how to create a choropleth map combined with a bar chart in R, using ggplot2 and the patchwork package. The tutorial includes steps and code snippets for data import, manipulation, and visualization. It focuses on visualizing the Human Development Index (HDI) across subregions of Sao Paulo, Brazil. The post introduces binning of continuous variables, customizing plots, theming, and handling geospatial data with the sf package. It also walks through calculating population proportions by HDI groups. Data for the tutorial is hosted on GitHub.
Go to Resource

Code review for statisticians, data scientists & modellers – Jack Kennedy
This content provides guidance on code review practices suitable for data scientists, statisticians, and modelers, particularly those who are not primarily software developers but write code for statistical models, data-driven products, and data engineering. It covers the principles of code review, the process of annotating and commenting on code via pull requests on GitHub, and the importance of offering constructive feedback. The author aims to communicate effective code review practices to analytical professionals, with a bias towards the R language and GitHub, while asserting that the underlying concepts are pertinent regardless of specific tools used.
Go to Resource



Colormeter Guide Extension • ggcolormeter
The ggcolormeter package provides a single function guide_colormeter() which is a ggplot2 color/fill legend guide extension in the style of a dashboard meter.
Go to Resource

colorspace: A Toolbox for Manipulating and Assessing Colors and Palettes
colorspace is a toolbox for manipulating and assessing colors and palettes in the R language. It provides utilities for computing with color spaces, such as converting between different color models. The package also includes predefined color palettes and functions for creating customized palettes. It can be used for visualizations and choosing colors in data analysis and graphic design.
Go to Resource