Skip to content

Instantly share code, notes, and snippets.

id name
id_0 A&E closures
id_1 A&E diverts
id_2 Trolley-waits over 12 hours
id_3 Cancelled operations
id_4 Critical care transfers
id_5 Ambulances queuing
id_6 G&A beds
id_7 D&V, Norovirus
id_8 Delayed transfers of care
id_0 A&E closures
id_1 A&E diverts
id_2 Trolley-waits over 12 hours
id_3 Cancelled operations
id_4 Critical care transfers
id_5 Ambulances queuing
id_6 G&A beds
id_7 D&V, Norovirus
id_8 Delayed transfers of care
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>com.edb.launchd.postgresql-9.1</string>
<key>ProgramArguments</key>
##########################################################################################################
#
# Tuija Sonkkila
#
# An interactive R Shiny web application
# on Aalto University lecture data
# from data.aalto.fi
#
# http://linkedscience.org/2013/07/09/an-interactive-r-shiny-application-on-data-aalto-fi-lectures/
#
# Script to create data for http://ukdataexplorer.com/census/
# Author James Trimble, james.trimble at yahoo.co.uk
#
# This code is based on Alex Singleton's work:
# http://rpubs.com/alexsingleton/openatlas
# http://www.alex-singleton.com/2011-census-open-atlas-project/
#
# The script takes around an hour to run. It could be made faster!
# The script requires a lookup table and shapefile from
# https://geoportal.statistics.gov.uk/geoportal/catalog/search/browse/browse.page
library(shiny)
library(maps)
library(maptools)
library(ggplot2)
library(plyr)
library(XML)
# Define server logic required to plot various variables against mpg
shinyServer(function(input, output, session) {
<!DOCTYPE html>
<!--
-- by @hrbrmstr (2013)
-- MIT License
-->
<html>
<head>
<title>Central Maine Power Live Outage Map</title>
<meta charset="utf-8"/>
<meta http-equiv="refresh" content="300"/>
library(RJSONIO)
library(plyr)
#racechart
#Helper functions
getNum=function(x){as.numeric(as.character(x))}
timeInS=function(tStr){
x=unlist(strsplit(tStr,':'))
tS=60*getNum(x[1])+getNum(x[2])
library(rMaps)
library(shiny)
#
# Define UI for application
runApp(
list(ui = ( navbarPage("try",theme ="simplex.min.css",
tabPanel("Analysis",
tabsetPanel(
tabPanel("Summary",
tabsetPanel(
# for *pert functons
library('mc2d')
# given the number of loss events, calculate the sum of losses for the number of events
sample_LM <- function(N, L, ML, H, CONF){
# Calculate the aggregate loss
#
# ARGS:
# N - number of threat events to evaluate
# L - low boundary