Skip to content

Instantly share code, notes, and snippets.

@laurenancona
laurenancona / OCP-html-tpl-php
Created August 14, 2012 17:23
html.tpl.php OCP
<?php
/**
* @file
* Default theme implementation to display the basic html structure of a single
* Drupal page.
*
* Variables:
* - $css: An array of CSS files for the current page.
* - $language: (object) The language the site is being displayed in.
@laurenancona
laurenancona / OCP-html-tpl-php
Created August 14, 2012 18:35
html.tpl.php OCP
<?php
/**
* @file
* Default theme implementation to display the basic html structure of a single
* Drupal page.
*
* Variables:
* - $css: An array of CSS files for the current page.
* - $language: (object) The language the site is being displayed in.
@laurenancona
laurenancona / css box
Created September 17, 2012 23:33
Rounded Corners Centered Text Box
<div style="margin-left:auto;
margin-right:auto;
width: 100px;
height: 45px;
line-height:45px;
border-radius: 20px 20px 20px 20px;
background-color: rgb(153, 153, 51);
text-align:center;">
<span style="font-size:12pt;
@laurenancona
laurenancona / gist:5271550
Created March 29, 2013 15:30
Universal Analytics DataLayer (Customized)
Paste JS or upload file here
@laurenancona
laurenancona / gist:ef2e75f844f9757073a3
Created June 27, 2014 17:40
Overlapping Districts
District 25 – The area bounded by the north side of Girard avenue to its intersection with the Delaware Expressway, the Delaware Expressway to its intersection with Kensington avenue, along the east side of Kensington avenue to its intersection with York street, along the south side of York street to its intersection with Sixth street and along the east side of Sixth street to its intersection with Girard avenue. 219 Added, Bill No. 969 (approved December 28, 1995, 1995 Ordinances, p. 1263); amended, Bill No. 980763-A (approved June 1, 1999).219
<--and-->
District 30 – The area bounded by the east side of Broad street on the west, the SEPTA Regional High Speed Line on the north, the north side of Girard avenue on the south, and the west side of Front street on the east. 220.4 Added, Bill No. 120799 (approved January 14, 2013).220.4
@laurenancona
laurenancona / designer.html
Last active August 29, 2015 14:09
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
@laurenancona
laurenancona / googleSheets.r
Last active August 29, 2015 14:15
Import Google Spreadsheets data into R
#Load dependencies
library(XML)
library(httr)
# Sheet needs to be published, replace URL below & update tab number on line 19
# (if more than 1, L-R) where 'sheet = 1'
# Be sure to unfreeze any cells to prevent empty rows on import
url <- "https://docs.google.com/spreadsheets/d/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/pubhtml"
@laurenancona
laurenancona / regex-ua-id
Created April 6, 2015 16:36
Regex Pattern for Universal Analytics Profile IDs
UA-[0-9]{5,}-[0-9]{1,}
@laurenancona
laurenancona / README.md
Last active August 29, 2015 14:19 — forked from kerryrodden/.block

This example shows how it is possible to use a D3 sunburst visualization (partition layout) with data that describes sequences of events.

A good use case is to summarize navigation paths through a web site, as in the sample synthetic data file (visit_sequences.csv). The visualization makes it easy to understand visits that start directly on a product page (e.g. after landing there from a search engine), compared to visits where users arrive on the site's home page and navigate from there. Where a funnel lets you understand a single pre-selected path, this allows you to see all possible paths.

Features:

  • works with data that is in a CSV format (you don't need to pre-generate a hierarchical JSON file, unless your data file is very large)
  • interactive breadcrumb trail helps to emphasize the sequence, so that it is easy for a first-time user to understand what they are seeing
  • percentages are shown explicitly, to help overcome the distortion of the data that occurs wh
@laurenancona
laurenancona / index.html
Last active August 29, 2015 14:19
sunbursting
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Page Path sunburst</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<link rel="stylesheet" type="text/css"
href="https://fonts.googleapis.com/css?family=Open+Sans:400,600">
<link rel="stylesheet" type="text/css" href="sequences.css"/>
</head>