Skip to content

Commit

Permalink
week11 materials
Browse files Browse the repository at this point in the history
  • Loading branch information
dicook committed Oct 7, 2024
1 parent 0fc19aa commit 80ea0c5
Show file tree
Hide file tree
Showing 125 changed files with 42,347 additions and 179 deletions.
306 changes: 306 additions & 0 deletions data/CO2-monthly.csv

Large diffs are not rendered by default.

Binary file modified data/lga.rda
Binary file not shown.
Binary file modified data/lga_sm.rda
Binary file not shown.
56 changes: 56 additions & 0 deletions data/womens_track.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
m100,m200,m400,m800,m1500,m3000,marathon,country
11.61,22.94,54.5,2.15,4.43,9.79,178.52,argentin
11.2,22.35,51.08,1.98,4.13,9.08,152.37,australi
11.43,23.09,50.62,1.99,4.22,9.34,159.37,austria
11.41,23.04,52,2,4.14,8.88,157.85,belgium
11.46,23.05,53.3,2.16,4.58,9.81,169.98,bermuda
11.31,23.17,52.8,2.1,4.49,9.77,168.75,brazil
12.14,24.47,55,2.18,4.45,9.51,191.02,burma
11,22.25,50.06,2,4.06,8.81,149.45,canada
12,24.52,54.9,2.05,4.23,9.37,171.38,chile
11.95,24.41,54.97,2.08,4.33,9.31,168.48,china
11.6,24,53.26,2.11,4.35,9.46,165.42,columbia
12.9,27.1,60.4,2.3,4.84,11.1,233.22,cookis
11.96,24.6,58.25,2.21,4.68,10.43,171.8,costa
11.09,21.97,47.99,1.89,4.14,8.92,158.85,czech
11.42,23.52,53.6,2.03,4.18,8.71,151.75,denmark
11.79,24.05,56.05,2.24,4.74,9.89,203.88,domrep
11.13,22.39,50.14,2.03,4.1,8.92,154.23,finland
11.15,22.59,51.73,2,4.14,8.98,155.27,france
10.81,21.71,48.16,1.93,3.96,8.75,157.68,gdr
11.01,22.39,49.75,1.95,4.03,8.59,148.53,frg
11,22.13,50.46,1.98,4.03,8.62,149.72,gbni
11.79,24.08,54.93,2.07,4.35,9.87,182.2,greece
11.84,24.54,56.09,2.28,4.86,10.54,215.08,guatemal
11.45,23.06,51.5,2.01,4.14,8.98,156.37,hungary
11.95,24.28,53.6,2.1,4.32,9.98,188.03,india
11.85,24.24,55.34,2.22,4.61,10.02,201.28,indonesi
11.43,23.51,53.24,2.05,4.11,8.89,149.38,ireland
11.45,23.57,54.9,2.1,4.25,9.37,160.48,israel
11.29,23,52.01,1.96,3.98,8.63,151.82,italy
11.73,24,53.73,2.09,4.35,9.2,150.5,japan
11.73,23.88,52.7,2,4.15,9.2,181.05,kenya
11.96,24.49,55.7,2.15,4.42,9.62,164.65,korea
12.25,25.78,51.2,1.97,4.25,9.35,179.17,dprkorea
12.03,24.96,56.1,2.07,4.38,9.64,174.68,luxembou
12.23,24.21,55.09,2.19,4.69,10.46,182.17,malaysia
11.76,25.08,58.1,2.27,4.79,10.9,261.13,mauritiu
11.89,23.62,53.76,2.04,4.25,9.59,158.53,mexico
11.25,22.81,52.38,1.99,4.06,9.01,152.48,netherla
11.55,23.13,51.6,2.02,4.18,8.76,145.48,nz
11.58,23.31,53.12,2.03,4.01,8.53,145.48,norway
12.25,25.07,56.96,2.24,4.84,10.69,233,png
11.76,23.54,54.6,2.19,4.6,10.16,200.37,philippi
11.13,22.21,49.29,1.95,3.99,8.97,160.82,poland
11.81,24.22,54.3,2.09,4.16,8.84,151.2,portugal
11.44,23.46,51.2,1.92,3.96,8.53,165.45,rumania
12.3,25,55.08,2.12,4.52,9.94,182.77,singapor
11.8,23.98,53.59,2.05,4.14,9.02,162.6,spain
11.16,22.82,51.79,2.02,4.12,8.84,154.48,sweden
11.45,23.31,53.11,2.02,4.07,8.77,153.42,switzerl
11.22,22.62,52.5,2.1,4.38,9.63,177.87,taipei
11.75,24.46,55.8,2.2,4.72,10.28,168.45,thailand
11.98,24.44,56.45,2.15,4.37,9.38,201.08,turkey
10.79,21.83,50.62,1.96,3.95,8.5,142.72,usa
11.06,22.19,49.19,1.89,3.87,8.45,151.22,ussr
12.74,25.85,58.73,2.33,5.81,13.04,306,wsamoa
306 changes: 306 additions & 0 deletions docs/data/CO2-monthly.csv

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions docs/data/landmine.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Generating the landmine data
# mystery data generated using locator function
plot(-1:1, -1:1, type = "n", xlab = "Re", ylab = "Im")
text(x=0, y=0, labels="you found me", cex=5)
d <- locator(512)
plot(d$x, d$y)
save(d, file = "data/mystery.rda")
d2 <- d
d2$y <- d2$y
d3$x <- d2$x*cos(pi/6) - d2$y*sin(5*pi/6)
d3 <- d2
d3$x <- d2$x*cos(pi/6) - d2$y*sin(pi/6)
d3$y <- d2$x*sin(pi/6) + d2$y*cos(pi/6)
d3 <- as_tibble(d3)
df <- tibble(x=runif(7500, -2, 2), y=runif(7500, -2, 2))
df <- bind_rows(df, d3)
df <- df[sample(1:nrow(df)),]
write_csv(df, file="data/landmine1.csv")

df4 <- read_csv("data/landmine1.csv")
df4 <- df4 |>
filter(!((x-1)^2+(y-1)^2)<0.01) |>
filter(!((x+1)^2+(y+1)^2)<0.01) |>
filter(!((x+1)^2+(y-1)^2)<0.01) |>
filter(!((x-1)^2+(y+1)^2)<0.01)
ggplot(df4, aes(x, y)) + geom_point(alpha=0.1)
ggplot(df4, aes(x, y)) + geom_point()
ggplot(df4, aes(x, y)) + geom_density_2d()
ggplot(df4, aes(x, y)) + geom_density_2d_filled()
ggplot(lineup(null_permute("x"), df4), aes(x, y)) + geom_point(alpha=0.5) + facet_wrap(~.sample, ncol=5)
ggplot(lineup(null_permute("x"), df4), aes(x, y)) + geom_point(alpha=0.1) + facet_wrap(~.sample, ncol=5)



Loading

0 comments on commit 80ea0c5

Please sign in to comment.