Patents

Row

Top Assignes

Hchart

caption

caption

Row

Citation Network

assignee_organization mean_perc db_pats ttl_pats frac_db_pats color
International Business Machines Corporation 0.4938293 35 111916 0.000 #f1c40f
GENERAL ELECTRIC COMPANY 0.4993379 38 41692 0.001 #f1c40f
Microsoft Corporation 0.5906740 12 29694 0.000 #f1c40f
Koninklijke Philips Electronics N.V. 0.5497855 4 10314 0.000 #f1c40f
3M Innovative Properties Company 0.4352295 3 9688 0.000 #f1c40f
AT&T Intellectual Property I, L.P. 0.4314450 8 9540 0.001 #f1c40f

Citation Network 2

Scientometric

Row

Top Articles

Paper TC TCperYear
BANSAL P;KOCKELMAN KM;SINGH A,(2016),TRANSP. RES. PT. C-EMERG. TECHNOL. 13 6.5
TALEBPOUR A;MAHMASSANI HS,(2016),TRANSP. RES. PT. C-EMERG. TECHNOL. 11 5.5
MUTZ F;VERONESE LP;OLIVEIRA-SANTOS T;DE AGUIAR E;AUAT CHEEIN FA;DE SOUZA AF,(2016),EXPERT SYST. APPL. 11 5.5
GONZALEZ D;PEREZ J;MILANES V;NASHASHIBI F,(2016),IEEE TRANS. INTELL. TRANSP. SYST. 9 4.5
CHEN L;ENGLUND C,(2016),IEEE TRANS. INTELL. TRANSP. SYST. 9 4.5
LI SE;GAO F;CAO D;LI K,(2016),IEEE TRANS. VEH. TECHNOL. 8 4.0
KRUEGER R;RASHIDI TH;ROSE JM,(2016),TRANSP. RES. PT. C-EMERG. TECHNOL. 7 3.5
AKYILDIZ IF;WANG P;LIN S,(2016),AD HOC NETW. 7 3.5
ZHENG Y;LI SE;LI K;WANG L,(2016),IEEE TRANS. CONTROL SYST. TECHNOL. 7 3.5
LI X;SUN Z;CAO D;HE Z;ZHU Q,(2016),IEEE-ASME TRANS. MECHATRON. 7 3.5

Most Productive Countries

Country Total Citations Average Article Citations
USA 91 0.7982
CHINA 52 0.8000
SPAIN 18 0.7826
FRANCE 16 0.6400
SWEDEN 16 0.8889
BRAZIL 15 1.3636
CANADA 10 0.7143
AUSTRALIA 9 0.5294
ITALY 9 0.6000
NORWAY 9 1.8000

Row

Most Relevant Sources

Sources Articles
2016 IEEE 19TH INTERNATIONAL CONFERENCE ON INTELLIGENT TRANSPORTATION SYSTEMS (ITSC) 39
IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS 31
2016 IEEE INTELLIGENT VEHICLES SYMPOSIUM (IV) 22
SENSORS 17
TRANSPORTATION RESEARCH PART C-EMERGING TECHNOLOGIES 16
2016 IEEE/RSJ INTERNATIONAL CONFERENCE ON INTELLIGENT ROBOTS AND SYSTEMS (IROS 2016) 11
OCEANS 2016 MTS/IEEE MONTEREY 9
2016 IEEE 55TH CONFERENCE ON DECISION AND CONTROL (CDC) 8
IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY 8
ROBOTICS AND AUTONOMOUS SYSTEMS 8

News

Row

Google News

Yahoo News

Row

geom_density and facet_wrap Together

Density and Scatterplot Overlay Using geom_density

OECD

Row

stat_density Example

Add Conditional Density Curves to Plot

Row

geom_density and facet_wrap Together

Density and Scatterplot Overlay Using geom_density

EUROSTAT

Row

Sector Investment

Countries Analisys

Row

geom_density and facet_wrap Together

