Free data sources from data.world

Sometimes its hard to find good data source when You make some side projects especially when You want to use survey data. I found an interesting site called data.world. There are more than thousand database freely available after registration.

It has a cool feature: you can export the data directly to R, so You do not need to download it to Your local drive.

However sometimes it is tricky to use this function because the file format is not always .csv as it assumes, but of course You can use the link of the data source in this case.

Here is a minimal example how You can use it:

library(openxlsx)
library(googleVis)
 
# set working directory where You want to download the database
# setwd("C:/Users/yourName/Desktop")
 
download.file("https://query.data.world/s/9k1dnvrr5ykop5r89vnhwb7na", "database.xlsx", mode="wb")
 
# load the data with the openxlsx package
db = read.xlsx("database.xlsx", startRow = 1, colNames = TRUE)
 
# aggregate the data to a County level
db = aggregate(db[,"POP2010"], by=list(db[,"STNAME"]), FUN=sum, na.rm = TRUE)
 
# plot it with googleVis package
GeoStates <- gvisGeoChart(db, "Group.1", "x",
                          options=list(region="US", 
                                       displayMode="regions", 
                                       resolution="provinces",
                                       width=600, height=400))
plot(GeoStates)

3 thoughts on “Free data sources from data.world

  1. Thanks for sharing data.world with your readers! We’re so glad you’re enjoying the platform. Please don’t hesitate to reach out to us with any feedback or questions as your data.world journey unfolds!

    -Ian and the data.world team

  2. Thanks for Your reply. It would be useful if the system would recognise the file format and would offer the suitable most function.

Leave a Reply

Your email address will not be published. Required fields are marked *