Data Science
Google Maps by rStudio
mapType='normal'mapType='terrain' mapgps <- sqlQuery(channel, "select distinct top 10 (convert(varchar,Lat) +','+ convert(varchar,Lon)) as Latitude, Lon fromvCompany c inner join tbNZPostcode p on c.vchPostCode = p.postcode where chCountryCode = 'NZ' and p.postcode = 1010...
Intensity Map by rStudio
datamap <- sqlQuery(channel, "select chCountryCode as Country from vCompany group by chCountryCode")dataframe <- sqlQuery(channel, "select chCountryCode as Country, count(iCompanyId) as Total from vCompany group by chCountryCode order by 2 desc")Geo=gvisGeoChart(dataframe)plot(Geo)
Show up the Pie chart by Google Maps at rStudio - Manual
library(googleVis)a<-c('option1','option2','option3')b<-c(35,80,10)data<-data.frame(a,b)myplot<-gvisPieChart(data,options=list(title='Example',width=1000,...
Show up the bar charts by Google Maps at rStudio
--// Install the package (You must connect before as Administrator)install.packages("googleVis")--// Connect the librarylibrary(googleVis)--// Add data to the chartdf <- data.frame(dataframe)--//Set up the chart (gvisBarChart(df, yvar="Total",xvar="Country")--// Add for horizontal chartBar1...
Connect with SQL Database via ODBC by rStudio
--// Connect with SQL Database via ODBClibrary(RODBC)--// Open the sourcechannel <- odbcConnect("DATABASE_SERVER_NAME", uid="usr_studioR", pwd="XXXXXXX", believeNRows=FALSE)--// Open the Record SetEx 01: dataframe <- sqlQuery(channel, "select iCompanyId, chCountryCode, vchCity from...
Install ODBC driver at rStudio in Linux
install.packages("RODBC")install.packages("RODBC",type = "source")