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
library(shiny) | |
library(shinydashboard) | |
library(dplyr) | |
library(tidyr) | |
library(ggvis) | |
library(DT) | |
library(d3heatmap) | |
load("ref2014impact.Rda") |
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
library(httr) | |
alchemy_url <- "http://access.alchemyapi.com/" | |
call <- "calls/text/TextGetRankedConcepts" | |
api_key <- "[your API key here]" | |
text <- "Indeed the Environment Agency inform us that these guidelines have been used as the basis of several hundred appraisals for the ongoing WaterIndustry Price Review process 10" | |
# The following doesn't work. 'Status: 404, Content-Type: <unknown>' | |
# |
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
library(rvest) | |
url <- "http://math.aalto.fi/en/current/publications/articles/" | |
linknodes <- url %>% | |
html %>% | |
html_nodes(xpath = "//a[starts-with(@href,'/en/current/publications/bibtex')]") | |
ids <- linknodes %>% | |
html_attr("href") %>% |
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
########################################################## | |
# | |
# Helsinki roadmap and 3D buildings rendered | |
# on a georeferenced map of Kulosaari from 1917 | |
# as an intearctive leaflet map. | |
# | |
# See http://tuijasonkkila.fi/blog/2015/03/2015-on-1917/ | |
# | |
# Map of Kulosaari | |
# Helsingin kaupungin tietokeskus; |
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
library(shiny) | |
library(leaflet) | |
library(shinythemes) | |
library(dplyr) | |
# See http://tuijasonkkila.fi/blog/2015/03/birds-on-a-map/ | |
# http://atlas3.lintuatlas.fi/taustaa/kaytto | |
# | |
# linnut <- read.table("lajit.csv", sep = ",", stringsAsFactors = F, quote = "") |
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
# Tuija Sonkkila 3.3.2015 | |
# | |
# Aalto University articles cited in Wikipedia with the DOI. | |
# This code makes node and node attribute files for a network graph visualization. | |
# | |
# Wikipedia data CC0: | |
# Halfaker, Aaron; Taraborelli, Dario (2015): Scholarly article citations in Wikipedia. figshare. | |
# http://dx.doi.org/10.6084/m9.figshare.1299540 | |
# Retrieved 15:17, Mar 02, 2015 (GMT) | |
# |
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
# Tuija Sonkkila 8.2.2015 | |
# Aalto University PubMed articles cited in Wikipedia, and the number of page watchers (if given) | |
# | |
# Dataset (CC0): | |
# Halfaker, Aaron; Taraborelli, Dario (2015): Scholarly article citations in Wikipedia. figshare. | |
# http://dx.doi.org/10.6084/m9.figshare.1299540 | |
# Retrieved 09:35, Feb 08, 2015 (GMT) | |
library(dplyr) | |
library(jsonlite) |
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
#################################################################### | |
# | |
# Code by Andy Teucher | |
# | |
# https://github.com/ateucher/crd_rare_bird_bot/blob/master/fun.R | |
# | |
#################################################################### | |
shorten <- function(url, bitlytoken) { | |
stop_for_status(GET(url)) |
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
################################################################### | |
# | |
# Data by Finnish Meteorological Institute | |
# http://en.ilmatieteenlaitos.fi/open-data-licence | |
# | |
# rmi R package Jussi Jousimo et al. (C) 2014 | |
# https://github.com/rOpenGov/fmi | |
# | |
# Blog post http://tuijasonkkila.fi/blog/2015/01/snow-in-lapland/ | |
# |
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
# Code by Andy Teucher | |
# | |
# https://github.com/ateucher/crd_rare_bird_bot/blob/master/fun.R | |
shorten <- function(url, token) { | |
stop_for_status(GET(url)) | |
res <- GET("https://api-ssl.bitly.com/v3/shorten", | |
query = list(access_token=token, longUrl=url)) | |