I need to:
Download a parsed file of all the company names provided by http://api.crunchbase.com/v/1/companies.js
Run a query using each company name to download a parsed file of each company's information (e.g. Founded_year, funder company name), using the syntax 'http://api.crunchbase.com/v/1/company/permalink.js'
I would like to parse this data into a spreadsheet or some other format that I can then import into R for analysis.
What is the best format to import this data into R? How can I download the data and organize it into a table-like structure? (e.g. Row = company, columns = profile information like funded_year) (with the ultimate goal of analyzing it in R)
library(RJSONIO)
library(RCurl)
# grab the data
raw_data <- getURL("http://api.crunchbase.com/v/1/companies.js")
# Then covert from JSON into a list in R
data <- fromJSON(raw_data)
length(data)
[1] 101782
# We can coerce this to a data.frame
final_data <- do.call(rbind, data)
# Then write it to a flat csv file
write.csv(final_data, "final_data.csv")
> head(final_data)
name permalink category_code
[1,] "Wetpaint" "wetpaint" "web"
[2,] "AdventNet" "adventnet" "enterprise"
[3,] "Zoho" "zoho" "software"
[4,] "Digg" "digg" "web"
[5,] "Facebook" "facebook" "web"
[6,] "Photobucket, Inc." "photobucket" "web"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With