#dataframe

Reading JSON files as Scheme dataframes

In a previous post, I wrote about reading and writing JSON files in R and Chez Scheme. After updating that post, I was curious about how much code it would take to convert a Scheme object read from a JSON file into a dataframe. It is arguably a rare circu…


RPI and SOS in Scheme, Python, and Elixir

Last spring, I played in a 3x3 basketball leage with 14 teams and only 6 regular-season games. The unbalanced schedule made me wonder if we would end up with wonky playoff seeding. I thought it would be fun to calculate the Rating Percentage Index (RPI) a…


Dataframe manipulation in Scheme

This is yet another post where I try out my dataframe library for Scheme (R6RS) on examples found in blog posts. This blog post demonstrates data manipulation with dplyr (R). I provide only the Scheme code and some commentary. You will have to click throu…


Comparing dataframe operations in Scheme, Python, and R

I recently came across this blog post that calls pandas (Python) "clunky" compared to the "silky smooth" dplyr (R). No objections from me. dplyr is my favorite R package. I thought it would fun to compare the relative clunkiness of my dataframe library fo…


Exploratory data analysis in Elixir

I have been tinkering with lots of different programming languages (see here and here) over the last few years. Scheme is the only language so far that I have enjoyed enough to write a decent amount of code. Elixir first caught my eye back in April 2020, …


Data transformation in Scheme

I have done some recent work on my dataframe library for Scheme (R6RS) and thought I would run through the examples in the Data Transformation chapter of R for Data Science (R4DS). In this post, I won't reproduce any of the R code and will provide limited…


Visualizing Scheme library procedures with an interactive network graph in R

As a learning exercise, I wrote a dataframe library for Scheme (R6RS). Because I was learning Scheme while I wrote dataframe, I did not prioritize performance. However, as I've tried to use the dataframe library (exploratory data analysis, spam simulation…


Analyzing gapminder dataset with base R and Scheme

I keep my eye out for blog posts illustrating data analysis tasks in R that I can use to test the functionality of my chez-stats and dataframe libraries for Scheme (R6RS). A post comparing pandas (Python) and dplyr (R) in a basic analysis of the gapminder…


Spam simulation in Scheme

I learned a lot about Scheme (R6RS) by writing a few libraries and I expect that there is more to learn by trying to use those libraries (e.g., EDA in Scheme). A blog post about a stochastic simulation of spam comments in R caught my eye as an interesting…


Exploratory data analysis in Scheme

When I started learning Scheme (R6RS), I took the common approach of learning a new language by implementing features from familiar languages (namely R). That approach sent me down the path of writing the dataframe library and porting gnuplot-pipe from Ch…


Modify and aggregate dataframes in Scheme

This post is part of a series on the dataframe library for Scheme (R6RS). In this post, I will contrast the dataframe library with functions from base R and the dplyr package for modifying and aggregating dataframes. Set up First, let's create a dataframe…


Filter, partition, and sort dataframes in Scheme

This post is the fourth in a series on the dataframe library for Scheme (R6RS). In this post, I will contrast the dataframe library with functions from the dplyr R package for filtering, partitioning, and sorting dataframes. And discuss implementation dec…


Split, bind, and append dataframes in Scheme

This post is the third in a series on the dataframe library for Scheme (R6RS). In this post, I will contrast the dataframe library with functions from base R and the dplyr package for splitting, binding, and appending dataframes. Set up First, let's creat…


Select, drop, and rename dataframe columns in Scheme

This post is the second in a series on the dataframe library for Scheme (R6RS). In this post, I will contrast the dataframe library with functions from the dplyr R package for selecting, dropping, and renaming columns. Set up First, let's create a very si…


A dataframe record type for Scheme

As an exercise in my Scheme (R6RS) learning journey, I have implemented a dataframe record type and procedures to work with the dataframe record type. Dataframes are column-oriented, tabular data structures useful for data analysis found in several langua…


Reading and writing JSON files in R and Chez Scheme

I have previously written about how to read and write JSON files in R and Racket. In re-reading that old post, I'm struck by how it shows me tinkering without understanding. Now that I have pivoted from learning Racket to learning Chez Scheme, I'm revisit…


Reading and writing JSON files in R and Racket

In learning about reading CSV files in Racket, I have started to reconsider whether storing small(ish) datasets in CSV files is the best default behavior [1]. My default was set by primarily working in R, where reading and writing CSV files plays a centra…


Reading CSV files in R and Racket

In a previous post, I wrote about reading and writing data to file while retaining the structure and attributes of the data (i.e., data serialization). However, I more commonly pass data around as text files (usually, CSV files). For this post, I created …