-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
88 lines (88 loc) · 3.18 KB
/
.Rhistory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
knitr::opts_chunk$set(echo = TRUE)
ggplot(tmp2, aes(tmp2,x=Rok, y = Wartosc, label = Gry.zespolowe)) +
geom_point(color = "firebrick") +
geom_label(fill = "firebrick4", colour = "white", fontface = "bold",hjust = 0.5, nudge_x = 0.5)+
ggtitle("Polski sport") +
xlim(2012, 2020)+
scale_x_continuous(breaks = c(2014,2016,2018))
---
title: Analiza liczby osób uprawiających sporty drużynowe w sekcjach sportowych.
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(echo = TRUE)
rm(list = ls())
library(readxl)
Dane <- read_excel("KULT_2159_XPIV.xlsx",
sheet = "DANE", col_types = c("text",
"text", "text", "text", "numeric",
"numeric", "text", "numeric"))
head(Dane)
library(dplyr)
library(DT)
tmp <- select(Dane, Nazwa, Gry.zespolowe, Rok, Wartosc)
tmp$Nazwa <- as.factor(tmp$Nazwa)
tmp$Gry.zespolowe <- as.factor(tmp$Gry.zespolowe)
tmp %>% datatable
save(tmp, file = "Gry_zesp.RData")
library(reshape2)
Last <- dcast(tmp,
Nazwa + Gry.zespolowe ~ Rok,
value.var = "Wartosc")
Last %>% datatable
Last %>% summary
library(tidyverse)
tmp2 <- filter(tmp, Nazwa == "POLSKA")
ggplot(tmp2, aes(tmp2,x=Rok, y = Wartosc, label = Gry.zespolowe)) +
geom_point(color = "firebrick") +
geom_label(fill = "firebrick4", colour = "white", fontface = "bold",hjust = 0.5, nudge_x = 0.5)+
ggtitle("Polski sport") +
scale_x_continuous(breaks = c(2014,2016,2018))
tmp3 <- filter(tmp, Nazwa != "POLSKA", Gry.zespolowe == "piłka nożna (łącznie z halową i plażową)")
ggplot(tmp3, aes(tmp3, x=Rok, y = Wartosc, label = Nazwa)) +
geom_point(color = "firebrick") +
geom_label(fill = "firebrick4", colour = "white", fontface = "bold",hjust = 0.5, nudge_x = 0.5) +
ggtitle("Piłka nożna w województwach")+
scale_x_continuous(breaks = c(2014,2016,2018))
detach(package:readxl)
detach(package:dplyr)
detach(package:DT)
detach(package:tidyverse)
detach(package:reshape2)
knitr::opts_chunk$set(echo = TRUE)
rm(list = ls())
library(readxl)
Dane <- read_excel("KULT_2159_XPIV.xlsx",
sheet = "DANE", col_types = c("text",
"text", "text", "text", "numeric",
"numeric", "text", "numeric"))
head(Dane)
library(dplyr)
library(DT)
tmp <- select(Dane, Nazwa, Gry.zespolowe, Rok, Wartosc)
tmp$Nazwa <- as.factor(tmp$Nazwa)
tmp$Gry.zespolowe <- as.factor(tmp$Gry.zespolowe)
tmp %>% datatable
save(tmp, file = "Gry_zesp.RData")
library(reshape2)
Last <- dcast(tmp,
Nazwa + Gry.zespolowe ~ Rok,
value.var = "Wartosc")
Last %>% datatable
Last %>% summary
library(tidyverse)
tmp2 <- filter(tmp, Nazwa == "POLSKA")
ggplot(tmp2, aes(tmp2,x=Rok, y = Wartosc, label = Gry.zespolowe)) +
geom_point(color = "firebrick") +
geom_label(fill = "firebrick4", colour = "white", fontface = "bold",hjust = 0.5, nudge_x = 0.5)+
ggtitle("Polski sport") +
scale_x_continuous(breaks = c(2014,2016,2018))
tmp3 <- filter(tmp, Nazwa != "POLSKA", Gry.zespolowe == "piłka nożna (łącznie z halową i plażową)")
ggplot(tmp3, aes(tmp3, x=Rok, y = Wartosc, label = Nazwa)) +
geom_point(color = "firebrick") +
geom_label(fill = "firebrick4", colour = "white", fontface = "bold",hjust = 0.5, nudge_x = 0.5) +
ggtitle("Piłka nożna w województwach")+
scale_x_continuous(breaks = c(2014,2016,2018))
detach(package:readxl)
detach(package:dplyr)
detach(package:DT)
detach(package:tidyverse)
detach(package:reshape2)