2015-01-03 19 views
9

Makaleler için bazı alıntı alıntıları üzerinde çalışıyorum. Sahip olduğum problem, ISI Web of Knowledge dergisinden dergilere ihtiyacım var. Her yıl bu bilgileri toplarlar (dergi etki faktörü, özkaynak, ...), ancak bir yıllık tüm bilgileri bir kerede indirmenin bir yolu yoktur. Listede her zaman ilk 500 dergiyi işaretleyen "tümünü işaretle" seçeneği vardır (bu liste daha sonra indirilebilir). Bu projeyi R dilinde programlıyorum. Bu yüzden sorum şu: bu bilgiyi nasıl bir defada veya verimli ve düzenli bir şekilde nasıl alacağım? Herhangi bir fikir için teşekkür ederim.ISI Web of Knowledge'den günlükler hakkında bilgi nasıl alınır?

+3

** hizmet ** şartlarını kontrol etmek emin olun. –

+2

belki de Web Servis API'sı http://wokinfo.com/products_tools/products/related/webservices/ ve ilgili R paketleri http://cran.r-project.org/web/views/WebTechnologies.html aracılığıyla mümkündür. https://github.com/mstrupler/WOS3 gibi diğer dillerde uygulamalar var – ckluss

cevap

13

Ben atıf veri almak ve Kieran Healy tarafından buna benzer bir arsa yapmak için WOS'ları kazımak için RSelenium kullanılabilir (ancak mayın arkeoloji dergileri, yani benim kod buna uyarlanmış):

enter image description here

İşte

# setup broswer and selenium 
library(devtools) 
install_github("ropensci/rselenium") 
library(RSelenium) 
checkForServer() 
startServer() 
remDr <- remoteDriver() 
remDr$open() 
# go to http://apps.webofknowledge.com/ 
# refine search by journal... perhaps arch?eolog* in 'topic' 
# then: 'Research Areas' -> archaeology -> refine 
# then: 'Document types' -> article -> refine 
# then: 'Source title' -> choose your favourite journals -> refine 
# must have <10k results to enable citation data 
# click 'create citation report' tab at the top 
# do the first page manually to set the 'save file' and 'do this automatically', 
# then let loop do the work after that 

# before running the loop, get URL of first page that we already saved, 
# and paste in next line, the URL will be different for each run 
remDr$navigate("http://apps.webofknowledge.com/CitationReport.do?product=UA&search_mode=CitationReport&SID=4CvyYFKm3SC44hNsA2w&page=1&cr_pqid=7&viewType=summary") 

WOS sonucun önümüzdeki birkaç yüz sayfalarından veri toplama otomatikleştirmek için döngü var: İşte (github üzerinde biraz daha büyük projesinden) kod bu s ...

# Loop to get citation data for each page of results, each iteration will save a txt file, I used selectorgadget to check the css ids, they might be different for you. 
for(i in 1:1000){ 
    # click on 'save to text file' 
    result <- try(
    webElem <- remDr$findElement(using = 'id', value = "select2-chosen-1") 
); if(class(result) == "try-error") next; 
    webElem$clickElement() 
    # click on 'send' on pop-up window 
    result <- try(
    webElem <- remDr$findElement(using = "css", "span.quickoutput-action") 
); if(class(result) == "try-error") next; 
    webElem$clickElement() 
    # refresh the page to get rid of the pop-up 
    remDr$refresh() 
    # advance to the next page of results 
    result <- try(
    webElem <- remDr$findElement(using = 'xpath', value = "(//form[@id='summary_navigation']/table/tbody/tr/td[3]/a/i)[2]") 
); if(class(result) == "try-error") next; 
    webElem$clickElement() 
    print(i) 
} 

# there are many duplicates, but the code below will remove them 
# copy the folder to your hard drive, and edit the setwd line below 
# to match the location of your folder containing the hundreds of text files. 

Ar içine tüm metin dosyaları oku ...

# move them manually into a folder of their own 
setwd("/home/two/Downloads/WoS") 
# get text file names 
my_files <- list.files(pattern = ".txt") 
# make list object to store all text files in R 
my_list <- vector(mode = "list", length = length(my_files)) 
# loop over file names and read each file into the list 
my_list <- lapply(seq(my_files), function(i) read.csv(my_files[i], 
                 skip = 4, 
                 header = TRUE,        
                 comment.char = " ")) 
# check to see it worked 
my_list[1:5] 

# use data.table for speed 
install_github("rdatatable/data.table") 
library(data.table) 
my_df <- rbindlist(my_list) 
setkey(my_df) 
# filter only a few columns to simplify 
my_cols <- c('Title', 'Publication.Year', 'Total.Citations', 'Source.Title') 
my_df <- my_df[,my_cols, with=FALSE] 
# remove duplicates 
my_df <- unique(my_df) 
# what journals do we have? 
unique(my_df$Source.Title) 

dergi isimlerinin kısaltmalarını olun tek bir büyük dataframe içine kopyalamanın gelen dataframes listesini birleştirin , makale başlıkları tüm büyük harfleri plotlama için hazır hale getirin ...

yayının on tarafından en çok atıf kağıdı bulun ...

df_top <- my_df[ave(-my_df$Total.Citations, my_df$decade, FUN = rank) <= 10, ] 

# inspecting this df_top table is quite interesting. 

Kieran'ın benzer bir tarzda arsa çizin, bu kod

aynı zamanda onun alanı için arsa çoğaltılabilir Jonathan Goodwin ( 1, 2) geliyor
######## plotting code from from Jonathan Goodwin ########## 
######## http://jgoodwin.net/ ######## 

# format of data: Title, Total.Citations, decade, Source.Title 
# THE WRITERS AUDIENCE IS ALWAYS A FICTION,205,1974-1979,PMLA 

library(ggplot2) 
ws <- df_top 

ws <- ws[order(ws$decade,-ws$Total.Citations),] 
ws$Title <- factor(ws$Title, levels = unique(ws$Title)) #to preserve order in plot, maybe there's another way to do this 

g <- ggplot(ws, aes(x = Total.Citations, 
        y = Title, 
        label = short_title, 
        group = decade, 
        colour = short_title)) 

g <- g + geom_text(size = 4) + 
    facet_grid (decade ~., 
       drop=TRUE, 
       scales="free_y") + 
    theme_bw(base_family="Helvetica") + 
    theme(axis.text.y=element_text(size=8)) + 
    xlab("Number of Web of Science Citations") + ylab("") + 
    labs(title="Archaeology's Ten Most-Cited Articles Per Decade (1970-)", size=7) + 
    scale_colour_discrete(name="Journals") 

g #adjust sizing, etc. 

arsa başka bir sürümü, ancak hiçbir kodla: http://charlesbreton.ca/?page_id=179

İlgili konular