官术网_书友最值得收藏!

Introduction

Before using data to answer critical business questions, the most important thing is to prepare it. Data is normally archived in files, and using Excel or text editors allows it to be easily obtained. However, data can be located in a range of different sources, such as databases, websites, and various file formats. Being able to import data from these sources is crucial.

There are four main types of data. Data recorded in text format is the simplest. As some users require storing data in a structured format, files with a .tab or .csv extension can be used to arrange data in a fixed number of columns. For many years, Excel has had a leading role in the field of data processing, and this software uses the .xls and .xlsx formats. Knowing how to read and manipulate data from databases is another crucial skill. Moreover, as most data is not stored in a database, one must know how to use the web scraping technique to obtain data from the Internet. As part of this chapter, we introduce how to scrape data from the Internet using the rvest package.

Many experienced developers have already created packages to allow beginners to obtain data more easily, and we focus on leveraging these packages to perform data extraction, transformation, and loading. In this chapter, we first learn how to utilize R packages to read data from a text format and scan files line by line. We then move to the topic of reading structured data from databases and Excel. Last, we learn how to scrape Internet and social network data by using the R web scraper.

主站蜘蛛池模板: 洪泽县| 张家界市| 肇州县| 沁水县| 武川县| 当阳市| 灵武市| 谷城县| 西青区| 顺平县| 萝北县| 哈密市| 石阡县| 镇巴县| 武乡县| 锦州市| 丹寨县| 乐陵市| 金川县| 玉田县| 马鞍山市| 新化县| 龙海市| 蓬溪县| 博湖县| 庆阳市| 财经| 融水| 阆中市| 延津县| 永春县| 濮阳县| 花莲县| 开化县| 商丘市| 乐亭县| 牟定县| 枣强县| 都昌县| 晋江市| 崇明县|