"เงินไม่ใช่ปัญหา แต่ปัญหาคือไม่มีเงิน"
แจกไฟล์ JSON ข้อมูลย้อนหลังการแพร่เชื้อและเสียชีวิตของโรค SARS จากองค์การอนามัยโลก
29 Jan 2020 13:30   [33120 views]

ช่วงนี้น่าจะเห็นเราทำกราฟเทียบ 2019-nCoV เทียบกับ SARS อัปเดตแบบรายวันบน Facebook และ Twitter ซึ่งก็มีคนถามว่าเราเอาข้อมูล SARS มาจากไหน คำตอบคือเราไปดูดข้อมูลจากเว็บองค์การอนามัยโลก (WHO) ที่หน้าเรื่อง SARS มาคร้าบ

เพื่อให้เขียนโปรแกรมวิเคราะห์ง่ายเราก็เลยเขียนโปรแกรมอีกตัวขึ้นมาดูดข้อมูลจากเว็บทั้งหมดนี้แล้ว Parse เก็บไว้ในรูปแบบ JSON

เห็นว่ามีคนอยากได้หลายคนก็เลยขอเอามาให้โหลดกันครับ อ่ะโหลดเลย !



sars_stat.json.zip (1188 downloads)
World Health Organization; [2020]
Licence: CC BY-NC-SA 3.0 IGO

รูปแบบก็ตรงไปตรงมา ข้างในเป็น Array ของ Object แบบนี้

{
  ...,
  "116": {
    "date": "2003_05_31",
    "cases": 8360,
    "death": 764,
    "data": {
      "Australia": {"case": 6, "death": 0},
      "Brazil": {"case": 2, "death": 0},
      "Canada": {"case": 188, "death": 30},
      "China": {"case": 5328, "death": 332},
      "China, Hong Kong Special Administrative Region": {
        "case": 1739,
        "death": 278
      },
      "China, Macao Special Administrative Region": {"case": 1, "death": 0},
      "China, Taiwan": {"case": 676, "death": 81},
      "Colombia": {"case": 1, "death": 0},
      "Finland": {"case": 1, "death": 0},
      "France": {"case": 7, "death": 0},
      "Germany": {"case": 10, "death": 0},
      "India": {"case": 3, "death": 0},
      "Indonesia": {"case": 2, "death": 0},
      "Italy": {"case": 9, "death": 0},
      "Kuwait": {"case": 1, "death": 0},
      "Malaysia": {"case": 5, "death": 2},
      "Mongolia": {"case": 9, "death": 0},
      "New Zealand": {"case": 1, "death": 0},
      "Philippines": {"case": 12, "death": 2},
      "Republic of Ireland": {"case": 1, "death": 0},
      "Republic of Korea": {"case": 3, "death": 0},
      "Romania": {"case": 1, "death": 0},
      "Russian Federation": {"case": 1, "death": 0},
      "Singapore": {"case": 206, "death": 31},
      "South Africa": {"case": 1, "death": 1},
      "Spain": {"case": 1, "death": 0},
      "Sweden": {"case": 3, "death": 0},
      "Switzerland": {"case": 1, "death": 0},
      "Thailand": {"case": 8, "death": 2},
      "United Kingdom": {"case": 4, "death": 0},
      "United States": {"case": 66, "death": 0},
      "Viet Nam": {"case": 63, "death": 5}
    }
  },
  ...
}

โดย Key (116) คือเลขจำนวนวันหลัง 4 กุมภาพันธ์ 2003 มีตั้งแต่ 41 - 157 แต่มีบางวันข้ามไปเพราะ WHO ไม่มีรายงานข้อมูล ก็สามารถใช้เลขนี้เป็น Index ตามวันได้ครับ

ส่วนข้อมูลข้างในก็ตรงไปตรงมาเลย case คือจำนวนผู้ติดเชื้อที่ได้รับการยืนยันแล้ว ส่วน death ก็คือเสียชีวิต

แถม: ข้อมูลของ 2019-nCoV

มีคนถามเช่นกันว่าเราเอาข้อมูลจากไหนมาพล็อตกราฟส่วน 2019-nCoV

ตอนนี้หลัก ๆ คือรอข้อมูลอย่างเป็นทางการรายวันจาก National Health Commission of the People's Republic of China แต่ระหว่างวันก็จะไปนั่งดูเว็บ Real Time แทน ข้อมูลอัปเดตเรื่อย ๆ แต่ส่วนที่มีประโยชน์จริง ๆ คงเป็น Real-time broadcast ที่รวมเอาข้อมูลที่น่าสนใจมาให้ดูเรื่อย ๆ เช่น จำนวนผู้ติดเชื้อเพิ่มจากส่วนต่าง ๆ ของโลก รวมถึงข่าวสารที่น่าสนใจ

บล็อกนี้ก็จบแค่นี้แหละ มาแจกไฟล์เฉย ๆ ยังไงก็รักษาสุขภาพกันนะคร้าบทุกท่าน ไม่เจ็บไม่ป่วย

บทความที่เกี่ยวข้อง

Jun 19, 2019, 13:17
57044 views
ทำความรู้จัก Libra เหรียญ Stablecoin จาก Facebook ละเอียดทุกมุมไปจนถึงรูขุมขน
Feb 23, 2022, 13:51
23111 views
7 Layers of the Metaverse องค์ประกอบ 7 เลเยอร์ที่ก่อมาเป็นเมตาเวิร์ส
0 Comment(s)
Loading