From d1c8e898f5a61c057874dbfd3cda35e057c59c15 Mon Sep 17 00:00:00 2001 From: dsc Date: Mon, 26 Mar 2012 15:51:04 -0700 Subject: [PATCH] Adds and updates docs/notes. --- docs/dataset-spec.yaml | 35 ----------------------------------- docs/internals/chart-type.md | 5 +++++ docs/internals/dashboard.md | 8 ++++++++ docs/internals/dataset-spec.yaml | 37 +++++++++++++++++++++++++++++++++++++ docs/internals/scaffold.md | 2 ++ docs/internals/vis-editor.md | 2 ++ docs/notes.md | 32 ++++++++++++++++++++++++++++++++ docs/notes/graphs.md | 3 +++ docs/notes/notes.md | 17 ----------------- docs/todo.md | 8 +++----- 10 files changed, 92 insertions(+), 57 deletions(-) delete mode 100644 docs/dataset-spec.yaml create mode 100644 docs/internals/chart-type.md create mode 100644 docs/internals/dashboard.md create mode 100644 docs/internals/dataset-spec.yaml create mode 100644 docs/internals/scaffold.md create mode 100644 docs/internals/vis-editor.md create mode 100644 docs/notes.md delete mode 100644 docs/notes/notes.md diff --git a/docs/dataset-spec.yaml b/docs/dataset-spec.yaml deleted file mode 100644 index e3a4c6f..0000000 --- a/docs/dataset-spec.yaml +++ /dev/null @@ -1,35 +0,0 @@ -### Kraken Dataset Spec ### - -# Describes the format of dataset json/yaml files for use in the Kraken chart UI. -# Reminder: the project transparently compiles any .yaml files requested as .json -# at request time -- you're welcome to generate them in either form. - -# TODO: Thrift/Avro schema? - - -id : Unique identifier for this dataset. This file should be named `{id}.{ext}` - and live in the data directory alongside the data file. -name : Human-friendly name for the dataset. -format : Data format. Valid: csv, json. (Maybe in the future: yaml, xml, etc.) -url : Canonical URL for the dataset's data file: /data/ - -# Timespan and quanta covered by this dataset -timespan : - start : Start of the dataset, eg: 2012-01-01T00:00:00 or 2012-01-01 or 1325404800 - All dates should be seconds-since-the-epoch, or ISO-8601 formatted: YYYY-MM-DDThh:mm:ss.s - See also: http://www.w3.org/TR/NOTE-datetime - end : End of the dataset, eg: 2012-02-01T00:00:00 or 2012-02-01 or 1328083200 - step : Amount of time between elapsed between each row, measured in seconds, eg: 86400 - -# Metadata about the datatypes -columns : - labels : List of the column-names in order. (Future optimization: the date column could - be omitted if the data is sorted and contains no gaps -- each datapoint is exactly - timespan.step apart, and none are missing.) - types : List of the column datatype-names in order. Valid type names: date, float, int. - -# Defaults for charting -chart : - library : Visualization library to use. Valid: dygraphs. - options : Dict of option-names to values. - diff --git a/docs/internals/chart-type.md b/docs/internals/chart-type.md new file mode 100644 index 0000000..29f2e12 --- /dev/null +++ b/docs/internals/chart-type.md @@ -0,0 +1,5 @@ +# ChartType + +ChartType is an abstraction on charting libraries to allow them to plug into the GraphKit framework. + + diff --git a/docs/internals/dashboard.md b/docs/internals/dashboard.md new file mode 100644 index 0000000..29a5e15 --- /dev/null +++ b/docs/internals/dashboard.md @@ -0,0 +1,8 @@ +# Dashboard + +## Features + +- Home: Marquee/highlighted graphs showed, plus +- Browse graphs by time, cat, tag +- View a graphs -> Edit + diff --git a/docs/internals/dataset-spec.yaml b/docs/internals/dataset-spec.yaml new file mode 100644 index 0000000..5a243fe --- /dev/null +++ b/docs/internals/dataset-spec.yaml @@ -0,0 +1,37 @@ +### Kraken Dataset Spec ### + +# Describes the format of dataset json/yaml files for use in the Kraken chart UI. +# Reminder: the project transparently compiles any .yaml files requested as .json +# at request time -- you're welcome to generate them in either form. + +# TODO: Thrift/Avro schema + + +id : Unique identifier for this dataset. This file should be named `{id}.{ext}` + and live in the data directory alongside the data file. +name : Human-friendly name for the dataset. +format : Data format. Valid: csv, json. (Maybe in the future: yaml, xml, etc.) +url : Canonical URL for the dataset's data file: /data/ + +### Timespan and quanta covered by this dataset +timespan : + start : Start of the dataset, eg: 2012/01/01T00:00:00 or 2012/01/01 or 1325404800 + All dates should be seconds-since-the-epoch, or ISO-8601 formatted: YYYY/MM/DDThh:mm:ss.s + See also: http://www.w3.org/TR/NOTE-datetime + And: http://blog.dygraphs.com/2012/03/javascript-and-dates-what-mess.html + end : End of the dataset, eg: 2012/02/01T00:00:00 or 2012/02/01 or 1328083200 + step : Amount of time between elapsed between each row, measured in seconds, eg: 86400 + +### Metadata about the Datatypes +# Note: 'columns' can also be supplied as a list of { label, type } objects instead of two lists. (TODO) +columns : + labels : List of the column-names in order. (Future optimization: the date column could + be omitted if the data is sorted and contains no gaps -- each datapoint is exactly + timespan.step apart, and none are missing.) + types : List of the column datatype-names in order. Valid type names: date, float, int. + +### Defaults for charting +chart : + library : Visualization library to use. Valid: dygraphs. + options : Dict of option-names to values. + diff --git a/docs/internals/scaffold.md b/docs/internals/scaffold.md new file mode 100644 index 0000000..40bf678 --- /dev/null +++ b/docs/internals/scaffold.md @@ -0,0 +1,2 @@ +# Scaffold Framework + diff --git a/docs/internals/vis-editor.md b/docs/internals/vis-editor.md new file mode 100644 index 0000000..5c6a335 --- /dev/null +++ b/docs/internals/vis-editor.md @@ -0,0 +1,2 @@ +# Visualization Editor + diff --git a/docs/notes.md b/docs/notes.md new file mode 100644 index 0000000..13cad96 --- /dev/null +++ b/docs/notes.md @@ -0,0 +1,32 @@ +# notes + +- [Name Ideas] GraphKit, VisKit, VisHub + + +## Value Formatter + +``` +[sign][#][minW][~maxW][,][.precision][type] + +sign ::= "+" | "-" | " " +# ::= Output will be prefixed by '0b' for binary, '0o' for octal, or '0x' for hexadecimal +minW ::= Minimum field width +maxW ::= Maximum field width +, ::= Use comma for thousands separator +precision ::= How many digits displayed... + fF - after the decimal point + gG - before and after the decimal point +type ::= Use type-specific formatting: + String: s + Integer: b (base2) | c (unicode chars) | d (base10) | o (base8) | xX (base16) | n (locale-aware) + Float: eE (scientific) | fF (fixed) | gG (general) | % | + k (use KMBT when rounding; ) +``` + + +## Start Server in Screen & Tee Logs + + screen -dr kraken + ./lib/server/server.co | tee -a logs/kraken.log + + diff --git a/docs/notes/graphs.md b/docs/notes/graphs.md index 4220d00..b8c46c5 100644 --- a/docs/notes/graphs.md +++ b/docs/notes/graphs.md @@ -1,5 +1,8 @@ # Graphs and Metrics for the March Dealine +- Reprocess all datafiles and fix dates to use `/` instead of `-` -- see: + - (Safari) dygraph on safari has a bug parsing dates, bug http://code.google.com/p/dygraphs/issues/detail?id=287 + ## Done ## Wanted diff --git a/docs/notes/notes.md b/docs/notes/notes.md deleted file mode 100644 index 0bccaef..0000000 --- a/docs/notes/notes.md +++ /dev/null @@ -1,17 +0,0 @@ -# notes - -## Scaffold Forms - -- Type to form mappings: - - String, Integer, Float -> text - - Boolean -> checkbox - - Object, Array, Function -> textarea - - - -## Start Server in Screen & Tee Logs - - screen -dr kraken - ./lib/server/server.co | tee -a logs/kraken.log - - diff --git a/docs/todo.md b/docs/todo.md index 0a54206..08d4758 100644 --- a/docs/todo.md +++ b/docs/todo.md @@ -1,15 +1,13 @@ # todo - ## bugs -- redraw button! -- (Safari) dygraph on safari has a bug parsing dates, bug http://code.google.com/p/dygraphs/issues/detail?id=287 + ## ux -- [Datasource UI] +- [DataSource UI] - Sources Selector: list datasets via YAML metadata descriptor files (/data/list -> UI) - Metric Selector: select metrics out of a dataset - (Date range selector & scrubber?) @@ -61,7 +59,7 @@ - Relationships between datasets which can help inform rich UI responses (click on "Europe" and have it expand to the countries) - Legend by Default -- value parsers for large numbers +- value parsers for large numbers with comma, KMB.00 - easily create new graphs side-by-side - clear current graph -- 1.7.0.4