精华内容
下载资源
问答
  • 2020-07-30 23:18:29

    r语言抓取网页数据

    by Hiren Patel

    希伦·帕特尔(Hiren Patel)

    使用R进行网页抓取的简介 (An introduction to web scraping using R)

    With the e-commerce boom, businesses have gone online. Customers, too, look for products online. Unlike the offline marketplace, a customer can compare the price of a product available at different places in real time.

    随着电子商务的繁荣,企业已经上网。 客户也在线寻找产品。 与离线市场不同,客户可以实时比较不同地方的可用产品价格。

    Therefore, competitive pricing is something that has become the most crucial part of a business strategy.

    因此,竞争性定价已成为业务战略中最关键的部分。

    In order to keep prices of your products competitive and attractive, you need to monitor and keep track of prices set by your competitors. If you know what your competitors’ pricing strategy is, you can accordingly align your pricing strategy to get an edge over them.

    为了使您的产品价格具有竞争力和吸引力,您需要监视并跟踪竞争对手确定的价格。 如果您知道竞争对手的定价策略是什么,则可以相应地调整定价策略以获取竞争优势。

    Hence, price monitoring has become a vital part of the process of running an e-commerce business.

    因此,价格监控已成为运行电子商务业务过程的重要组成部分。

    You might wonder how to get hold of the data to compare prices.

    您可能想知道如何掌握数据以比较价格。

    获取价格比较所需数据的3种主要方法 (The top 3 ways of getting the data you need for price comparison)

    1.商人的饲料 (1. Feeds from Merchants)

    As you might be aware, there are several price comparison sites available on the internet. These sites get into a sort of understanding with the businesses wherein they get the data directly from them and which they use for price comparison.

    您可能已经知道,互联网上有几个价格比较站点。 这些站点与业务部门建立了某种了解,他们可以直接从他们那里获取数据并将其用于价格比较。

    These businesses put into place an API, or utilize FTP to provide the data. Generally, a referral commission is what makes a price comparison site financially viable.

    这些企业部署了API,或利用FTP提供数据。 通常,推荐佣金使价格比较站点在财务上可行。

    2.来自第三方API的产品Feed (2. Product feeds from third-party APIs)

    On the other hand, there are services which offer e-commerce data through an API. When such a service is used, the third party pays for the volume of data.

    另一方面,有些服务通过API提供电子商务数据。 使用此类服务​​时,第三方将为数据量付费。

    3.网页抓取 (3. Web Scraping)

    Web scraping is one of the most robust and reliable ways of getting web data from the internet. It is increasingly used in price intelligence because it is an efficient way of getting the product data from e-commerce sites.

    Web抓取是从Internet获取Web数据的最可靠,最可靠的方法之一。 由于它是从电子商务站点获取产品数据的有效方法,因此越来越多地用于价格情报中。

    You may not have access to the first and second option. Hence, web scraping can come to your rescue. You can use web scraping to leverage the power of data to arrive at competitive pricing for your business.

    您可能无权访问第一个和第二个选项。 因此,网页抓取可以助您一臂之力。 您可以使用网络抓取来利用数据的功能来为您的业务确定具有竞争力的价格。

    Web scraping can be used to get current prices for the current market scenario, and e-commerce more generally. We will use web scraping to get the data from an e-commerce site. In this blog, you will learn how to scrape the names and prices of products from Amazon in all categories, under a particular brand.

    Web抓取可用于获取当前市场情况下的当前价格,以及更广泛的电子商务。 我们将使用网络抓取来从电子商务网站获取数据。 在此博客中,您将学习如何从一个特定品牌的所有类别中刮取亚马逊产品的名称和价格。

    Extracting data from Amazon periodically can help you keep track of the market trends of pricing and enable you to set your prices accordingly.

    定期从Amazon提取数据可以帮助您跟踪定价的市场趋势,并使您能够相应地设置价格。

    目录 (Table of contents)

    1. Web scraping for price comparison

      网页抓取以进行价格比较

    2. Web scraping in R

      R中的网页抓取

    3. Implementation

      实作

    4. End note

      尾注

    1.网页抓取以进行价格比较 (1. Web scraping for price comparison)

    As the market wisdom says, price is everything. The customers make their purchase decisions based on price. They base their understanding of the quality of a product on price. In short, price is what drives the customers and, hence, the market.

    正如市场智慧所言,价格就是一切。 客户根据价格做出购买决定。 他们基于价格对产品质量的了解。 简而言之,价格是驱动客户以及市场的驱动力。

    Therefore, price comparison sites are in great demand. Customers can easily navigate the whole market by looking at the prices of the same product across the brands. These price comparison websites extract the price of the same product from different sites.

    因此, 价格比较网站的需求量很大。 客户可以通过查看各品牌相同产品的价格轻松浏览整个市场。 这些价格比较网站从不同的站点提取相同产品的价格。

    Along with price, price comparison websites also scrape data such as the product description, technical specifications, and features. They project the whole gamut of information on a single page in a comparative way.

    除价格外,价格比较网站还会抓取产品描述,技术规格和功能等数据。 他们以比较的方式在单个页面上投影全部信息。

    This answers the question the prospective buyer has asked in their search. Now the prospective buyer can compare the products and their prices, along with information such as features, payment, and shipping options, so that they can identify the best possible deal available.

    这回答了潜在买家在搜索中提出的问题。 现在,潜在买家可以比较产品及其价格,以及功能,付款和运输选项等信息,以便他们确定可用的最佳交易。

    Pricing optimization has its impact on the business in the sense that such techniques can enhance profit margins by 10%.

    从某种意义上说,此类技术可以将利润率提高10%,因此定价优化会对业务产生影响。

    E-commerce is all about competitive pricing, and it has spread to other business domains as well. Take the case of travel. Now even travel-related websites scrape the price from airline websites in real time to provide the price comparison of different airlines.

    电子商务全都具有竞争力的价格,并且它已经扩展到其他业务领域。 以旅行为例。 现在,甚至与旅行相关的网站也可以实时从航空公司网站上抓取价格,以提供不同航空公司的价格比较。

    The only challenge in this is to update the data in real time and stay up to date every second as prices keep changing on the source sites. Price comparison sites use Cron jobs or at the view time to update the price. However, it will rest upon the configuration of the site owner.

    唯一的挑战是实时更新数据并每秒更新一次,因为源站点上的价格不断变化。 价格比较网站使用Cron作业或在查看时间更新价格。 但是,它将取决于站点所有者的配置。

    This is where this blog can help you — you will be able to work out a scraping script that you can customize to suit your needs. You will be able to extract product feeds, images, price, and all other relevant details regarding a product from a number of different websites. With this, you can create your powerful database for price comparison site.

    这是此博客可以为您提供帮助的地方-您将能够制定出可以自定义以满足需要的抓取脚本。 您将能够从许多不同的网站中提取有关产品的产品Feed,图像,价格和所有其他相关详细信息。 这样,您就可以创建功能强大的价格比较网站数据库。

    2. R中的网页抓取 (2. Web scraping in R)

    Price comparison becomes cumbersome because getting web data is not that easy — there are technologies like HTML, XML, and JSON to distribute the content.

    价格比较变得麻烦,因为获取Web数据并不那么容易-存在诸如HTML,XML和JSON之类的技术来分发内容。

    So, in order to get the data you need, you must effectively navigate through these different technologies. R can help you access data stored in these technologies. However, it requires a bit of in-depth understanding of R before you get started.

    因此,为了获得所需的数据,您必须有效地浏览这些不同的技术。 R可以帮助您访问存储在这些技术中的数据。 但是,在开始之前,它需要对R有一点深入的了解。

    什么是R? (What is R?)

    Web scraping is an advanced task that not many people perform. Web scraping with R is, certainly, technical and advanced programming. An adequate understanding of R is essential for web scraping in this way.

    Web抓取是一项很少有人执行的高级任务。 用R进行Web抓取无疑是技术和高级编程。 对R的充分理解对于以这种方式刮取卷材至关重要。

    To start with, R is a language for statistical computing and graphics. Statisticians and data miners use R a lot due to its evolving statistical software, and its focus on data analysis.

    首先,R是用于统计计算和图形的语言。 由于R不断发展的统计软件以及对数据分析的关注,统计学家和数据挖掘者经常使用R。

    One reason R is such a favorite among this set of people is the quality of plots which can be worked out, including mathematical symbols and formulae wherever required.

    R之所以受到这组人的青睐的一个原因是可以得出的绘图质量,包括所需的数学符号和公式。

    R is wonderful because it offers a vast variety of functions and packages that can handle data mining tasks.

    R之所以出色,是因为R提供了许多可以处理数据挖掘任务的功能和包。

    rvest, RCrawler etc are R packages used for data collection processes.

    rvest,RCrawler等是用于数据收集过程的R包。

    In this segment, we will see what kinds of tools are required to work with R to carry out web scraping. We will see it through the use case of Amazon website from where we will try to get the product data and store it in JSON form.

    在此部分中,我们将了解与R配合使用需要哪些工具才能进行Web抓取。 我们将通过Amazon网站的用例来查看它,从那里我们将尝试获取产品数据并将其以JSON形式存储。

    要求 (Requirements)

    In this use case, knowledge of R is essential and I am assuming that you have a basic understanding of R. You should be aware of at least any one R interface, such as RStudio. The base R installation interface is fine.

    在这个用例中,R的知识是必不可少的,我假设您对R有了基本的了解 。 您应该知道至少任何一个R接口,例如RStudio。 基本的R安装界面很好。

    If you are not aware of R and the other associated interfaces, you should go through this tutorial.

    如果您不了解R和其他关联的接口,则应阅读教程。

    Now let’s understand how the packages we’re going to use will be installed.

    现在,让我们了解如何安装将要使用的软件包。

    包装方式: (Packages:)

    1. rvest

    1.

    Hadley Wickham authored the rvest package for web scraping in R. rvest is useful in extracting the information you need from web pages.

    Hadley Wickham在R中编写了用于网络抓取的rvest软件包。rvest在从网页提取所需信息方面很有用。

    Along with this, you also need to install the selectr and ‘xml2’ packages.

    与此同时,您还需要安装选择和“ xml2”软件包。

    Installation steps:

    安装步骤:

    install.packages(‘selectr’)
    install.packages(‘xml2’)
    install.packages(‘rvest’)

    rvest contains the basic web scraping functions, which are quite effective. Using the following functions, we will try to extract the data from web sites.

    rvest包含基本的Web抓取功能,这些功能非常有效。 使用以下功能,我们将尝试从网站中提取数据。

    • read_html(url) : scrape HTML content from a given URL

      read_html(url) :从给定的URL抓取HTML内容

    • html_nodes(): identifies HTML wrappers.

      html_nodes() :标识HTML包装器。

    • html_nodes(“.class”): calls node based on CSS class

      html_nodes(“.class”) :基于CSS类调用节点

    • html_nodes(“#id”): calls node based on <div> id

      html_nodes(“#id”) :基于<div> id调用节点

    • html_nodes(xpath=”xpath”): calls node based on xpath (we’ll cover this later)

      html_nodes(xpath=”xpath”) :基于xpath调用节点(我们将在后面介绍)

    • html_attrs(): identifies attributes (useful for debugging)

      html_attrs() :标识属性(用于调试)

    • html_table(): turns HTML tables into data frames

      html_table() :将HTML表转换为数据框

    • html_text(): strips the HTML tags and extracts only the text

      html_text() :剥离HTML标记,仅提取文本

    2. stringr

    2. 纵梁

    stringr comes into play when you think of tasks related to data cleaning and preparation.

    当您想到与数据清理和准备有关的任务时,便会发挥作用。

    There are four essential sets of functions in stringr:

    Stringr中有四组基本功能:

    • stringr functions are useful because they enable you to work around the individual characters within the strings in character vectors

      字符串函数非常有用,因为它们使您能够处理字符向量中字符串内的各个字符
    • there are whitespace tools which can be used to add, remove, and manipulate whitespace

      有空白工具可用于添加,删除和操作空白
    • there are locale sensitive operations whose operations will differ from locale to locale

      存在对语言环境敏感的操作,其操作因语言环境而异
    • there are pattern matching functions. These functions recognize four parts of pattern description. Regular expressions are the standard one but there are other tools as well

      有模式匹配功能。 这些功能识别模式描述的四个部分。 正则表达式是标准表达式,但还有其他工具

    Installation

    安装

    install.packages(‘stringr’)

    install.packages('stringr')

    3. jsonlite

    3. jsonlite

    What makes the jsonline package useful is that it is a JSON parser/generator which is optimized for the web.

    使jsonline包有用的原因在于,它是针对Web优化的JSON解析器/生成器。

    It is vital because it enables an effective mapping between JSON data and the crucial R data types. Using this, we are able to convert between R objects and JSON without loss of type or information, and without the need for any manual data wrangling.

    这一点至关重要,因为它可以在JSON数据和关键R数据类型之间进行有效的映射。 使用此方法,我们可以在R对象和JSON之间进行转换,而不会丢失类型或信息,也不需要任何手动数据处理。

    This works really well for interacting with web APIs, or if you want to create ways through which data can travel in and out of R using JSON.

    这对于与Web API交互非常有效,或者如果您想创建使用JSON将数据传入和传出R的方式,则非常有用。

    安装 (Installation)

    install.packages(‘jsonlite’)

    install.packages('jsonlite')

    Before we jump-start into it, let’s see how it works:

    在开始学习之前,让我们看看它是如何工作的:

    It should be clear at the outset that each website is different, because the coding that goes into a website is different.

    从一开始就应该清楚每个网站都是不同的,因为进入网站的编码是不同的。

    Web scraping is the technique of identifying and using these patterns of coding to extract the data you need. Your browser makes the website available to you from HTML. Web scraping is simply about parsing the HTML made available to you from your browser.

    Web抓取是一种识别并使用这些编码模式来提取所需数据的技术。 您的浏览器使您可以通过HTML访问该网站。 Web抓取只是关于解析从浏览器提供给您HTML。

    Web scraping has a set process that works like this, generally:

    Web抓取具有如下设置的过程,通常是这样的:

    • Access a page from R

      从R访问页面
    • Instruct R where to “look” on the page

      指示R在页面上“查找”的位置
    • Convert data in a usable format within R using the rvest package

      使用rvest包在R中以可用格式转换数据

    Now let’s go to implementation to understand it better.

    现在让我们去实施以更好地理解它。

    3.实施 (3. Implementation)

    Let’s implement it and see how it works. We will scrape the Amazon website for the price comparison of a product called “One Plus 6”, a mobile phone.

    让我们实现它,看看它是如何工作的。 我们将刮掉亚马逊网站,以比较一款名为“ One Plus 6”的手机的价格。

    You can see it here.

    你可以在这里看到它。

    步骤1:加载所需的软件包 (Step 1: Loading the packages we need)

    We need to be in the console, at R command prompt to start the process. Once we are there, we need to load the packages required as shown below:

    我们需要在控制台中的R命令提示符下启动该过程。 到达那里后,我们需要加载所需的软件包,如下所示:

    #loading the package:> library(xml2)> library(rvest)> library(stringr)

    步骤2:从Amazon读取HTML内容 (Step 2: Reading the HTML content from Amazon)

    #Specifying the url for desired website to be scrappedurl <- ‘https://www.amazon.in/OnePlus-Mirror-Black-64GB-Memory/dp/B0756Z43QS?tag=googinhydr18418-21&tag=googinkenshoo-21&ascsubtag=aee9a916-6acd-4409-92ca-3bdbeb549f80’
    #Reading the html content from Amazonwebpage <- read_html(url)

    In this code, we read the HTML content from the given URL, and assign that HTML into the webpage variable.

    在这段代码中,我们从给定的URL中读取HTML内容,并将该HTML分配给webpage变量。

    步骤3:从Amazon抓取产品详细信息 (Step 3: Scrape product details from Amazon)

    Now, as the next step, we will extract the following information from the website:

    现在,作为下一步,我们将从网站上提取以下信息:

    Title: The title of the product.Price: The price of the product.Description: The description of the product.Rating: The user rating of the product.Size: The size of the product.Color: The color of the product.

    标题:产品的标题。 价格:产品的价格。 描述:产品的描述。 等级:产品的用户等级。 尺寸:产品的尺寸。 颜色:产品的颜色。

    This screenshot shows how these fields are arranged.

    此屏幕快照显示了这些字段的排列方式。

    Next, we will make use of HTML tags, like the title of the product and price, for extracting data using Inspect Element.

    接下来,我们将使用HTML标记(例如产品标题和价格)来使用Inspect Element提取数据。

    In order to find out the class of the HTML tag, use the following steps:

    为了找出HTML标记的类,请使用以下步骤:

    => go to chrome browser => go to this URL => right click => inspect element

    =>转到chrome浏览器=> 转到该URL =>右键单击=>检查元素

    NOTE: If you are not using the Chrome browser, check out this article.

    注意:如果您没有使用Chrome浏览器,请参阅本文

    Based on CSS selectors such as class and id, we will scrape the data from the HTML. To find the CSS class for the product title, we need to right-click on title and select “Inspect” or “Inspect Element”.

    基于类和id之类CSS选择器,我们将从HTML中抓取数据。 要找到产品标题CSS类,我们需要右键单击标题,然后选择“检查”或“检查元素”。

    As you can see below, I extracted the title of the product with the help of html_nodes in which I passed the id of the title — h1#title — and webpage which had stored HTML content.

    如您在下面看到的,我在html_nodes的帮助下提取了产品的标题,在其中传递了标题的ID( h1#title )和存储HTML内容的webpage

    I could also get the title text using html_text and print the text of the title with the help of the head () function.

    我还可以使用html_text获取标题文本,并在head ()函数的帮助下打印标题文本。

    #scrape title of the product> title_html <- html_nodes(webpage, ‘h1#title’)> title <- html_text(title_html)> head(title)

    The output is shown below:

    输出如下所示:

    We could get the title of the product using spaces and \n.

    我们可以使用空格和\ n获得产品的标题。

    The next step would be to remove spaces and new line with the help of the str_replace_all() function in the stringr library.

    下一步是借助stringr库中的str_replace_all()函数删除空格和换行符。

    # remove all space and new linesstr_replace_all(title, “[\r\n]” , “”)

    Output:

    输出:

    Now we will need to extract the other related information of the product following the same process.

    现在,我们将需要按照相同的过程提取产品的其他相关信息。

    Price of the product:

    产品价格:

    # scrape the price of the product> price_html <- html_nodes(webpage, ‘span#priceblock_ourprice’)> price <- html_text(price_html)
    # remove spaces and new line> str_replace_all(title, “[\r\n]” , “”)
    # print price value> head(price)

    Output:

    输出:

    Product description:

    产品描述:

    # scrape product description> desc_html <- html_nodes(webpage, ‘div#productDescription’)> desc <- html_text(desc_html)
    # replace new lines and spaces> desc <- str_replace_all(desc, “[\r\n\t]” , “”)> desc <- str_trim(desc)> head(desc)

    Output:

    输出:

    Rating of the product:

    产品等级:

    # scrape product rating > rate_html <- html_nodes(webpage, ‘span#acrPopover’)> rate <- html_text(rate_html)
    # remove spaces and newlines and tabs > rate <- str_replace_all(rate, “[\r\n]” , “”)> rate <- str_trim(rate)
    # print rating of the product> head(rate)

    Output:

    输出

    Size of the product:

    产品尺寸:

    # Scrape size of the product> size_html <- html_nodes(webpage, ‘div#variation_size_name’)> size_html <- html_nodes(size_html, ‘span.selection’)> size <- html_text(size_html)
    # remove tab from text> size <- str_trim(size)
    # Print product size> head(size)

    Output:

    输出:

    Color of the product:

    产品颜色:

    # Scrape product color> color_html <- html_nodes(webpage, ‘div#variation_color_name’)> color_html <- html_nodes(color_html, ‘span.selection’)> color <- html_text(color_html)
    # remove tabs from text> color <- str_trim(color)
    # print product color> head(color)

    Output:

    输出:

    步骤4:我们已成功从所有字段中提取了数据,这些数据可用于比较另一个站点的产品信息。 (Step 4: We have successfully extracted data from all the fields which can be used to compare the product information from another site.)

    Let’s compile and combine them to work out a dataframe and inspect its structure.

    让我们对其进行编译和组合,以得出一个数据框并检查其结构。

    #Combining all the lists to form a data frameproduct_data <- data.frame(Title = title, Price = price,Description = desc, Rating = rate, Size = size, Color = color)
    #Structure of the data framestr(product_data)

    Output:

    输出:

    In this output we can see all the scraped data in the data frames.

    在此输出中,我们可以看到数据框中的所有已抓取数据。

    步骤5:以JSON格式存储数据: (Step 5: Store data in JSON format:)

    As the data is collected, we can carry out different tasks on it such as compare, analyze, and arrive at business insights about it. Based on this data, we can think of training machine learning models over this.

    收集数据后,我们可以对其执行不同的任务,例如比较,分析并获得有关它的业务见解。 基于这些数据,我们可以考虑在此基础上训练机器学习模型。

    Data would be stored in JSON format for further process.

    数据将以JSON格式存储以进行进一步处理。

    Follow the given code and get the JSON result.

    按照给定的代码获取JSON结果。

    # Include ‘jsonlite’ library to convert in JSON form.> library(jsonlite)
    # convert dataframe into JSON format> json_data <- toJSON(product_data)
    # print output> cat(json_data)

    In the code above, I have included jsonlite library for using the toJSON() function to convert the dataframe object into JSON form.

    在上面的代码中,我包括用于使用toJSON()函数将dataframe对象转换为JSON形式的jsonlite库。

    At the end of the process, we have stored data in JSON format and printed it.It is possible to store data in a csv file also or in the database for further processing, if we wish.

    在流程结束时,我们已经将数据存储为JSON格式并进行了打印。如果愿意,也可以将数据存储在csv文件中或数据库中以进行进一步处理。

    Output:

    输出:

    Following this practical example, you can also extract the relevant data for the same from product from https://www.oneplus.in/6 and compare with Amazon to work out the fair value of the product. In the same way, you can use the data to compare it with other websites.

    按照该实际示例,您还可以从https://www.oneplus.in/6中从产品中提取相同的相关数据,并与Amazon进行比较以得出产品的公允价值。 同样,您可以使用数据将其与其他网站进行比较。

    4.尾注 (4. End note)

    As you can see, R can give you great leverage in scraping data from different websites. With this practical illustration of how R can be used, you can now explore it on your own and extract product data from Amazon or any other e-commerce website.

    如您所见,R可以极大地帮助您从不同的网站抓取数据。 通过此实用的R用法示例,您现在可以自己浏览R并从Amazon或任何其他电子商务网站提取产品数据。

    A word of caution for you: certain websites have anti-scraping policies. If you overdo it, you will be blocked and you will begin to see captchas instead of product details. Of course, you can also learn to work your way around the captchas using different services available. However, you do need to understand the legality of scraping data and whatever you are doing with the scraped data.

    请注意: 某些网站具有反抓取政策 。 如果您做得过多,您将被屏蔽,您将开始看到验证码,而不是产品详细信息。 当然,您还可以使用各种可用的服务来学习如何处理验证码。 但是,您确实需要了解抓取数据的合法性以及对抓取数据所做的任何操作。

    Feel free to send to me your feedback and suggestions regarding this post!

    随时将您对本帖子的反馈和建议发送给我!

    翻译自: https://www.freecodecamp.org/news/an-introduction-to-web-scraping-using-r-40284110c848/

    r语言抓取网页数据

    更多相关内容
  • 主要是通过R语言,对网页上的数据进行进行爬取,并且整理成文本格式,或者excel格式。 Sys.setlocale("LC_TIME", "C") ## [1] "C"----------------------------------------------------------- ## Create a ...
  • 该资源内涵读取数代码的示例,可以读取txt、csv、tsv、nc栅格数据数据,不用于商业,适合入门新手下载学习,大佬请绕路,
  • r语言读取网页数据

    2022-06-23 14:38:18
    例如读取勒布朗.詹姆斯的10年生涯数据,会得到一个有26个变量的列表,该列表记录了他每年的平均得分、篮板和命中率等信息,这些都是以英文和数字记录的,所以读入后不会出现乱码。 ... 这是网页中的第三个表格,因此:...

    r语言读取网页数据


    R中的程序包XML为读写XML文档提供了通用的工具。
    在R中要读取网页上的HTML表格数据,要利用程序包XML中的readHTMLTable()函数,其调用格式如下:

    readHTMLTable (doc, header = NA, colclasses = NULL, skip.rows =integer(),trim- TRUE,
    elFun = xmlValue,as.data.frame = TRUE, which - integerl),...)
    

    在这里插入图片描述
    例如读取勒布朗.詹姆斯的10年生涯数据,会得到一个有26个变量的列表,该列表记录了他每年的平均得分、篮板和命中率等信息,这些都是以英文和数字记录的,所以读入后不会出现乱码。
    https://www.basketball-reference.com/players/j/jamesle01.html
    在这里插入图片描述
    这是网页中的第三个表格,因此:which=3

    u="http://www.basketball-reference.com/players/j/jamesle01.html"
    readHTMLTable(readLines(u), which=3, header=TRUE)
    

    在这里插入图片描述
    还有一列就不展示
    如果我想读取第一个表格,which=1(不写读取全部)

    展开全文
  • R语言数据读取以及数据保存方式

    千次阅读 2021-06-10 09:14:33
    一、R语言读取文本文件:1、文件目录操作:getwd() : 返回当前工作目录setwd("d:/data") 更改工作目录2、常用的读取指令readread.table() : 读取文本文件read.csv(): 读取csv文件如果出现缺失值,read.table()会报错...

    一、R语言读取文本文件:

    1、文件目录操作:

    getwd() : 返回当前工作目录

    setwd("d:/data") 更改工作目录

    2、常用的读取指令read

    read.table() : 读取文本文件

    read.csv(): 读取csv文件

    如果出现缺失值,read.table()会报错,read.csv()读取时会自动在缺失的位置填补NA

    3、灵活的读取指令

    scan() :

    4、读取固定宽度格式的文件:

    read.fwf()

    文本文档中最后一行的回车符很重要,这是一个类似于停止符的标识,否则读入时会显示“最后一行不完整”的警告,但是不影响数据读入的效果。

    5、读取Excel数据:

    (1)第一种方法

    首先打开Excel,选中需要的数据后复制,

    然后再R中输入以下的指令:data.excel =read.delim("clipboard") #clipboard即剪贴板

    (2)第二种方法:

    使用RODBC包,获取Excel连接的函数是odbcConnectExcel()和odbcConnectExcel2007() 分别读取Excel2003版和2007版的数据channel =odbcConnectExcel2007("d:/a.xlsx")

    sqlTables(channel)# 列出Excel中的表格

    获取Sheet1中的数据,可以使用如下任意的一种方式,

    data.excel2 =sqlFetch(channel,"Sheet1")

    data.excel2 =sqlQuery(channel,"select * from [Sheet1$]")

    close(channel) #关闭ODBC连接,释放空间

    6、读取网页数据

    readHTMLTable()函数

    7、读取R格式的文件:

    R的数据或者更一般的对象可以通过save()保存为R专有的文件格式,以Rdata为后缀,要读取此类文件,需要用到函数load()来加载,

    8、readLines("d:/data/cat.txt"):

    可以直接从连接中以行的形式来读取文本

    要显示列表中的变量 需要使用符号$

    二、数据保存:

    1、使用函数cat()

    cat(...,file="",sep="",fill = FALSE ,labels=NULL,append=FALSE) #file表示要输出的文件名,当参数append=TRUE时,在指定文件的末尾添加内容。sep:表示以空格作为分隔符

    2、保存为文本文件:

    write仅可以写出一个矩阵或向量的特定列,和对一个矩阵进行转置

    write.table() 可以把一个数据框或列表等对象以包含行列标签的方式写出。

    write.csv(): 将数据框保存为逗号分隔文件,但是不包含列名

    3、保存R格式文件:

    save(data,file="d:/data/salary1.Rdata")

    dim():求维度

    mode() 用来显示对象的类型

    names():显示对象中的标签

    补充:R语言读取数据、拆分数据,并保存到相应文件夹

    将一张Excel表的数据按照第一列元素分组,分组后按照某种规则命名,并重新读入Excel中,放入指定的文件夹中。

    79169bdc39f1b1c92b28fe54a57b2004.png

    如上所示的excel表,将sheet1中的数据按照“地域名称”拆分,并将数据放入相应的省份文件夹,如放入D盘的test文件夹中

    D:\mydata\test

    |__test

    |___mydata.xlsx

    |___安徽省

    |___安徽省安庆市.xlsx

    |___安徽省蚌埠市.xlsx

    |___河北省

    |__河北省蚌埠市.xlsx

    |___……

    假如数据最终的文件夹目录如上所示。代码可以作如下编写:

    library(readxl) # 载入readxl包,使用read_excel读入excel文件

    library(xlsx) # 载入xlsx包,使用write.xlsx保存文件为excel格式

    # setwd()设置路径为D:\\mydata\\test'

    setwd('D:\\mydata\\test')

    # read_excel 读入数据,具体用法可使用帮助。

    # 1表示读入第一张sheet,2表示读入第二张sheet,也可用sheet = "sheetname",默认第一行为标题行

    dt = read_excel('mydata.xlsx', 2)

    # unique() 过滤重复数据,保留唯一数据

    # 此处过滤掉第2列和第3列的重复行,最终只剩下3行不重复数据,默认不含标题

    province_city

    setwd('D:\\mydata\\test') # 设置当前路径为省份文件夹放置的目录

    cdir

    # 循环次数 n=province_city 的行数

    for (i in c(1:nrow(province_city [,1]))){

    # subset()读取子集,subset(data, data[, 1] == "a") 读取data中第一列所有为a的行

    dt1

    # paste,设置filename, 即安徽省,河北省

    cfilename = paste(province_city[i,1],".xlsx",sep = "")

    # 用于下面的if语句判断 创建的“安徽省”目录是否存在

    f_dir = paste('D:\\mydata\\test\\',province_city[i,2],sep="")

    # 创建的“安徽省”目录不存在,则创建;存在则不动作. F 表示False

    if (file.exists(f_dir) == F){

    dir.create(province_city[i,2])

    }else { }

    # 设置文件名称,即安徽省安庆市.xlsx

    c_dir = paste('D:\\mydata\\test\\',province_city[i,2],sep = "")

    # 设置c_dir为当前路径

    setwd(c_dir)

    # write.xlsx 将所需的文件列保存到上述设置的文件中,col.names=TRUE包含标题

    write.xlsx(dt1[,2:5],cfilename,col.names=TRUE,showNA=FALSE)

    # 设置路径为cdir,进入到下一次循环

    setwd(cdir)

    }

    以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。如有错误或未考虑完全的地方,望不吝赐教。

    展开全文
  • r语言抓取网页数据_R中的网页抓取

    千次阅读 2020-10-09 06:46:54
    r语言抓取网页数据Objective: To fetch the latest product prices that have been hosted on the competitor’s website programmatically.目标:以编程方式获取竞争对手网站上托管的最新产品价格。 For the ...

    r语言抓取网页数据

    Objective: To fetch the latest product prices that have been hosted on the competitor’s website programmatically.

    目标:以编程方式获取竞争对手网站上托管的最新产品价格。

    For the purpose of demonstration, let’s look into the websites of WeWork and Regus; two leading players in the co-working industry who competes among each other to serve hot desks, dedicated desks, and private offices across the globe. Let’s try to scrap their websites in California to retrieve the latest product price listings programmatically.

    为了演示,让我们看一下WeWork和Regus的网站。 协同工作行业中的两家领先企业相互竞争,为全球的热办公桌,专用办公桌和私人办公室提供服务。 让我们尝试在加利福尼亚州废弃其网站,以编程方式检索最新的产品价格清单。

    There were four milestones to accomplish the objective:

    实现目标有四个里程碑:

    1. Web scraped Regus sites using httr/rvest packages.

      Web使用httr / rvest软件包抓取了雷格斯网站。
    2. Cleaned the dataset and incorporated geospatial coordinates.

      清理数据集并合并地理空间坐标。
    3. Repeated steps 1 & 2 for WeWork websites.

      对WeWork网站重复步骤1和2。
    4. Embedded R script in Power BI and visualized the final output.

      Power BI中的嵌入式R脚本并可视化了最终输出。

    Phase 1: Web scraped Regus sites using httr/rvest packages

    阶段1:使用httr / rvest软件包在Web上刮除雷格斯网站

    • Step 1.1. Imported Libraries: Imported all the relevant libraries upfront.

      步骤1.1。 导入的库:预先导入了所有相关的库。
    library(tidyverse)
    library(rvest)
    library(revgeo)
    library(“opencage”)
    library(dplyr)
    library(sqldf)
    library(formattable)
    library(stringr)
    library(ngram)
    library(httr)
    library(rlist)
    library(jsonlite)
    library(lubridate)
    library(splitstackshape)
    • Step 1.2. Regus Location API: Extracted the co-working locations in California from Regus location API using httr package.

      步骤1.2。 雷格斯位置API:使用httr软件包从雷格斯位置API中提取加利福尼亚的共同工作地点。
    options(warn=-1)
    time <- Sys.time()
    location_data_final <- data.frame()url <- “https://www.regus.com/api/search/centres"resp <- GET(url)
    http_type(resp)
    jsonRespText<-content(resp,as=”text”)
    jsonRespParsed<-content(resp,as=”parsed”)regus_locations <-fromJSON(jsonRespText)
    regus_locations <- regus_locations %>% select (CenterNumber
    ,CenterName
    ,Latitude,Longitude
    ,FormattedAddress
    ,CenterCity)

    Phase 2: Cleaned the dataset and incorporated geospatial coordinates

    阶段2:清理数据集并合并地理空间坐标

    • Step 2.1. Reverse Geocoding: Used revgeo package to identify the street, city, state, and country of the lat, lng coordinates.

      步骤2.1。 反向地理编码:使用revgeo软件包来标识经纬度坐标的街道,城市,州和国家/地区。
    reverse_geocode<- revgeo(longitude=regus_locations$Longitude
    ,latitude=regus_locations$Latitude
    ,output='frame')

    reverse_geocode <- cbind(regus_locations, reverse_geocode)

    regus_locations_full <- regus_locations %>% inner_join (
    reverse_geocode, by = c("CenterNumber"))

    regus_california <- regus_locations_full %>% filter(
    country == "United States of America"
    ,State == "California")
    • Step 2.2. Regus Product Pricing API: Extracted the Regus co-working product pricing per location in California. Finally wrapped the whole process of data extraction with a ‘for loop’.

      步骤2.2。 雷格斯产品定价API:提取了加利福尼亚州每个地点的雷格斯协同工作产品定价。 最后,用“ for循环”包装了整个数据提取过程。
    dedicated_desk <- data.frame()
    for (i in 1: as.integer(regus_california %>% summarise(n()))){

    #Status Code 500 Path

    url <- paste("https://www.regus.com/ecommercevo/price?
    productType=platinum&daysLength=30&monthLength=1
    &startDate=", Sys.Date(),"&countryCode=US
    &centreNumber=",regus_california$CenterNumber[i], sep ="")

    resp <- GET(url)

    if(resp$status_code == 500){
    url <- paste("https://www.regus.com/ecommercevo/price?
    productType=platinum&monthLength=1&startDate=", Sys.Date(),"
    &countryCode=US&centreNumber=", "&_=",as.integer(
    as.numeric(Sys.time())),924,sep ="")

    resp <- GET(url)
    jsonRespText<-content(resp,as="text")
    vo_list <-fromJSON(jsonRespText)

    if(!is.null(vo_list$Price)){
    dedicated_desk_temp <- as_data_frame(
    vo_list$Price)%>%rename(dedicated_desk_price=value)
    dedicated_desk_temp$center_number <-
    as.integer (regus_california$CenterNumber[i])}

    if(is.null(vo_list$Price)){
    dedicated_desk_temp <- as_data_frame( "$0" ) %>%
    rename( dedicated_desk_price =value)
    dedicated_desk_temp$center_number <- as.integer(
    regus_california$CenterNumber[i])}

    dedicated_desk <- rbind(dedicated_desk, dedicated_desk_temp)}

    else if (resp$status_code == 200){
    jsonRespText<-content(resp,as="text")
    vo_list <-fromJSON(jsonRespText)

    if(!is.null(vo_list$Price)){
    dedicated_desk_temp <- as_data_frame(
    vo_list$Price) %>% rename(dedicated_desk_price=value)
    dedicated_desk_temp$center_number <- as.integer (
    regus_california$CenterNumber[i])}

    if(is.null(vo_list$Price)){
    dedicated_desk_temp <- as_data_frame( "$0" ) %>%
    rename(dedicated_desk_price =value)
    dedicated_desk_temp$center_number <-
    as.integer (regus_california$CenterNumber[i])
    }
    dedicated_desk <- rbind(dedicated_desk, dedicated_desk_temp)
    }
    }

    regus_california <- regus_california %>% left_join(
    dedicated_desk, by = c("CenterNumber" = "center_number"))

    Phase 3: Web scraped & Cleaned WeWork datasets

    阶段3:Web抓取并清理的WeWork数据集

    • Step 3.1. WeWork Product Pricing API: Extracted the WeWork co-working product pricing per locations in California. Finally wrapped the whole process of data extraction with a ‘for loop’.

      步骤3.1。 WeWork产品定价API:提取了加利福尼亚州每个地点的WeWork合作产品定价。 最后,用“ for循环”包装了整个数据提取过程。
    url <- c("https://www.wework.com/l/sf-bay-area--CA")

    location_data_final <- data.frame()

    for(i in url){
    webpage <- read_html(i)
    location_data <-
    html_nodes(webpage, ".mb0, .ray-card__content") %>%
    html_text() %>%
    enframe()
    location_data$urlid <- i
    location_data_final <- rbind(location_data_final
    ,location_data)}

    wework_1.a <- location_data_final %>% select (value)
    %>% mutate (row_num = row_number(),filter_check = row_num%%2==0)
    %>% filter(filter_check == "TRUE")%>% select (
    -filter_check)%>% select(-row_num) %>% rename(
    site_name_short = value)


    wework_1.b <- location_data_final %>% select (value) %>% mutate (
    row_num = row_number(),filter_check = row_num%%2!=0 ) %>% filter(
    filter_check == "TRUE")%>% select (-filter_check)%>% select(
    -row_num)

    wework_1 <- cbind(wework_1.a, wework_1.b)
    • Step 3.2. Cleaned WeWork dataset: Cleaned the raw dataset by extracting the required information out of the WeWork dataset

      步骤3.2。 清理过的WeWork数据集:通过从WeWork数据集中提取所需信息来清理原始数据集
    wework_1 <- wework_1 %>% rename (full_info = value) %>% mutate(
    full_info = str_squish (full_info))

    wework_1 <- sqldf("select * from wework_1
    where full_info not like '%Pricing for this location
    is not yet available%'")

    wework_1 <- sqldf("select * from wework_1
    where full_info not like '%Move in ahead of the curve
    with special pre-opening rates%'")

    wework_1.1 <- str_split_fixed(wework_1$full_info,
    "Starting prices", 2) %>% as.data.frame()

    wework_1.2 <- as.data.frame(wework_1.1$V2)
    %>% rename (value = `wework_1.1$V2`)

    wework_1.2 <- separate(wework_1.2, value,
    c("Private Office", "Price"),
    sep = "Private Office")

    wework_1.2 <- separate(wework_1.2, Price,
    c("private_office_price", "Price"),
    sep = "Dedicated Desk")

    wework_1.2 <- separate(wework_1.2, Price,
    c("dedicated_desk_price", "hot_desk_price"),
    sep = "Hot Desk")

    wework_interim <- cbind(wework_1, wework_1.1, wework_1.2)
    %>% select(-full_info,-V2)
    %>% rename(site_name = V1)


    wordcount_final <- data.frame()

    for(i in 1: nrow(wework_interim)){wordcount_temp <-
    enframe ( wordcount
    (wework_interim$site_name_short[i]) ) %>% select (value)

    wordcount_final <- rbind(wordcount_final, wordcount_temp)}


    wework_pricing <- cbind(wework_interim, wordcount_final) %>% rename(
    word_count= value) %>% select (-`Private Office`)
    %>% mutate(building_name =
    word(site_name, word_count+1, -1))
    %>% select(-word_count)
    %>% mutate(site_name = building_name
    ,date_time_Stamp = format(Sys.time()
    , "%d-%m-20%y"),country = "United States"
    ,company = "wework", currency_name = "US Dollar"
    , currency_short = "USD"
    , web_url = "https://www.wework.com/l/united-states")
    • Step 3.3. Reverse Geocoding: Used revgeo package to identify the street, city, state, and country of the lat, lng co-ordinates

      步骤3.3。 反向地理编码:使用revgeo软件包来标识经纬度坐标的街道,城市,州和国家/地区
    output_final_lat  <- data.frame()
    output_final_lng <- data.frame()
    output_final_state <- data.frame()


    for (i in 1:length(wework_pricing$site_name)) {
    output_temp <- opencage_forward(placename = wework_pricing$site_name[i]
    , key = "d3f30e7282414d52ba36461e84613c34" )

    output_final_lat <- bind_rows (output_final_lat,
    enframe( output_temp$results$geometry.lat[[1]] ))

    output_final_lng <- bind_rows (output_final_lng,
    enframe( output_temp$results$geometry.lng[[1]] ))

    output_final_state <- bind_rows (output_final_state,
    enframe( output_temp$results$components.state[[1]]))}


    wework_pricing$lat <- output_final_lat$value
    wework_pricing$lng <- output_final_lng$value
    wework_pricing$state <- output_final_state$value


    reverse_geocode<- revgeo(longitude=wework_pricing$lng,
    latitude=wework_pricing$lat, output='frame')

    wework_pricing <- wework_pricing %>% mutate(
    street_name = word(site_name, 2, 3),
    city = reverse_geocode$city,
    postcode = reverse_geocode$zip )

    Phase 4: Embedded R script in Power BI and visualized the final output

    阶段4:Power BI中的嵌入式R脚本并可视化最终输出

    Image for post
    Geospatial Competitor Analysis 1 (Image by Author)
    地理空间竞争者分析1(作者提供)
    Image for post
    Geospatial Competitor Analysis 2 (Image by Author)
    地理空间竞争者分析2(作者提供)
    Image for post
    Geospatial Competitor Analysis 3 (Image by Author)
    地理空间竞争者分析3(作者提供)

    Conclusion

    结论

    So, in a nutshell, we have successfully extracted the price listings per product per location of two competitors using the web scraping techniques in R programming. Finally, we visualized the output on a geospatial scale to build the data story.

    因此,简而言之,我们已经使用R编程中的Web抓取技术成功提取了两个竞争对手每个位置的每种产品的价格清单。 最后,我们以地理空间规模可视化输出以构建数据故事。

    What’s Next?

    下一步是什么?

    This is just the starting point of a journey to endless possibilities in competitor intelligence. We could do so much more with the extracted data like the following:

    这只是迈向竞争者智慧无限可能性的起点。 我们可以对提取的数据做更多的事情,如下所示:

    • Expand the web harvesting technique to build and analyze the trend globally.

      扩展网络收集技术以构建和分析全球趋势。
    • Automate the whole process of data extraction to build a real-time product pricing model.

      使数据提取的整个过程自动化,以建立实时的产品定价模型。
    • Feed the daily product price listings into cloud storage (S3/Google Cloud) to monitor the competitor’s daily price fluctuations in a BI platform.

      将每日产品价格清单输入到云存储(S3 / Google Cloud)中,以监视竞争对手在BI平台中的每日价格波动。
    • Aggregate the price listings per product per location over a period of time to reap insights from the week on week/ month on month/ year on year analysis.

      汇总一段时间内每个位置每个产品的价格清单,以从每周/每周/每月/每月/逐年分析中获得见解。
    • Auto-compute the avg. product price per city to see if we are underpriced or overpriced in comparison to the competitor’s price listings at any point in time.

      自动计算平均值。 每个城市的产品价格,以查看我们在任何时间点与竞争对手的价格清单相比是被低估还是被高估。

    GitHub Repository

    GitHub储存库

    I have learned (and continue to learn) from many folks in Github. Hence sharing my entire R scripts and Power BI file in a public GitHub Repository in case if it benefits any seekers online. Also, feel free to reach out to me if you need any help in understanding the fundamentals of web scraping in R. Happy to share what I know:) Hope this helps!

    我已经从Github的许多人那里学习了(并继续学习)。 因此,在公共GitHub存储库中共享我的整个R脚本和Power BI文件,以防万一它使在线求职者受益。 另外,如果您需要任何帮助来了解R中Web抓取的基础知识,请随时与我联系。乐于分享我所知道的内容:)希望这会有所帮助!

    About the Author

    关于作者

    翻译自: https://medium.com/swlh/web-scraping-in-r-978dbcb79b

    r语言抓取网页数据

    展开全文
  • R语言可以直接从数据库读取数据么?R语言读取数据库数据示例
  • R语言实现简单的网页数据抓取

    万次阅读 2017-02-17 23:39:30
    在知乎遇到这样一个问题。https://www.zhihu.com/question/26385408/answer/147009602这是要爬取的内容的网页R语言的代码的实现方式如下:#安装XML包 >install.packages("XML") #载入XML包 > library(XML)
  • 问题如下:我想获取网页中表格里的数据网页表格如下图但是呢,很坑爹的是,这个表格不能复制粘贴,Ctrl+C,Ctrl+V后出来的只是网址,估计是被禁用了复制粘贴功能。而如果一个一个敲的话工作量会很大,估计最后眼都...
  • 1.从HTML表中读取数据网页上表格或者列表是常见的数据类型。例如,以维基百科世界各国人口为例“http://en.wikipedia.org/wiki/List_of_countries_by_population”。网页图表方便人的理解,但是机器理解不容易。...
  • R语言读取大文件数据(分块读)
  • 直接用getSymbols能方便的获取国外的,但不能方便的获取国内的,代码经过检验可以直接获取国内股票日线数据
  • 想必大家最近都很关心新冠状肺炎,疫情导致春节被延长,高速被封,大家伙基本都是远程办公。 趁着周末,来写个爬虫,获取搜狗疫情提供的数据,爬取各个...而且,read_html是获取网页源码,因此如果根据该标签获取数据
  • R语言 导入网页数据

    千次阅读 2020-04-07 18:16:03
    R语言可以进行Web数据抓取,R有若干用于抓取网络数据的包 quantmod包 quantmod包是R平台用于金融建模的扩展包,主要功能有:从多个数据获取历史数据、绘制金融数据图表、在金融数据图表中添加技术指标、计算不同...
  • R语言读取数据

    千次阅读 2020-10-20 18:33:58
    R语言读取数据 Ctrl+Shift+PgDn ——>全选 1. 从剪切板读取 dat<-read.table("clipboard",header = T) dat 运行结果: 或 X=read.table("clipboard",header = T) #将剪切板数据读入数据框X中 head(X) #显示...
  • 基于R语言rvest包的网页数据爬取(基础)Project Num:201901写在前面:在使用技术手段爬取需要登录账号才可以获取到的数据时,请先认真阅读该网站的用户协议,以免产生不必要的法律问题。文末附带html节点速查表以及...
  • 1.了解R语言中的数据结构。 2.熟练掌握他们的创建方法,和函数中一些参数的使用。 3.对创建的数据结构进行,排序、查找、删除等简单的操作。 1.向量的创建及因子的创建和查看 2.矩阵与数组。 3.将之前的state,数组...
  • R语言与金融数据分析

    2018-05-06 00:51:17
    R语言与金融数据分析R语言与金融数据分析R语言与金融数据分析
  • R语言获取自带数据

    千次阅读 2020-03-18 16:39:06
    R语言获取软件包里的所有数据集 例如:输入 print(data(package="mlbench")) 输出 Data sets in package ‘mlbench’: BostonHousing Boston Housing Data BostonHousing2 Boston Housing Data Brea...
  • R语言——获取数据

    2022-03-14 15:20:34
    1.利用键盘获取数据 #法一:通过将数据保存在变量中,然后整合为数据框 >patientID <- c(1,2,3,4) > admdata <- c("10/15/2009","11/01/2009","10/20/2009","10/28/2009") > age <- c(25,34,28,52...
  • 请问使用R语言读取股票数据时出现这样的报错应该怎么解决? 看百度说是网络问题,但是家里的网络没有问题
  • RT,用R语言rvest包爬取网页数据遇到这样的问题,网址如下:(欧冠杯-分组赛)http://odds.cp.360.cn/liansai/scorerank?r_a=rQBzUn&leaid=103&season=2015-2016&subseason=%B7%D6%D7%E9%C8%FC用rvest只能...
  • R语言读取excel数据的常用方式有哪些?
  • R语言读取(加载)txt格式数据为dataframe
  • R语言获取数据框行数

    千次阅读 2022-01-04 15:29:35
    有一个数据框名叫df, R语言获取数据框行数的方法 dim(df)[1] nrow(df) length(df[,1])
  • 提示:本文章是记录本人看《R语言医学数据分析实战》记录的对自己有用的知识 文章目录一、R语言介绍1.常见用法二、创建数据集1.R的数据结构2.读入数据总结 一、R语言介绍 1.常见用法 (1)下载包: install....
  • R语言 | 利用tushare获取股票数据实例

    千次阅读 2021-08-20 12:57:14
    tushare是R语言上的一个包,可以获取许多股票数据,大家可以自行前往其官网查看,www.tushare.pro 直接上代码,首先下载tushare包,并用library加载: install.packages('Tushare') library('Tushare') tusha.....
  • R语言金融数据分析

    2018-06-05 17:23:54
    目录 R语言介绍 时间背景知识 金融案例分析 R语言实现均线模型 ppt 43页 2014

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 338,163
精华内容 135,265
关键字:

r语言读取网页数据