Notes
Notes - notes.io |
#RESTART R session!
library(devtools)
install_github("twitteR", username="geoffjentry")
library(twitteR)
api_key <- "Zqzzbz5iAWLch5w69uMC4Bv0g"
api_secret <- "6wx4cylNmrLVoQGx3zvtBxPVkDdLSevosIgsFGtsxPThJsVD2K"
access_token <- "820958604173905920-FL2FMOP6gwTvJ87V4a8Cdu9jFxcUmjW"
access_token_secret <- "MM2tLAwTbDu79LQoHArAoDZpb9p0NGZxAEyOcT8zPM6lL"
setup_twitter_oauth(api_key, api_secret, access_token, access_token_secret)
searchTwitter("pazartesi")
searchTwitter('sydney', n=10,geocode='-33.8389,151.2101,10000mi')
#Consumer Key (API Key) Zqzzbz5iAWLch5w69uMC4Bv0g
#Consumer Secret (API Secret) 6wx4cylNmrLVoQGx3zvtBxPVkDdLSevosIgsFGtsxPThJsVD2K
doInstall <- TRUE
toInstall <- c("twitteR", "dismo", "maps", "ggplot2")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
searchTerm <- "#"
searchResults <- searchTwitter(searchTerm, n = 1000) # Gather Tweets
tweetFrame <- twListToDF(searchResults) # Convert to a nice dF
userInfo <- lookupUsers(tweetFrame$screenName) # Batch lookup of user info
userFrame <- twListToDF(userInfo) # Convert to a nice dF
locatedUsers <- !is.na(userFrame$location) # Keep only users with location info
locations <- geocode(userFrame$location[locatedUsers]) # Use amazing API to guess
# approximate lat/lon from textual location data.
with(locations, plot(lon, lat))
worldMap <- map_data("world") # Easiest way to grab a world map shapefile
zp1 <- ggplot(worldMap)
zp1 <- zp1 + geom_path(aes(x = long, y = lat, group = group), # Draw map
colour = gray(2/3), lwd = 1/3)
zp1 <- zp1 + geom_point(data = locations, # Add points indicating users
aes(x = lon, y = lat),
colour = "RED", alpha = 1/2, size = 1)
zp1 <- zp1 + coord_equal() # Better projections are left for a future post
zp1 <- zp1 + theme_minimal() # Drop background annotations
print(zp1)
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team