Skip to content

Instantly share code, notes, and snippets.

View koooee's full-sized avatar

Nick Kolegraff koooee

  • San Francisco, CA
View GitHub Profile
@koooee
koooee / README.md
Last active January 7, 2016 14:23 — forked from kerryrodden/.block
Sequences sunburst

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
-- get the size of tables and indexes in the database
-- https://wiki.postgresql.org/wiki/Disk_Usage
SELECT nspname || '.' || relname AS "relation",
pg_size_pretty(pg_relation_size(C.oid)) AS "size"
FROM pg_class C
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
WHERE nspname NOT IN ('pg_catalog', 'information_schema')
ORDER BY pg_relation_size(C.oid) DESC
LIMIT 20;
@koooee
koooee / gist:5726084
Last active December 18, 2015 04:29
scipy nltk install on mac osx 10.8.4
sudo port install gcc45 +gfortran
sudo ln -s /opt/local/bin/gfortran-mp-4.5 /opt/local/bin/gfortran
ls -al /opt/local/bin/ | grep gfortran
sudo easy_install scipy #lingalg
sudo easy_install gensim #topic modeling
sudo easy_install pyyaml nltk #NLP
sudo easy_install networkx Matplotlib #graphs