Density and Scatterplot Overlay Using geom_density

Social Media

Row

Common words

Wordcloud

Row

geom_density and facet_wrap Together

Density and Scatterplot Overlay Using geom_density

Survey

Row

Sector Investment

Countries analysis

Row

geom_density and facet_wrap Together

Density and Scatterplot Overlay Using geom_density

Start-up monitoring

Row

stat_density Example

Add Conditional Density Curves to Plot

---
title: "IMtool2"
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    social: menu
    source_code: embed
---

```{r setup, include=FALSE}
library(ggplot2)
library(plotly)
library(plyr)
library(flexdashboard)
```

Search
=======================================================================

Row
-----------------------------------------------------------------------

### stat_density Example

```{r}

```

### Add Conditional Density Curves to Plot

```{r}

```

Row
-----------------------------------------------------------------------

### geom_density and facet_wrap Together

```{r}

```

### Density and Scatterplot Overlay Using geom_density

```{r}

```

Patents
=======================================================================

```{r}
library(patentsview)
library(dplyr)
library(highcharter)
library(DT)
library(knitr)

query <- with_qfuns(
      or(
            text_phrase(patent_abstract = "Healthcare"),
            text_phrase(patent_title = "Healthcare")
      )
)

fields <- c("patent_number", "assignee_organization",
            "patent_num_cited_by_us_patents", "app_date", "patent_date",
            "assignee_total_num_patents")

# Send an HTTP request to the PatentsView API to get data:
pv_out <- search_pv(query = query, fields = fields, all_pages = TRUE)

dl <- unnest_pv_data(data = pv_out$data, pk = "patent_number")

```

```{r echo=FALSE}
top_asgns <- dl$assignees %>%
      filter(!is.na(assignee_organization)) 
top_asgns <- mutate(top_asgns, ttl_pats = as.numeric(assignee_total_num_patents))

top_asgns <- group_by(top_asgns, assignee_organization, ttl_pats) 
top_asgns <- summarise(top_asgns, db_pats = n()) 
top_asgns <- mutate(top_asgns, frac_db_pats = round(db_pats / ttl_pats, 3))
top_asgns <- ungroup(top_asgns)
top_asgns <- select(top_asgns,c(1, 3, 2, 4))
top_asgns <- arrange(top_asgns,desc(db_pats))
top_asgns <- slice(top_asgns, c(1:75))

```

Row
-----------------------------------------------------------------------

### Top Assignes

```{r}
# Create datatable:
datatable(
      data = top_asgns,
      rownames = FALSE,
      colnames = c("Assignee", "AV patents","Total patents", 
                   "AV patents / total patents"),
      caption = htmltools::tags$caption(
            style = 'caption-side: top; text-align: left; font-style: italic;',
            "Table 1: Top assignees in 'Autonomous Vehicles'"
      ),
      options = list(pageLength = 10)
)
```


### Hchart

![caption](/home/fabio/MEGA/IMTOOL2/IMtool2/images/chart.png)


Row
-----------------------------------------------------------------------

### Citation Network

```{r}
percent_rank2 <- function(x)
      (rank(x, ties.method = "average", na.last = "keep") - 1) / (sum(!is.na(x)) - 1)

# Create a data frame with normalized citation rates and stats from Step 2: 
asng_p_dat <-
      dl$patents %>%
      mutate(patent_yr = substr(patent_date, 1, 4)) %>%
      group_by(patent_yr) %>%
      mutate(perc_cite = percent_rank2(patent_num_cited_by_us_patents)) %>%
      inner_join(dl$assignees) %>%
      group_by(assignee_organization) %>%
      summarise(mean_perc = mean(perc_cite)) %>%
      inner_join(top_asgns) %>%
      arrange(desc(ttl_pats)) %>%
      filter(!is.na(assignee_organization)) %>%
      slice(1:20) %>%
      mutate(color = "#f1c40f") %>%
      as.data.frame()

kable(head(asng_p_dat), row.names = FALSE)
```


