Skip to content

Instantly share code, notes, and snippets.

View graebnerc's full-sized avatar

Claudius Graebner-Radkowitsch graebnerc

View GitHub Profile
@graebnerc
graebnerc / DMC-DataSource.md
Last active August 11, 2025 21:23
Was ist Wachstum - Decoupling Abbildung

Domestic material consumption per gross domestic product - Data package

This data package contains the data that powers the chart "Domestic material consumption per gross domestic product" on the Our World in Data website. It was downloaded on April 30, 2025.

Active Filters

A filtered subset of the full data was downloaded. The following filters were applied:

CSV Structure

@graebnerc
graebnerc / filtering.R
Created June 19, 2025 07:05
Filter Missing Values Example
# dyplyr is used for such cases:
library(dplyr)
# Create a small dataset with missing values:
students <- data.frame(
name = c("Alice", "Bob", "Charlie", "Diana", "Eve"),
age = c(20, NA, 22, 19, NA),
grade = c(85, 92, NA, 78, 88),
city = c("Boston", "Chicago", NA, "Denver", "Austin")
)
@graebnerc
graebnerc / # Base code for exercises
Created May 8, 2025 18:34
Base code for exercises of the session on "AI for coding".
This is the code from which you can start working on the exercises of the session on "AI for coding".
@graebnerc
graebnerc / # Example prompts and answers
Created May 8, 2025 17:38
The prompts used as examples in the slides from the lab on "AI for Coding".
The prompts used as examples in the slides from the lab on "AI for Coding".
Results were created by Claude Sonnet 3.7 in May 2025.
@graebnerc
graebnerc / # Notes Lab 3
Created March 28, 2025 19:51
Lecture notes for lab 3
This contains a clean version of the scripts used during the lab.
@graebnerc
graebnerc / # Skript zu Tag 3 - Wiederholungsfragen Data Prep
Created July 15, 2024 12:27
Einführung in R (Frühjahrssemester 2024): Tag 3 - Recap
The notes made on the questions that you posed during day 3 on the content from day 2.
@graebnerc
graebnerc / # Skript zu Tag 3 - Visualisierung
Last active July 15, 2024 11:40
Einführung in R (Frühjahrssemester 2024): Tag 3 - Visualisierung
Hier findet sich das Skript zur Entwicklung der beiden Beispielabbildung, die wir im Kurs am 15. Juli 2024 entwickelt haben, sowie den weiteren Visualisiserungsnotizen.
@graebnerc
graebnerc / # Skript zu Tag 2
Created July 8, 2024 19:25
Einführung in R (Frühjahrssemester 2024): Tag 2
Hier sind alle Notizen und Aufgabenlösungen zu Tag 2 (8. Juli 2024).
@graebnerc
graebnerc / # Skript zu Tag 1
Created July 1, 2024 14:30
Einführung in R (Frühjahrssemester 2024): Tag 1
Hier sind alle Notizen und Aufgabenlösungen zu Tag 1 (1. Juli 2024).
@graebnerc
graebnerc / LinearRegression.R
Created June 21, 2024 13:02
Notes from the lecture on simple linear regression
library(tibble)
library(ggplot2)
library(moderndive)
# 1. Implement linear regression-----------------
# Make a shortcut to the data:
beer_data <- as_tibble(DataScienceExercises::beer)
head(beer_data)
# Conduct the linear regression: