![Paris2024](https://global.discourse-cdn.com/julialang/original/3X/2/5/25c59f130445d91dc541cb0a9bcf83019c9030ad.png)
Paris2024
inc(i,j,x,y) = round(Int,hypot(i-x, j-y)) == 6
ch(x) = x ? "#" : " "
n = 0:44
m = @. inc(n,n',16,8) | inc(n,n',16,22) | inc(n,n',16,36) | inc(n,n',22,15) | inc(n,n',22,29)
foreach(println, ["\n"; " "^18 * "Paris 2024"; join.(eachrow(ch.(m)))])
PS:
Celine Dion, she was magnificent!
16 Likes
Nice - I like the brevity - Olympic golfing?!
Here’s your next plotting challenge:
![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=12)
10 Likes
Could do it, but with considerable pain in calculating all those circles intersections, plus arc segments, plus …
2 Likes
Indeed, that would be a pain. I cheated by tilting each ring:
12 Likes
No pain, just a few quick strokes of paint!
(code posted above)
1 Like
The Paris 2024 Olympic medals by country, sorted in 3 different ways:
using TableScraper, DataFrames
url = "https://www.bbc.com/sport/olympics/paris-2024/medals"
tbl = scrape_tables(url)
header = tbl[1].columnnames
rows = tbl[1].rows
df = DataFrame(header .=> eachrow(reduce(hcat, rows)))
rename!(df, :TotalTotal => :TOTAL_MEDALS)
df[!, 3:6] = parse.(Int64, df[:, 3:6])
transform!(df, [:GGold, :SSilver, :BBronze] => ((g,s,b) -> (3*g + 2*s + b)) => :TOTAL_POINTS)
sort(df, [:GGold, :SSilver, :BBronze], rev=true)
sort(df, :TOTAL_MEDALS, rev=true)
sort(df, :TOTAL_POINTS, rev=true)
8 Likes