-
Notifications
You must be signed in to change notification settings - Fork 133
API Reference
mcorrell edited this page Jun 28, 2016
·
43 revisions
Wiki ▸ API Reference
Below is the list of all top-level datalib functions and properties, grouped by category.
- Data Import
- Data Generators and Distributions
- Statistics
- Group-By Aggregation
- Utilities
- String Formatting
- dl.load - Load data from a URL or file.
- dl.load.headers - Custom request headers to include with all HTTP requests.
- dl.load.useXHR - Flag indicating if XMLHttpRequest should be used to load files.
- dl.load.sanitizeURL - Checks URLs for validity prior to loading.
- dl.read - Parse loaded data according to format types.
- dl.type - Return first non-null type in an array of values.
- dl.type.all - Return first non-null types for fields of an input data table.
- dl.type.infer - Perform type inference over an array of values.
- dl.type.inferAll - Perform type inference over an input data table.
- dl.json - Load and parse JSON data.
- dl.csv - Load and parse CSV (comma-separated values) data.
- dl.tsv - Load and parse TSV (tab-separated values) data.
- dl.dsv - Load and parse delimited text with a custom delimiter.
- dl.topojson - Load and parse TopoJSON data.
- dl.treejson - Load and parse JSON-format hierarchy data.
- dl.zeros - Generate an array of zeros.
- dl.repeat - Generate an array of a repeated value.
- dl.range - Generate a range of numeric values.
- dl.random.bootstrap - Generate bootstrapped samples.
- dl.random.uniform - Model uniformly distributed numbers.
- dl.random.integer - Model uniformly distributed integers.
- dl.random.normal - Model normally (gaussian) distributed numbers.
- dl.count - Count the number of values.
- dl.count.valid - Count the number of valid (non-null/undefined/NaN) values.
- dl.count.missing - Count the number of null or undefined values.
- dl.count.distinct - Count the number of distinct values.
- dl.count.map - Construct a map of counts per distinct value.
- dl.unique - Collect unique values.
- dl.median - Compute the median of an array of numbers.
- dl.quartile - Compute the quartile boundaries of an array of numbers.
- dl.quantile - Compute the quantile of a sorted array of numbers.
- dl.sum - Compute the sum of an array of numbers.
- dl.mean - Compute the mean (average) of an array of numbers.
- dl.mean.geometric - Compute the geometric mean of an array of positive numbers.
- dl.mean.harmonic - Compute the harmonic mean of an array of numbers.
- dl.variance - Compute the sample variance of an array of numbers.
- dl.stdev - Compute the sample standard deviation of an array of numbers.
- dl.modeskew - Compute the Pearson mode skewness of an array of numbers.
- dl.min - Find the minimum value of an array of values.
- dl.max - Find the maximum value of an array of values.
- dl.extent - Find the minimum and maximum of an array of values.
- dl.extent.index - Find the integer indices of the minimum and maximum values.
- dl.dot - Compute the dot product of two arrays of numbers.
- dl.rank - Compute ascending rank scores for an array of values.
- dl.cor - Compute the sample product-moment correlation of two arrays of numbers.
- dl.cor.rank - Compute the Spearman rank correlation of two arrays of values.
- dl.cor.dist - Compute the distance correlation of two arrays of numbers.
- dl.dist - Compute the vector distance between two arrays of numbers.
- dl.dist.mat - Construct a mean-centered distance matrix for an array of numbers.
- dl.covariance - Compute the covariance between two arrays of numbers.
- dl.cohensd - Compute Cohen's d effect size between two arrays of numbers.
- dl.linearRegression - Fit a univariate linear regression model.
- dl.bootstrap.ci - Compute confidence intervals by bootstrapping.
- dl.z.ci - Compute confidence intervals assuming a normal distribution.
- dl.z.test - Perform a z-test of means.
- dl.entropy - Compute the Shannon entropy of an array of counts.
- dl.mutual - Compute mutual information and distance statistics.
- dl.mutual.info - Compute the mutual information between discrete variables.
- dl.mutual.dist - Compute the information distance between discrete variables.
- dl.bins - Determine quantitative bins (e.g., for a histogram).
- dl.bins.date - Determine bins over common date/time units.
- dl.$bin - Create an accessor that maps values to binned values.
- dl.histogram - Compute a histogram for an array of values.
- dl.profile - Compute a profile of summary statistics for a variable.
- dl.summary - Compute profiles for all variables in a data set.
- dl.groupby - Create a group-by aggregation query.
- groupby.stream - Indicate if the aggregation should accept streaming removes.
- groupby.key - Specify a key function for processing streaming removes.
- groupby.summarize - Specify summary aggregates (min, max, median, etc.).
- groupby.count - Specify a single count summary aggregate.
- groupby.execute - Aggregate an array of values and return the result.
- groupby.insert - Add an array of values to the aggregation.
- groupby.remove - Remove an array of values from the aggregation.
- groupby.result - Return the current group-by aggregation result.
- groupby.clear - Clear all current results from the aggregation.
- dl.isObject - Check if a value is an Object.
- dl.isFunction - Check if a value is a Function.
- dl.isString - Check if a value is a String.
- dl.isArray - Check if a value is an Array.
- dl.isNumber - Check if a value is a Number.
- dl.isBoolean - Check if a value is a Boolean.
- dl.isDate - Check if a value is a Date.
- dl.isValid - Check if a value is not null, undefined or NaN.
- dl.isBuffer - Check if a value is a Buffer.
- dl.number - Coerce a value to a number, ignoring nulls.
- dl.boolean - Coerce a value to a Boolean, ignoring nulls.
- dl.date - Coerce (parse) a value to a Date, ignoring nulls.
- dl.array - Wrap non-array values in a single-element array, ignoring nulls.
- dl.str - Coerce values to JSON-style strings with escaped quotes.
- dl.duplicate - Create a deep duplicate of an object.
- dl.equal - Check if two objects are deeply equal.
- dl.extend - Extend an object with the properties of another.
- dl.keys - Extract an array of an Object's keys.
- dl.vals - Extract an array of an Object's values.
- dl.toMap - Generate a boolean map Object from an array.
- dl.field - Parse a string property descriptor (e.g., "foo.bar") to an array.
- dl.accessor - Parse a string property descriptor to an accessor (getter) function.
- dl.$ - A shorthand alias for dl.accessor.
- dl.mutator - Parse a string property descriptor to a mutator (setter) function.
- dl.$valid - Create an accessor that indicates if an extracted value is valid.
- dl.$length - Create an accessor that extracts the length of String or Array values.
- dl.$in - Create an accessor that tests if an extracted value is contained in a set.
- dl.$year - Create an accessor that extracts the year from Date values.
- dl.$utcYear - Create an accessor that extracts the UTC year from Date values.
- dl.$month - Create an accessor that extracts the month from Date values.
- dl.$utcMonth - Create an accessor that extracts the UTC month from Date values.
- dl.$date - Create an accessor that extracts the day of the month from Date values.
- dl.$utcDate - Create an accessor that extracts the UTC day of the month from Date values.
- dl.$day - Create an accessor that extracts the day of the week from Date values.
- dl.$utcDay - Create an accessor that extracts the UTC day of the week from Date values.
- dl.$hour - Create an accessor that extracts the hour from Date values.
- dl.$utcHour - Create an accessor that extracts the UTC hour from Date values.
- dl.$minute - Create an accessor that extracts the minute from Date values.
- dl.$utcMinute - Create an accessor that extracts the UTC minute from Date values.
- dl.comparator - Generate a comparison function based on provided fields.
- dl.cmp - Default comparison function across data types.
- dl.numcmp - Default comparison function for numerical data.
- dl.stablesort - Sorting method with guaranteed stable ordering.
- dl.permute - Fisher-Yates permutation of an array.
- dl.keystr - Map an array of values to a string to use as a hash key.
- dl.pad - Pads a string to a specified length.
- dl.truncate - Truncate a string value to limit its length.
- dl.identity - Identity function that simply returns an input value.
- dl.length - Function that returns the length of a String or Array.
- dl.true - Function that simply returns true.
- dl.false - Function that simply returns false.
- dl.template - Generate a string template function for data objects.
- dl.format.number - Format numerical values.
- dl.format.numberPrefix - Format numerical values according to an SI prefix.
- dl.format.time - Format datetime values in the local timezone.
- dl.format.utc - Format datetime values in Coordinated Universal Time (UTC).
- dl.format.auto.number - Automatically format numerical values.
- dl.format.auto.linear - Automatically format a linear range of numbers.
- dl.format.auto.time - Automatically format local datetime values.
- dl.format.auto.utc - Automatically format UTC datetime values.
- dl.format.table - Create a formatted print string for table data.
- dl.format.summary - Create a formatted print string for table summary data.
- dl.format.locale - Set the locale for number and datetime formatting.
- dl.format.numberLocale - Set the locale for number formatting.
- dl.format.timeLocale - Set the locale for datetime formatting.