### Citation Network 2

```{r}

```


Scientometric
=======================================================================

```{r include=FALSE}
library(bibliometrix)
library(treemap)
library(tm)
library(pander)
library(knitr)

Dtisi <- readFiles("~/MEGA/IMTOOL2/IMtool2/data/savedrecs.bib")
database <- convert2df(Dtisi, dbsource = "isi", format = "bibtex")
dfbiblio <- biblioAnalysis(database, sep = ";")
df.summary <- summary(object = dfbiblio, k = 10, pause = FALSE)
```


Row
-----------------------------------------------------------------------

### Top Articles 

```{r}
knitr::kable(df.summary$MostCitedPapers)
```

### Most Productive Countries

```{r}
knitr::kable(df.summary$TCperCountries, align = 'c')
```

Row
-----------------------------------------------------------------------

### Most Relevant Sources

```{r}
knitr::kable(df.summary$MostRelSources)
```

### Most Related Keyword

```{r}
knitr::kable(df.summary$MostRelKeywords)
```

Trends
=======================================================================

```{r include=FALSE}
library(gtrendsR)
library(forecast)
library(tseries)

keyword = c("Healthcare innovation", "Healthcare Technologies")

res = gtrends(keyword)

keyword_pt = "Inovações em Saúde"

res_pt = gtrends(keyword_pt)

gt.fc.en <- res$interest_over_time
fc.en <- forecast(res$hits)

xt_en <- window(gt.fc.en[,2],end=218)
xf_en <- window(gt.fc.en[,2],start=219)
```


Row
-----------------------------------------------------------------------

### Google Trends World

```{r}
plot(res)
```

### Forecast analysis - EN

```{r}
rwd_en <- rwf(xt_en,drift=T,h=25)
plot(rwd_en,main="Random Walk with Drift Method",ylab="Level",xlab="Tseries")
lines(gt.fc.en[,2])
```

Row
-----------------------------------------------------------------------

### Google Trends - Brasil


### Forecast Analysis - Brazil

News
=======================================================================


Row
-----------------------------------------------------------------------

### Google News



### Yahoo News


Row
-----------------------------------------------------------------------

### geom_density and facet_wrap Together

```{r}

```

### Density and Scatterplot Overlay Using geom_density

```{r}

```

OECD
=======================================================================

Row
-----------------------------------------------------------------------

### stat_density Example

```{r}

```

### Add Conditional Density Curves to Plot

```{r}

```

Row
-----------------------------------------------------------------------

### geom_density and facet_wrap Together

```{r}

```

### Density and Scatterplot Overlay Using geom_density

```{r}

```

EUROSTAT
=======================================================================

```{r include=FALSE}
library(eurostat)
library(rvest)
# Check Id
id <- search_eurostat("Passenger cars, by alternative motor energy and by power of vehicles",type = "dataset")$code[1]

# Download Dataset
dat <-get_eurostat(id, time_format = "num", type = "label")
dat <- data.frame(dat)


# Subset by type of energy
elec <- subset(dat, prod_nrg == "Electrical Energy", select = c(geo, time, values))
gas <- subset(dat, prod_nrg == "Natural Gas", select = c(geo, time, values))
lpg <- subset(dat, prod_nrg == "LPG", select = c(geo, time, values))
other <- subset(dat, prod_nrg == "Other products", select = c(geo, time, values))
total <- subset(dat, prod_nrg == "Total", select = c(geo, time, values)) 
      
# Total analysis
el.date <- aggregate(values ~ time, elec, sum)
gas.date <- aggregate(values ~ time, gas, sum)
lpg.date <- aggregate(values ~ time, lpg, sum)
other.date <- aggregate(values ~ time, other, sum)
total.date <- aggregate(values ~ time, total, sum)
```


Row
-----------------------------------------------------------------------

### Sector Investment

