<br><br>

```{r, echo=FALSE}
pldi = read.csv("data.csv")
colnames(pldi)<- c("Timestamp","PLDI_as_TOPLAS","Other_confs", "Journal_for_work", "PLDI_paper_count","Journal_paper_count","Reason_for_journal_paper","Want_OA","Seniority","Country","Academia","x","Have_to_journal")

## Timestamp,I agree with the principle of publishing PLDI as an issue of TOPLAS:,The following other conferences should be considered for special issues of TOPLAS:,Publishing papers in journal is expected by my employer:,I have published the following number of papers at PLDI:,I have published the following number of Journal papers:,I choose to publish in Journals for the following reasons:,I would like my papers to be open access:,Seniority,I work in the following country:,I work in an academic institution:,,(inferred field: are you writing journals only if you have to?)

perc <- function( n, t ) {  paste0( as.integer(n/t*100),"%") }

# Counts
one <-pldi$PLDI_paper_count == "1"
two <- pldi$PLDI_paper_count == "2-5"
six <- pldi$PLDI_paper_count == "6-10"
eleven <- pldi$PLDI_paper_count == "11+"
pldi$PLDI_paper_count <- as.character(pldi$PLDI_paper_count)
pldi$PLDI_paper_count[ TRUE ] <- "0"
pldi$PLDI_paper_count[one | two ] <- "1-5"
pldi$PLDI_paper_count[six | eleven] <- "6+"
pldi$PLDI_paper_count<- as.factor(pldi$PLDI_paper_count)


# Counts
one <-pldi$Journal_paper_count == "1"
two <- pldi$Journal_paper_count == "2-5"
six <- pldi$Journal_paper_count == "6-10"
eleven <- pldi$Journal_paper_count == "11+"
pldi$Journal_paper_count <- as.character(pldi$Journal_paper_count)
pldi$Journal_paper_count[ TRUE ] <- "0"
pldi$Journal_paper_count[one | two ] <- "1-5"
pldi$Journal_paper_count[six | eleven] <- "6+"
pldi$Journal_paper_count<- as.factor(pldi$Journal_paper_count)

# Countries
pldi$Country <- as.character(pldi$Country)
pldi$Country[ grepl("Swi", pldi$Country) ] <- "CH"
pldi$Country[ grepl("US", pldi$Country) ] <- "USA"
pldi$Country[ grepl("us", pldi$Country) ] <- "USA"
pldi$Country[ grepl("Us", pldi$Country) ] <- "USA"
pldi$Country[ grepl("United States", pldi$Country) ] <- "USA"
pldi$Country[ grepl("United Kingdom", pldi$Country) ] <- "UK"
pldi$Country[ grepl("Uk", pldi$Country) ] <- "UK"
pldi$Country[ grepl("France", pldi$Country) ] <- "FR"
pldi$Country[ grepl("FRANCE", pldi$Country) ] <- "FR"
pldi$Country <- as.factor(pldi$Country)

non_US_countries = length(levels(pldi$Country)) - 2  # removing USA, NA

pldi$Country <- as.character(pldi$Country)
usa <- pldi$Country == "USA"
pldi$Country[ TRUE ] <- "World"
pldi$Country[ usa ] <- "USA"
pldi$Country <- as.factor(pldi$Country)

##
pldi$Want_OA[pldi$Want_OA == ""] <- "Don't care"
##
total <- length(pldi$Country)
```

## Population

This survey was conducted in June 2014 by emailing a Google Form to all attendees of PLDI, including the co-located conferences and workshops. There were <b>`r length(pldi$Country)`</b> responses.  The respondents were `r perc( length(pldi$Academia[pldi$Academia=="Yes"]),total)` academic. In terms of seniority, `r perc( length(pldi$Seniority[ pldi$Seniority == "Senior researcher or Post-tenure academic"]), total)` self-described as being either a senior researcher or a tenured academic.  `r perc( length( pldi$Country[pldi$Country == "USA"]),total)` of respondents work in the USA, the remainder is spread across `r non_US_countries` different countries (the three most represented non-US countries were France, the United Kingdom and Switzerland).

The poll also asked respondent to indicate how many papers they had published at PLDI and how many journal papers they had published.

```{r,echo=FALSE}

par(mfrow=c(1,2))
pie(summary(pldi$Academia),col=c("black","white","black"),main="Are you an Academic?")
pie(summary(pldi$Seniority),label=c("","Junior","Senior","Student"),main="Are you Senior?")

par(mfrow=c(1,2))
pie(summary(pldi$PLDI_paper_count),main="PLDI papers published?")
pie(summary(pldi$Journal_paper_count),main="Journal papers published?")

pie(summary(pldi$Country),main="Where do you work?")
```


