Skip to content

Instantly share code, notes, and snippets.

View tts's full-sized avatar

Tuija Sonkkila tts

View GitHub Profile
@tts
tts / index.html
Created November 8, 2015 11:47
Stacked area chart on Google searches
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Stacked area chart</title>
<script type="text/javascript" src="https://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
@tts
tts / g2013OctobertoDecember.csv
Created November 1, 2015 19:10
Intermediate D3 module 1
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Date
2013-12-31
2013-12-31
2013-12-31
2013-12-31
2013-12-31
2013-12-31
2013-12-31
2013-12-31
2013-12-31
@tts
tts / global.R
Last active October 6, 2015 17:00
Altmetrics demo application for 2:am conference 8.10.2015
library(dplyr)
library(shiny)
library(shinydashboard)
library(ggvis)
library(DT)
library(dygraphs)
library(xts)
library(sunburstR)
library(networkD3)
library(rCharts)
@tts
tts / index.html
Last active October 2, 2015 07:53
Some of my steps in 2013. Exercise in Data Visualization and Infographics with D3 by Knight Center for Journalism in the Americas
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Line Chart</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
<style type="text/css">
body {
background-color: white;
@tts
tts / index.html
Last active October 2, 2015 07:53
Scatterplot on languages in Espoo. Exercise in Data Visualization and Infographics with D3 by Knight Center for Journalism in the Americas
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Languages in Espoo in age groups under 6 and over 65</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
<style type="text/css">
body {
@tts
tts / index.html
Last active October 2, 2015 07:54
Languages in Espoo. Exercise in Data Visualization and Infographics with D3 by Knight Center for Journalism in the Americas
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Languages in Espoo in age groups under 6 and over 65</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
<style type="text/css">
body {
@tts
tts / index.html
Last active October 2, 2015 07:54
Languages spoken in Espoo: binding data. Exercise in Data Visualization and Infographics with D3 by Knight Center for Journalism in the Americas
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Languages spoken in age group under 6</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
<style type="text/css">
@tts
tts / index.html
Last active October 2, 2015 07:54
Languages spoken in the city of Espoo, loading data and some SVG. Exercise in Data Visualization and Infographics with D3 by Knight Center for Journalism in the Americas
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Loading Espoo city language data as CSV, and drawing some SVG</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
<style type="text/css">
body {
font-family: Helvetica, Arial, sans-serif;
padding: 70px;
library(rvest)
# List of Financial Times Research Rank journals
url <- "http://web.lib.aalto.fi/en/journals/?cmd=lists&listid=1"
# <a href="?cmd=show&o=journal&journalid=15">Academy of management journal</a></li>
#
# Journal titles are the text values of the a element
linknodes <- url %>%
html %>%
Kieli,0-6,7-15,16-29,30-44,45-64,65-
Albania,218,211,389,316,177,16
Arabia,232,216,278,442,274,20
Bengali,61,35,162,201,31,0
Englanti,275,164,432,833,392,79
Espanja,47,40,132,303,97,17
Hindi,74,34,76,248,23,5
Kiina,194,133,497,775,258,13
Kurdi,152,143,354,276,136,11
Muut,550,429,1393,2214,849,199