Skip to content

Instantly share code, notes, and snippets.

<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='http://cdn.oesmith.co.uk/morris-0.4.2.min.css'>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js' type='text/javascript'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js' type='text/javascript'></script>
<script src='http://cdn.oesmith.co.uk/morris-0.4.2.min.js' type='text/javascript'></script>

metagraf

Prisbasbelopp

Data för de olika indexen har hämtats från SCB:s API för Statistikdatabasen. Utifrån dessa har sedan de alternativa prisbasbeloppen beräknats.

metagraf

Prisbasbelopp

Data för de olika indexen har hämtats från SCB:s API för Statistikdatabasen. Utifrån dessa har sedan de alternativa prisbasbeloppen beräknats.

cData <- read.table(textConnection("
no Grade Count
1 01 40272
2 02 36902
3 03 1288
4 04 992
5 05 517
6 K 334
7 KA 8236
8 KP 6704"), sep = '', header = T
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://code.jquery.com/jquery-1.9.1.min.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/highcharts.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/highcharts-more.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/modules/exporting.js' type='text/javascript'></script>
@reinholdsson
reinholdsson / README.md
Created August 25, 2013 09:38
Chart comments shiny app
@reinholdsson
reinholdsson / README.md
Created September 9, 2013 08:45 — forked from mbostock/.block

This bar chart visualizes hierarchical data using D3. Each blue bar represents a folder, whose length encodes the total size of all files in that folder (and all subfolders). Clicking on a bar dives into that folder, while clicking on the background bubbles back up to the parent folder. The effect is similar to a zoomable partition layout, though in a more conventional display.

@reinholdsson
reinholdsson / gist:7271120
Last active December 27, 2015 04:59
R ReferenceClasses: dynamically create methods and overload tab autocomplete
# Variables to loop
vars <- c("var1", "var2")
# Generate a list of functions (specific for each variable)
var_methods <- lapply(vars, function(i){
fun <- function(var = i) paste("This is", var)
formals(fun)$var <- i
return(fun)
})
names(var_methods) <- vars
@reinholdsson
reinholdsson / Makefile
Last active December 18, 2020 17:04
RMarkdown to PDF with pandoc (using Makefile)
build:
Rscript build.r
clean:
rm -rf *.tex *.tex-e *.bbl *.blg *.aux *.out *.log *.spl plots/ cache/ *.gz\(busy\) *.gz *.pdf
@reinholdsson
reinholdsson / knit
Created November 12, 2013 18:42 — forked from baptiste/knit
#!/usr/bin/Rscript
require(knitr)
lf <- commandArgs(trailingOnly = TRUE)
if(!length(lf))
lf = list.files(pattern="\\.rmd")
for (f in lf)
try(knit(f))
md = paste0(sub("\\.[[:alnum:]]*$", "", lf), ".md")