This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Using Google Maps API and R | |
| ======================================================== | |
| This script uses RCurl and RJSONIO to download data from Google's API to get the latitude, longitude, location type, and formatted address | |
| ```{r} | |
| library(RCurl) | |
| library(RJSONIO) | |
| library(plyr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT usercode, count(CAST(usercode AS int)) AS Total | |
| FROM disposition with (nolock) | |
| where disposition in ('SF', 'SR', 'SC') | |
| GROUP BY usercode | |
| SELECT enterpriseagentid as Agent, CONVERT(varchar, callstart, 101) AS Date, count(*) AS Minutes | |
| FROM dbo.disposition with (nolock) | |
| WHERE (usercode IN (20, 30, 31, 32, 33, 38, 50)) AND (callstart > '11/30/08') |