精選

Ergast API:繪出 F1 賽場上的車手車隊表現

繼上篇 【 F1賽車哪裡看?怎麼看?線上觀賽小知識】 介紹許多關於F1的細節與近期*GP賽事的看點,也有對車手、車隊做簡單介紹。該篇文其中有些圖是Yun自行運用R繪圖出來的,像是賽事地圖、最快單圈,而在這次的文章裡,我將會講述我所使用的F1資料來源是什麼?我如何做出這些圖形?並帶大家看幾個採用Ergast這個API的作品應用。 (GP = Grand Prix 大獎賽,是賽車比賽的最高殿堂。) F1資料來源: Ergast API Ergast API: https://ergast.com/mrd/ 從 API Documentation 閱讀它的JSON參數了解基本格式: https://ergast.com/api/< series >/< season >/< round >/... series這邊固定選擇級別為F1的賽事。舉幾個例子,假如要抓六月底在奧地利Austrian Grand Prix的賽事(2019年第9場)的排位賽結果,JSON格式的API網址就是下列第一個 https://ergast.com/api/f1/2019/9/ qualifying .json 其他還有laps(圈數)、pitstops(進站)、drivers、constructors可用 https://ergast.com/api/f1/current/last/qualifying.json (最新排位結果) https://ergast.com/api/f1/current/last/results (最新比賽結果) https://ergast.com/api/f1/2019/status (年度賽事狀況:完成 / 未完成) 末端去掉 .json 會呈現表格整理的網頁,方便閱讀以作檢查。 實作過程:jsonlite、ggmap、magick 有了前面提到的json檔,在R裡面其實就能很方便地透過jsonlite套件來轉換取得dataframe的格式。不過,在自己做之前,還是先看了一下別人怎麼處理F1的資料格式,所以我大致閱讀了 Wrangling F1 Data With R – F1DataJunkie Book 這本 電子書,作者做出了一個 ergastR-core....

Shower Thoughts 這些文字如醍醐灌頂,沐浴你的大腦

Reddit的r/showerthoughts這個主題,有很多我非常喜歡、看了會會心一笑的文句!有許多人把這翻作「浴中沉思」,是指人在舒服放鬆的狀態或分神時,突然腦袋中神來一筆卻別具意義(也可能沒有意義但很真實有趣)的想法。而對於我這個讀者來說,就是這些文字給我帶來了一瞬衝擊,就像淋浴按摩腦袋一般,驚嘆「對齁!我怎麼沒想到!」。


在Reddit幾乎每個版裡,都有置頂的板規或什麼文適合貼在該版的專文。在ShowThoughts版也有清楚說明什麼叫ShowerThoughts,它說: a showerthought is a miniature epiphany that makes the mundane more interesting代表著一個細微頓悟,能讓原本平凡無奇的事瞬間變得有趣。讓人對於忽略掉的細節產生了新的思考。Showerthoughts can be funny, poignant, thought-provoking, or even just silly 它可以是好笑的、淒美的、發人深省的,也可以很鬧。

來精選最近幾個我覺得滿有梗的想法~其實我覺得有些都還滿像stand-up裡面可以放的段子了哈哈,搏君一笑~(有一些我喜歡的留言也放上了XD)

中肯篇

People hate writing essays for school, yet will willingly write a 10 paragraph long essay with sources to win an argument online.
「人們不喜歡寫學校的論文,卻願意在網路上長篇大論,打一篇內容段落完整、引源豐富的文章,只為贏一場爭論。」

留言:「沒錯,但這是因為你... (1)可以掌握自己的時間 (2)不用分析像屎一樣的長文 (3)不用擔心犯錯因為不用被改 (4)成績不受影響 (5)不用按照格式(如T.E.E.L.)來寫」

It’s funny how, as you progress through college, they require you to write longer and longer papers. Then you get to the professional world and no one will read an email that’s more than 5 sentences.
「有趣的是,從大一升到大四,會要求你文章越寫越長。然而當你步入職場,卻沒有人會看一封超過五句話的Email。」

留言1:「這不是新現象,追溯到20年前,我便領悟到了... 如果我要發一封包含兩點的信,像這樣:第一點用來抓住目光、第二點請對方在某事做更新。如此一來,第二點將會完全無聲無息,所以現在我都拆開來傳。」
留言2:「PPT化的溝通方式(一個重點,最多列5要點)」

