Skip to content

Commit

Permalink
2023-24w1 week 3 wrangling
Browse files Browse the repository at this point in the history
  • Loading branch information
chendaniely committed Sep 18, 2023
1 parent 6c47021 commit 8494313
Show file tree
Hide file tree
Showing 14 changed files with 145,111 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"deletable": false,
"editable": false,
"nbgrader": {
"cell_type": "markdown",
"checksum": "519677afcc6a3daff425f189226c3b26",
"grade": false,
"grade_id": "cell-0ba3615c069aebc7",
"locked": true,
"schema_version": 3,
"solution": false,
"task": false
}
},
"source": [
"# DSCI 100: Introduction to Data Science\n",
"\n",
"## Tutorial 3 Class activity\n",
"\n",
"Run the below cell to load `tidyverse` and inspect the `mtcars` dataframe:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false,
"editable": false,
"nbgrader": {
"cell_type": "code",
"checksum": "ee3932e7be53a5cd78d07b646454972a",
"grade": false,
"grade_id": "cell-3c2c6923d47f5b45",
"locked": true,
"schema_version": 3,
"solution": false,
"task": false
}
},
"outputs": [],
"source": [
"library(tidyverse)\n",
"head(mtcars)"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false,
"editable": false,
"nbgrader": {
"cell_type": "markdown",
"checksum": "4f15bf0ae0c15da93983f318adb4d494",
"grade": false,
"grade_id": "cell-ab91b66bec8403ef",
"locked": true,
"schema_version": 3,
"solution": false,
"task": false
}
},
"source": [
"**Q1.** Is this dataset tidy? Why or why not? Discuss with your neighbour!"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false,
"editable": false,
"nbgrader": {
"cell_type": "markdown",
"checksum": "6ec5390b0cee371bbd8398177719c4e7",
"grade": false,
"grade_id": "cell-e31cb051e80ee409",
"locked": true,
"schema_version": 3,
"solution": false,
"task": false
}
},
"source": [
"**Q2.** What do the variable names mean? Use the manual documentation to find out!"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false,
"nbgrader": {
"cell_type": "code",
"checksum": "6bcaa1df800e269174091c1154db23bb",
"grade": true,
"grade_id": "cell-7534df1fe137919f",
"locked": false,
"points": 0,
"schema_version": 3,
"solution": true,
"task": false
}
},
"outputs": [],
"source": [
"# Replace the fail() with your answer. \n",
"\n",
"# your code here\n",
"fail() # No Answer - remove if you provide an answer"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false,
"editable": false,
"nbgrader": {
"cell_type": "markdown",
"checksum": "7e63fe7d3fc0823419dac060b487db01",
"grade": false,
"grade_id": "cell-8552d6f9a0979932",
"locked": true,
"schema_version": 3,
"solution": false,
"task": false
}
},
"source": [
"**Q3.** We can start by generating summary statistics for each variable in the dataset. Calculate the mean for each variable in this dataset"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false,
"nbgrader": {
"cell_type": "code",
"checksum": "6c505cac14968da26c30cf643d12e9e1",
"grade": true,
"grade_id": "cell-382033e9c4450921",
"locked": false,
"points": 0,
"schema_version": 3,
"solution": true,
"task": false
}
},
"outputs": [],
"source": [
"# your code here\n",
"fail() # No Answer - remove if you provide an answer"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false,
"editable": false,
"nbgrader": {
"cell_type": "markdown",
"checksum": "6e80b10c1b2dc37717a9740a1cf435d2",
"grade": false,
"grade_id": "cell-db815f9fb1144cbf",
"locked": true,
"schema_version": 3,
"solution": false,
"task": false
}
},
"source": [
"**Q4.** What is the minimum time to complete a quarter mile for vehicles of each type of transmission?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false,
"nbgrader": {
"cell_type": "code",
"checksum": "dda4a315cedac1a674b822117a9ac6d0",
"grade": true,
"grade_id": "cell-3c4cae40be4083c4",
"locked": false,
"points": 0,
"schema_version": 3,
"solution": true,
"task": false
}
},
"outputs": [],
"source": [
"# your code here\n",
"fail() # No Answer - remove if you provide an answer"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "R",
"language": "R",
"name": "ir"
},
"language_info": {
"codemirror_mode": "r",
"file_extension": ".r",
"mimetype": "text/x-r-source",
"name": "R",
"pygments_lexer": "r",
"version": "4.1.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
1 change: 1 addition & 0 deletions materials/R/tutorial_wrangling/cleanup.R
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# clean up data files that students output
Loading

0 comments on commit 8494313

Please sign in to comment.