From 2b880251febb97fcea980709d0654cf2903052e2 Mon Sep 17 00:00:00 2001 From: nlitkowski Date: Wed, 14 Apr 2021 01:07:14 +0200 Subject: [PATCH 1/3] Add RStudio project files --- .gitignore | 4 ++++ wizualizacja-danych.Rproj | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 .gitignore create mode 100644 wizualizacja-danych.Rproj diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b6a065 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.Rproj.user +.Rhistory +.RData +.Ruserdata diff --git a/wizualizacja-danych.Rproj b/wizualizacja-danych.Rproj new file mode 100644 index 0000000..8e3c2eb --- /dev/null +++ b/wizualizacja-danych.Rproj @@ -0,0 +1,13 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX -- 2.20.1 From 96408834acac8f497faa92e2a605b5a2163d61a2 Mon Sep 17 00:00:00 2001 From: nlitkowski Date: Wed, 14 Apr 2021 01:07:46 +0200 Subject: [PATCH 2/3] Add plots for credit amount vs duration and credit count for job statuses --- projekt.R | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/projekt.R b/projekt.R index 8fadae1..47ec6a7 100644 --- a/projekt.R +++ b/projekt.R @@ -30,3 +30,15 @@ ggplot(german_credit_risk, aes(x=Purpose, y=Age, fill=Sex)) + theme_minimal() + theme(legend.position="bottom") + +ggplot(german_credit_risk, aes(x = Duration, y = Credit.amount, color = Sex)) + + geom_point(size = 1.5) + + geom_smooth(se = FALSE, size = 1.5) + + labs(title="Credit amount for credit duration", x="Duration", y = "Amount") + + theme_minimal() + + theme(legend.position="bottom") + +ggplot(german_credit_risk , aes(x = factor(Job), fill = Purpose)) + + geom_bar() + + scale_x_discrete(breaks = 0:3, labels=c("Unskilled, non-resident", "Unskilled, resident","Skilled","Highly skilled")) + + labs(title="Credit purposes for different job statuses", x="Duration", y = "Amount") \ No newline at end of file -- 2.20.1 From 0b015c14dba19c64f410093e152735f3c285d65c Mon Sep 17 00:00:00 2001 From: nlitkowski Date: Wed, 14 Apr 2021 01:11:00 +0200 Subject: [PATCH 3/3] Fix bad labels --- projekt.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projekt.R b/projekt.R index 47ec6a7..99f8414 100644 --- a/projekt.R +++ b/projekt.R @@ -41,4 +41,5 @@ ggplot(german_credit_risk, aes(x = Duration, y = Credit.amount, color = Sex)) + ggplot(german_credit_risk , aes(x = factor(Job), fill = Purpose)) + geom_bar() + scale_x_discrete(breaks = 0:3, labels=c("Unskilled, non-resident", "Unskilled, resident","Skilled","Highly skilled")) + - labs(title="Credit purposes for different job statuses", x="Duration", y = "Amount") \ No newline at end of file + labs(title="Credit count and purpose for different job statuses", x="Job status", y = "Credit count") + + theme_minimal() -- 2.20.1