Hi,
You can use the below scrip to send thank you notes to your friends who wished for your birthday on your Facebook timeline.
Instructions:
#Get the Facebook access token:
# | |
#You have a dataframe "df", with variables gender and age, and other variables of interest about radio listenership | |
# | |
#Add weights below. The population parameter over the prop.table(..) portion calculating sample statistics. | |
weight_male = .49500764/(prop.table(table(df$Gender))["Male"]) | |
weight_male | |
weight_female = .50499236/(prop.table(table(df$Gender))["Female"]) | |
weight_female |
library(foreign) | |
library(memisc) | |
library(Hmisc) | |
setwd("C:\\your\\working\\folder") | |
#Open with standard foreign package | |
data_frame_attempt1 <- read.spss("yourdata.sav") | |
#Open with memisc package HT http://stackoverflow.com/questions/3136293/read-spss-file-into-r |
library("ggmap") | |
library("mapproj") | |
### Tunisia Map | |
``` {r Map, dpi=100,echo=FALSE, message=FALSE, comment=NA, fig.width=6} | |
# get map image from google | |
map <- get_map(location = c(lon = 9.489765, lat = 35.584840), source = "osm", zoom = 6) |
#Unofficial Revision 2013/06/17 | |
# Stripped-out whitespace and pipe delimeters and added comma separation for easier copying and pasting to spreadsheet software. | |
# Revision 2.2 2006/05/02 | |
# Fix a bug when a matrix is passed as the 'x' argument | |
# Reported by Prof. Albert Sorribas same day | |
# Fix involved creating default values for RowData and ColData | |
# when there are no dimnames for the matrix | |
# Revision 2.1 2005/06/26 |
tar -cjvf BACKUP_file.tar.bz2 ./public_html #back-up website | |
tar -xjf archivefile.tar.bz2 #uncompress file |
Hi,
You can use the below scrip to send thank you notes to your friends who wished for your birthday on your Facebook timeline.
Instructions:
#Get the Facebook access token:
Step One | |
Fetch URL based on column: | |
'http://www.datasciencetoolkit.org/maps/api/geocode/json?sensor=false&address=' + escape(value, 'url')' | |
Step Two | |
Parse Json for longitude: | |
value.parseJson()["results"][0]["geometry"]["location"]["lng"] |
#nbhdata { | |
line-color:#594; | |
line-width:0.5; | |
polygon-opacity:1; } | |
#nbhdata[R_HomeOwn >= 0 ] { polygon-fill: #f0ffe1; } | |
#nbhdata[R_HomeOwn >= 9] { polygon-fill: #d9fcb9; } | |
#nbhdata[R_HomeOwn >= 18] { polygon-fill: #bbef8e; } | |
#nbhdata[R_HomeOwn >= 27] { polygon-fill: #9ad363; } | |
#nbhdata[R_HomeOwn >= 36] { polygon-fill: #6e843f; } |