This file contains 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
# importing libraries | |
import string | |
import math | |
import nltk | |
import numpy as np | |
import gensim | |
import pandas as pd | |
import scipy.spatial | |
from nltk.corpus import stopwords | |
from scipy import stats |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
This script will delete all of the tweets in the specified account. | |
You may need to hit the "more" button on the bottom of your twitter profile | |
page every now and then as the script runs, this is due to a bug in twitter. | |
You will need to get a consumer key and consumer secret token to use this | |
script, you can do so by registering a twitter application at https://dev.twitter.com/apps | |
@requirements: Python 2.5+, Tweepy (http://pypi.python.org/pypi/tweepy/1.7.1) |
This file contains 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
* Getting started | |
capture log close | |
log using benin_ttests, text replace | |
set more off | |
clear | |
* cd "/Users/henrique/Desktop/Benin Project/Benin data" | |
use benin_data_modified | |
* The bulk of the work done by this program is coded in this first loop. | |
* There are four main objectives: |
This file contains 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
options(encoding="utf-8") | |
# Assigning the home directory | |
direc1 <- "/Users/henrique/Desktop" | |
setwd(direc1) | |
# Importing the relevant libraries | |
libs <- c("RCurl", "XML", "httr", "stringr", "mailR") | |
lapply(libs, library, character.only=TRUE) |
This file contains 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
direc <- "caminho completo da pasta em que você salvou os tweets" | |
setwd(direc) | |
# Importando os pacotes necessários | |
############################################################################## | |
libs <- c('devtools', 'twitteR', 'RCurl', 'XML', 'NLP', 'tm', 'plyr', 'ggplot2', 'xlsx', 'SnowballC', 'slam') | |
lapply(libs, require, character.only = TRUE) | |
# Lendo os dados da planilha de tweets |