When you're a kid, you're told swearing is adult/mature language. When you're an adult, you're told it's immature.
「當你還小時,別人告訴你說:小孩不準罵髒話;當你長大了,別人卻說:罵髒話是不成熟的行為。」

As a kid, people tell you to never tell lies, but when you grow up you find out everyone lied to you about almost everything as a kid.
「小時候,人們告訴你不可以說謊;長大後你發現,近乎小時候經歷的一切,都是騙你的。」

Life is just an RPG where you have no idea what the main goal is so you pick one shitty side quest to do for the whole time just to survive.
「生命就像RPG,你不知道主線的終極目標是什麼,所以選一條爛支線走,一直以來為做而做,只求生存。」

留言:「在創角的時候,我肯定搞砸了什麼。」

Having one choice and having no choice is the exact same thing.
「只有一個選項和沒有選擇,根本是同一件事。」


廢文篇

If you multiply together the number of arms every human alive or dead has, the answer is 0.
「當你把所有人(不論死活)擁有的手臂數相乘起來,答案為零。」

If you wore a VR headset and had a camera drone follow you all the time you could live in 3rd person.
「要是你戴上VR頭套、弄個無人機隨時跟拍,你就能活得像第三人稱視角。」

If life does flash before your eyes right before you die, you’ll see this post again eventually.
「如果在臨死前,真的會在眼前回放一生,你終究會再次看到這篇文章。」

留言1:「你的一生的確在臨死前會閃過眼前:那就是人生。」
留言2:「若真如此,我們不會陷在觀看人生的迴圈嗎?」

Yun也有想過,是不是其實正在經歷的人生,就是回放的影像呢?也才因此常常會有既視感的產生。

If you are alone when you crack open a peanut shell and eat the peanut inside, you are the only person in the world to have ever seen that peanut.
「如果你在剝開花生的殼到吃它時,是獨自一人的。那麼你就是世上唯一一個,看過這顆花生的人。」這活像一篇有邏輯的廢文,我喜歡。

Lollipops are so fucking weird, you flavor your own spit then drink it.
「棒棒糖這東西也太怪,要你把口水做調味,然後喝下去。」

Allergies are just a superpower that allows people to detect when plants are having sex.
「過敏是一種超能力,讓人可以偵測植物什麼時候在做愛。」

The most amazing thing about the MCU apart from the superpowers is the fact that english is the main language of 99% of the galaxy.
「除了超能力外,漫威宇宙中最厲害的是,99%的星系以英文為主要語言。」

說得有道理...?但主要應該是為了給觀眾看啦xd。(不過在驚奇隊長裡面有說他們有用萬能翻譯機。)

哲理篇

Tissue companies profit off of sickness, sadness and shame.
「衛生紙公司透過生病、悲傷、羞羞的事來獲利。」

Coffee makes you hyper, but coffee shops are designed for people to chill, whereas alcohol is a depressant but bars and clubs are designed for people to be energetic.
「咖啡讓你提神,但咖啡店是設計來給人放鬆;而酒精是降凝劑,但酒吧和俱樂部卻是設計來讓人產生活力。」

The pencil to eraser ratio is really too optimistic
「鉛筆相對於橡皮擦的使用率,實在太正向了。」

Young love is willing to die for your partner. Old love is willing to live longer than your partner so that they don’t have to grieve losing you.
「年少的愛,是願意為另一半而死;老成的愛,是願意活得比另一半更久,不願讓對方因失去自己而傷痛。」

留言:「70歲的我在吃起司堡... 她說:你現在是不愛我了嗎?」


Yun算是一個很常看Reddit的遊民,甚至比PTT更常看。為什麼說遊民?因為我沒在發文,沒在逛政治板跟著戰,應該稱不上鄉民啦!(Reddit上稱為Lurker 潛伏者)我個人很喜歡的版還有很多,我也為了想快速看某幾個版當日最夯的貼文,寫了一個簡單網頁。(雖然最主要是想一次看EarthPorn的美麗風景而做的哈哈)之後會再陸續介紹其他我有追蹤的板!

留言

Share Our Blog