![DataJournalism_GoogleSheetsScrapingDatafromtheInternet_lessonoverview_UEMWXbb.jpg](https://storage.googleapis.com/media-newsinitiative/images/DataJournalism_GoogleSheetsScrapingDatafromtheI.original.jpg)
เรียนรู้วิธีการจัดทำชุดข้อมูลของคุณเองผ่าน Google Sheets
![DataJournalism_GoogleSheetsScrapingDatafromtheInternet_lessonoverview.jpg](https://storage.googleapis.com/media-newsinitiative/images/DataJournalism_GoogleSheetsScrapingDatafromtheI.original.jpg)
มีข้อมูลอยู่เป็นจำนวนมากที่เผยแพร่อยู่ทางอินเทอร์เน็ตที่คุณสามารถใช้เพื่อการวิจัยและจัดทำเป็นข้อมูลเสมือนจริง การค้นหาข้อมูลและจัดทำเป็นรูปแบบที่คุณสามารถใช้งานได้คือขั้นตอนแรก
- การเริ่มกระดาษคำนวณชุดใหม่
- การค้นหาข้อมูลที่เชื่อถือได้
- การนำเข้าข้อมูลไปยัง Google Sheets
- การแก้ไขปัญหาและข้อความแจ้งข้อผิดพลาด
- การจัดแสดงข้อมูลของคุณ
ดูรายละเอียดเพิ่มเติมเกี่ยวกับวิชา การนำเสนอข้อมูล ได้ที่:
https://newsinitiative.withgoogle.com/training/course/data-journalism
![DataJournalism_GoogleSheetsScrapingDatafromtheInternet_lessonoverview.jpg](https://storage.googleapis.com/media-newsinitiative/images/DataJournalism_GoogleSheetsScrapingDatafromtheI.original.jpg)
การเริ่มกระดาษคำนวณชุดใหม่
![Scraping_Data_Starting_a_new_spreadsheet_step1_1PFBxZc.jpg](https://storage.googleapis.com/media-newsinitiative/images/Scraping_Data_Starting_a_new_spreadsheet_step1_.original.jpg)
![Scraping_Data_Starting_a_new_spreadsheet_step2_PvYQht8.jpg](https://storage.googleapis.com/media-newsinitiative/images/Scraping_Data_Starting_a_new_spreadsheet_step2_.original.jpg)
Starting a new spreadsheet.
เริ่มจากคุณจะต้องจัดทำกระดาษคำนวณเปล่าขึ้นมา ไปที่ sheets.google.com จาก Start a new spreadsheet คลิกที่ไอคอน +
ตั้งชื่อกระดาษคำนวณของคุณโดยคลิกที่ข้อความที่มุมด้านซ้ายบน ลองตั้งชื่อเป็น "Highest Grossing Movies"
![Scraping_Data_Starting_a_new_spreadsheet_step1_1PFBxZc.jpg](https://storage.googleapis.com/media-newsinitiative/images/Scraping_Data_Starting_a_new_spreadsheet_step1_.original.jpg)
![Scraping_Data_Starting_a_new_spreadsheet_step2_PvYQht8.jpg](https://storage.googleapis.com/media-newsinitiative/images/Scraping_Data_Starting_a_new_spreadsheet_step2_.original.jpg)
การค้นหาข้อมูลที่เชื่อถือได้
![ScrapingData_Finding_reliable_data_step1_4vjqTxu.jpg](https://storage.googleapis.com/media-newsinitiative/images/ScrapingData_Finding_reliable_data_step1_4vjqTx.original.jpg)
![ScrapingData_Finding_reliable_data_step2_XP0NWL0.jpg](https://storage.googleapis.com/media-newsinitiative/images/ScrapingData_Finding_reliable_data_step2_XP0NWL.original.jpg)
คุณสามารถบอกเล่าเรื่องราวได้ในทุกประเด็นโดยการสืบค้นข้อมูลจากไซต์ของภาครัฐ,แหล่งข้อมูลทางวิทยาศาสตร์, Wikipedia, Google Public Data Explorer ฯลฯ ในบทเรียนนี้เราจะฝึกฝนโดยใช้ข้อมูลเกี่ยวกับภาพยนตร์
ไปที่ google.com แล้วพิมพ์ search highest grossing films หนึ่งในลิงค์ชุดแรก ๆ ที่จะปรากฏขึ้นน่าจะเป็น Wikipedia พร้อมตารางข้อมูลต่าง ๆ รายการที่พบหนึ่งรายการชื่อว่า “the top 50 highest-grossing films of all time” กล่าวถึงภาพยนตร์หลายเรื่องไว้ เราจะใช้ข้อมูลจากแหล่งข้อมูลนี้ ตรวจสอบให้แน่ใจว่าข้อมูลที่ได้มาจากแหล่งข้อมูลที่เชื่อถือได้
นำเข้าตารางนี้ไปยัง Google Sheets โดยคัดลอกที่อยู่ของหน้า Wikipedia โดยแรเงาเลือก URL คลิกขวาเลือก จากนั้นเลือก copy
![ScrapingData_Finding_reliable_data_step1_4vjqTxu.jpg](https://storage.googleapis.com/media-newsinitiative/images/ScrapingData_Finding_reliable_data_step1_4vjqTx.original.jpg)
![ScrapingData_Finding_reliable_data_step2_XP0NWL0.jpg](https://storage.googleapis.com/media-newsinitiative/images/ScrapingData_Finding_reliable_data_step2_XP0NWL.original.jpg)
การนำเข้าข้อมูลไปยัง Google Sheets
![ScrapingData_Importing_data_to_Google_Sheets_step1_mM4p6WL.jpg](https://storage.googleapis.com/media-newsinitiative/images/ScrapingData_Importing_data_to_Google_Sheets_st.original.jpg)
![ScrapingData_Importing_data_to_Google_Sheets_step2_IygT0Zy.jpg](https://storage.googleapis.com/media-newsinitiative/images/ScrapingData_Importing_data_to_Google_Sheets_st.original.jpg)
![ScrapingData_Importing_data_to_Google_Sheets_step3_gznqq5C.jpg](https://storage.googleapis.com/media-newsinitiative/images/ScrapingData_Importing_data_to_Google_Sheets_st.original.jpg)
เราจะใช้ importHTML เพื่อนำเข้าตารางจาก Wikipedia ไปยังกระดาษคำนวณของเรา สูตรการสั่งการที่สะดวกรวดเร็วนี้มีอยู่ใน Google Sheets ที่ช่วยให้คุณสามารถนำเข้าตารางหรือรายการต่าง ๆ จากหน้าเว็บได้ เรียนรู้เพิ่มเติมเกี่ยวกับการทำงานของ importHTML และดูตัวอย่างบางส่วนได้จาก หน้าเอกสารกำกับของ Google Sheets
importHTML ต้องอาศัยพารามิเตอร์สามชุดในการทำงาน: 1) URL2) ประเภทข้อมูลที่เราจัดเก็บ ไม่ว่าจะเป็นตารางหรือรายการ3) หมายเลขแสดงตำแหน่งของตารางหรือรายการในรหัส HTML จากตัวอย่างนี้ รายการแรกของตารางจะกำกับเป็นเลขหนึ่ง เนื่องจากตารางที่เราต้องการคือรายการแรกที่ปรากฏขึ้นใน HTML คุณสามารถทดลองกำหนดตำแหน่งของตาราง (1, 2, 3 ฯลฯ) หรือคลิกขวาที่หน้าเว็บ แล้วเลือก Inspect > Find เพื่อระบุตำแหน่งตารางในชุดรหัสข้อมูลดังกล่าว
ไปที่กระดาษเปล่าที่คุณจัดทำ จากนั้นไปที่เซลล์ A1 พิมพ์:=importHTML("https://en.wikipedia.org/wiki/List_of_highest-grossing_films", "table", 1)
สังเกตว่า URL และองค์ประกอบต่าง ๆ (ตารางในกรณีนี้) จะอยู่ภายในเครื่องหมายอัญประกาศ - โดยพารามิเตอร์จะเป็นสีเขียว พารามิเตอร์ตัวสุดท้ายเป็นตัวเลขที่ไม่อยู่ในอัญประกาศจะเป็นสีน้ำเงิน
![ScrapingData_Importing_data_to_Google_Sheets_step1_mM4p6WL.jpg](https://storage.googleapis.com/media-newsinitiative/images/ScrapingData_Importing_data_to_Google_Sheets_st.original.jpg)
![ScrapingData_Importing_data_to_Google_Sheets_step2_IygT0Zy.jpg](https://storage.googleapis.com/media-newsinitiative/images/ScrapingData_Importing_data_to_Google_Sheets_st.original.jpg)
![ScrapingData_Importing_data_to_Google_Sheets_step3_gznqq5C.jpg](https://storage.googleapis.com/media-newsinitiative/images/ScrapingData_Importing_data_to_Google_Sheets_st.original.jpg)
การแก้ไขปัญหาและข้อความแจ้งข้อผิดพลาด
![ScrapingData_Troubleshooting_and_error_messages.jpg](https://storage.googleapis.com/media-newsinitiative/images/ScrapingData_Troubleshooting_and_error_messages.original.jpg)
หากคุณได้รับแจ้ง ERROR! ให้ตรวจสอบว่าอัญประกาศเป็น double quote ตามภาพในตัวอย่าง
หากคุณได้รับแจ้งข้อผิดพลาด VALUE! ให้ตรวจสอบว่าคุณไม่มีพารามิเตอร์หรือเครื่องหมายอัญประกาศส่วนเกินอยู่ในเซลล์
![ScrapingData_Troubleshooting_and_error_messages.jpg](https://storage.googleapis.com/media-newsinitiative/images/ScrapingData_Troubleshooting_and_error_messages.original.jpg)
การจัดแสดงข้อมูลของคุณ
![ScrapingData_Displaying_your_data_mcss7kz.jpg](https://storage.googleapis.com/media-newsinitiative/images/ScrapingData_Displaying_your_data_mcss7kz.original.jpg)
หลังจากสูตร ImportHTML ถูกต้อง ให้กด enter จากนั้น Google Sheets จะดำเนินการภายในเวลาไม่กี่วินาที ตารางควรจะโหลดเข้าไปพร้อมแถวข้อมูลและคอลัมน์ทั้งหมดที่จัดรูปแบบไว้เรียบร้อย
สังเกตว่าจะมีองค์ประกอบบางส่วนที่จะต้องลบเพื่อให้สามารถแสดงภาพข้อมูลชุดนี้ได้ เราจะเรียนรู้ขั้นตอนนี้ในบทเรียนถัดไปในหัวข้อ “Google Sheets: การล้างข้อมูล”
![ScrapingData_Displaying_your_data_mcss7kz.jpg](https://storage.googleapis.com/media-newsinitiative/images/ScrapingData_Displaying_your_data_mcss7kz.original.jpg)
ขอแสดงความยินดี!
![CleaningData_Overview_9zSutWO.jpg](https://storage.googleapis.com/media-newsinitiative/images/CleaningData_Overview_9zSutWO.original.jpg)
คุณผ่านบทเรียน “Google Sheets: ลบข้อมูลจากอินเทอร์เน็ต” แล้ว
พัฒนาทักษะด้านวารสารศาสตร์ในระบบดิจิตอลของคุณต่อไป พร้อมรับการรับรองจาก Google News Initiative โดยไปที่เว็บไซต์ศูนย์ฝึกอบรมของเราและศึกษาบทเรียนเพิ่มเติม
ดูรายละเอียดเพิ่มเติมเกี่ยวกับวิชา การนำเสนอข้อมูล ได้ที่:
newsinitiative.withgoogle.com/training/course/data-journalism
![CleaningData_Overview_9zSutWO.jpg](https://storage.googleapis.com/media-newsinitiative/images/CleaningData_Overview_9zSutWO.original.jpg)
-
Google Cloud AutoML Vision
บทเรียนเรียนรู้วิธีตั้งค่า AutoML Vision เพื่อเตรียมพร้อมสำหรับแบบฝึกหัดของหลักสูตร -
-
ทำความเข้าใจรายได้จากโฆษณาแบบขายตรงและแบบเป็นโปรแกรม
บทเรียนขายโฆษณา ตั้งราคา เสนอขายกับผู้ลงโฆษณา และสื่อสารผลลัพธ์