Home
R & Python Blog
Cancel

Sample Data Generation

Creating Sample Datasets This guide provides instructions on how to create sample datasets in R and Python. You can use these methods to generate a mini version of your original dataset for data c...

Basic Model Fitting in R

In previous categories we have looked at cleaning, summarizing, and subsetting data, with some minor calculations, but we haven’t yet looked at analyzing our data. R is a very powerful tool for da...

Creating Variables in R

Occasionally we need to derive variables form existing information. A good example of this is conversion between scales. If we wanted to change a measurement from metres to kilometres or weight in ...

Python vs R - How To Decide?

Python and R are both very useful tools in academia, research, industry, and everywhere! They have a lot of similarities, but there are also many differences. The purpose of this post is to help s...

Using Python in RStudio with Reticulate Package

As we know, Jupyter Notebook can be used easily with our UBC login information via Syzygy. Jupyter Notebook can also be downloaded to a computer and used via Anaconda. There are many different inte...

Subsetting in Python

Sometimes the data frame we are working with can be very large and take a while to process. Alternatively, we could only need a portion of the information. There is a way to filter through a data f...

Basic Model Fitting in Python

In previous categories we have looked at cleaning, summarizing, and subsetting data, with some minor calculations, but we haven’t yet looked at analyzing our data. Python is a very powerful tool f...

Creating Variables in Python

Occasionally we need to derive variables form existing information. A good example of this is conversion between scales. If we wanted to change a measurement from metres to kilometres or weight in ...

Cleaning Data in Python

Recall the URL with the country data. Let’s use this to practice some preliminary cleaning techniques. import pandas as pd url = 'https://raw.githubusercontent.com/jstaf/gapminder/master/gapminder...

Visualizing with Altair in Python

Matplotlib is a standard package used in Python for plotting. This is a basic plotting package, but does have limitations. If you are familiar with R, you may have used ggplot2 before. In Python, ...