```{r}
# Plot by Sector/Years
p <- plot(el.date, type='o', 
          col="red", 
          ylab="Amount of Eur(millions)", 
          xlab="Years",
          ylim = c(0, 10000))

points(values ~ time, data=gas.date, type='b', col="green")
points(values ~ time, data=lpg.date, type='l',lty=2, col="blue")
points(values ~ time, data=other.date, type='l', col="orange")
title(main="Investiment in Automotive Sector in UE", col.main="black", font.main=4)
legend("topleft", 
       c("Electric", "Gas", "Lpg", "Other"), 
       lty = c(1,1,1,1), 
       col = c("red", "green", "blue", "orange"))
```

### Countries Analisys

```{r}
# Dendogram
total.geo <- aggregate(values ~ geo, total, sum)
dd <- dist(scale(total.geo$values), method = "euclidean")
name <- as.factor(total.geo$geo)
hc <- hclust(dd, method = "ward.D2")
plot(hc)
```

Row
-----------------------------------------------------------------------

### geom_density and facet_wrap Together

```{r}

```

### Density and Scatterplot Overlay Using geom_density

```{r}

```

Trends Series (BETS)
=======================================================================

Row
-----------------------------------------------------------------------

### stat_density Example

```{r}

```

### Add Conditional Density Curves to Plot

```{r}

```

Row
-----------------------------------------------------------------------

### geom_density and facet_wrap Together

```{r}

```

### Density and Scatterplot Overlay Using geom_density

```{r}

```

Social Media
=======================================================================

```{r include=FALSE}
consumer_key <- 'YetGrrFzoeN0UUQfCZoQERsYg'
consumer_secret <- 'xb2sXMwcLOP5HNERJBgPw2gCHUPjSSFy0VLhRScgJjfkCaP79K'
access_token <- '293631173-p2Kv4K7BW41D0vNXc5OQgdBR5nCwR4D7pmiiTgyh'
access_secret <- 'JpO4Wik99qyREddOfi0zdnxhsUdhhv1PhjbL52i4gqoHv'
library(httr)
library(devtools)
library(twitteR)
library(base64enc)
setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_secret)

tweets <- searchTwitter("autonomous vehicles",n=300,lang="en")
tweets_df = twListToDF(tweets)

library(tm)

mycorpus = Corpus(VectorSource(tweets_df$text))
mycorpus = tm_map(mycorpus, stripWhitespace)
mycorpus = tm_map(mycorpus, tolower)
mycorpus = tm_map(mycorpus, removePunctuation)

# keep a copy for stem completion later
myCorpusCopy <- mycorpus

dtm <- DocumentTermMatrix(mycorpus)

freq <- colSums(as.matrix(dtm))

ord <- order(freq,decreasing=TRUE)

freq[head(ord)]

tdm <- TermDocumentMatrix(mycorpus,
                          control = list(wordLengths = c(1, Inf)))

term.freq <- rowSums(as.matrix(tdm))
term.freq <- subset(term.freq, term.freq >= 20)
df <- data.frame(term = names(term.freq), freq = term.freq)
```


Row
-----------------------------------------------------------------------

### Common words

```{r echo=FALSE}
library(ggplot2)
ggplot(df, aes(x=term, y=freq)) + geom_bar(stat="identity") +
  xlab("Terms") + ylab("Count") + coord_flip() +
  theme(axis.text=element_text(size=7))
```

### Wordcloud

Row
-----------------------------------------------------------------------

### geom_density and facet_wrap Together

```{r}

```

### Density and Scatterplot Overlay Using geom_density

```{r}

```

Survey
=======================================================================

```{r}

```


Row
-----------------------------------------------------------------------

### Sector Investment

```{r}

```

### Countries analysis 

```{r}

```

Row
-----------------------------------------------------------------------

### geom_density and facet_wrap Together

```{r}

```

### Density and Scatterplot Overlay Using geom_density

```{r}

```

Start-up monitoring
=======================================================================

Row
-----------------------------------------------------------------------

### stat_density Example

```{r}

```

### Add Conditional Density Curves to Plot

```{r}

```