## Publication Venues: Journals or Conferences

The respondents indicate that in `r perc( length(pldi$Journal_for_work[ pldi$Journal_for_work == "Yes"]),total)` of the cases, their employer expects them to publish in journals.

```{r,echo=FALSE}
pie(summary(pldi$Journal_for_work),col=c("lightgrey","white","black"),main="Are Journal Papers needed for your job?")
```

For authors who have never published a journal paper,
`r perc( length(pldi$Journal_for_work[ pldi$Journal_for_work == "No" & pldi$Journal_paper_count == 0]), length(pldi$Journal_for_work[ pldi$Journal_paper_count == 0]))` of them indicate their work does not require them to publish papers. More journal papers are written by authors who feel that this is required by their employer.

There is a marked split in expectations between authors working in the USA and those in the rest of the world. In the USA, 
`r perc( length(pldi$Journal_for_work[ pldi$Journal_for_work == "No" & pldi$Country == "USA"]), length(pldi$Journal_for_work[ pldi$Country== "USA"]))` of respondent are not expected to publish journal papers, whereas in the rest of the world this number is only
`r perc( length(pldi$Journal_for_work[ pldi$Journal_for_work == "No" & pldi$Country == "World"]), length(pldi$Journal_for_work[ pldi$Country== "World"]))`.   This suggests that employers in the USA have a better understanding of CS publication venues than in the rest of the world.

<br>



```{r,echo=FALSE}
par(mfrow=c(1,3),mar=c(1, 1, 1, 0))

pie(summary(pldi$Journal_for_work[ pldi$Journal_paper_count == "0"]),col=c("lightgrey","white","black"),main="Journal needed? (Zero papers)")
pie(summary(pldi$Journal_for_work[ pldi$Country == "World"]),col=c("lightgrey","white","black"),main="Journal needed? (World)")
pie(summary(pldi$Journal_for_work[ pldi$Country == "USA"]),col=c("lightgrey","white","black"),main="Journal needed? (USA)")
```


When asked whether they would support publishing the proceedings of PLDI as a special issue of TOPLAS, `r perc( length(pldi$PLDI_as_TOPLAS[ pldi$PLDI_as_TOPLAS == "Yes"]), total)` agreed.

```{r,echo=FALSE}
pie(summary(pldi$PLDI_as_TOPLAS),col=c("white","lightgrey","black"),main="Should PLDI be published as a special issue of TOPLAS?")
```

The strenght of the support for this change depends on the country of the respondent and seniority.

```{r,echo=FALSE}
par(mfrow=c(2,2),mar=c(1, 1, 1, 0))

pie(summary(pldi$PLDI_as_TOPLAS[ pldi$Country == "USA"]),col=c("white","lightgrey","black"),main=" PLDI in TOPLAS? (USA)")
pie(summary(pldi$PLDI_as_TOPLAS[ pldi$Country == "World"]),col=c("white","lightgrey","black"),main="PLDI in TOPLAS? (World)")
senior <- grepl("Senior", pldi$Seniority)
pie(summary(pldi$PLDI_as_TOPLAS[ senior]),col=c("white","lightgrey","black"),main=" PLDI in TOPLAS? (Senior)")
pie(summary(pldi$PLDI_as_TOPLAS[ !senior]),col=c("white","lightgrey","black"),main="PLDI in TOPLAS? (non Senior)")
```


## Open Access

When asked a generic question about their support for open access, `r perc( length(pldi$Want_OA[pldi$Want_OA=="Yes"]) , total )` are in
favor. None was opposed.

```{r,echo=FALSE}
pie(summary(pldi$Want_OA),col=c("black","lightgrey","black"),main="Do you want OA?")
```

## Comments

The respondents were asked to provide textual comments explaining why they publish in journals.

```{r,echo=FALSE}
pldi$Reason_for_journal_paper[ pldi$Reason_for_journal_paper != ""]
```


### Repeatability

A PDF file with questions asked in this poll is  [here](http://janvitek.org/who/pldi/survey.pdf).

A CSV file with answers is [here](http://janvitek.org/who/pldi/data.csv.

A PDF file with the Google Form overview of the responses is [here](http://janvitek.org/who/pldi/results.pdf).

The R Markdown code for this document is [here](http://janvitek.org/who/pldi/index.Rmd).
