Showing posts with label scraping. Show all posts
Showing posts with label scraping. Show all posts
Tuesday, January 06, 2015
Network chart of board members in Helsinki
The data is scraped from the Finnish business directory finder.fi. The network chart is created using D3.js.
Labels:
board members,
business,
Finland,
helsinki,
network chart,
scraping,
visualization
Friday, December 05, 2014
Scraping Google Trends with R
These R functions will allow you to programmatically download Google Trends data and importing it to R.
Step 1: Install the Google Trends functions from my Github account.
Step 2: Sign in to Google Trends in your main browser
Step 3: define the keywords you need
keywords=c("Samsung", "Apple", "Xiaomi")
Step 4: create list of URL:s (in this example, we'll have only one URL)
url=URL_GT(keywords)
Step 5: specify your browser download directory and set it as your working directory
downloadDir="C:/downloads"
setwd(downloadDir)
Step 6: download the csv:s. The function outputs the file name.
filePath=downloadGT(url, downloadDir)
Step 7: import the csv to R
googletrends_data=readGT(filePath)
In this post, I write about how to merge daily data from Google Trends into longer time series using R.
Step 1: Install the Google Trends functions from my Github account.
Step 2: Sign in to Google Trends in your main browser
Step 3: define the keywords you need
keywords=c("Samsung", "Apple", "Xiaomi")
Step 4: create list of URL:s (in this example, we'll have only one URL)
url=URL_GT(keywords)
Step 5: specify your browser download directory and set it as your working directory
downloadDir="C:/downloads"
setwd(downloadDir)
Step 6: download the csv:s. The function outputs the file name.
filePath=downloadGT(url, downloadDir)
Step 7: import the csv to R
googletrends_data=readGT(filePath)
In this post, I write about how to merge daily data from Google Trends into longer time series using R.
Subscribe to:
Posts (Atom)