Liking cljdoc? Tell your friends :D

josh.meanings.persistence

A namespace for functions related to reading and writing datasets to various file formats.

This namespace provides functions for loading datasets from files, writing datasets to files, and converting between different file formats. It also provides a configuration map of supported file formats and their associated reader and writer functions.

Examples:

(read-dataset-seq state :filename)

(write-dataset-seq state :filename [dataset1 dataset2 ...])

A namespace for functions related to reading and writing datasets to various file formats.

This namespace provides functions for loading datasets from files, writing datasets to files,
and converting between different file formats. It also provides a configuration map of
supported file formats and their associated reader and writer functions.

Examples:

(read-dataset-seq state :filename)
 
(write-dataset-seq state :filename [dataset1 dataset2 ...])
raw docstring

assignments-filenameclj

source

centroids-filenameclj

source

change-extensionclj

(change-extension filename format)
source

convert-fileclj

(convert-file filename format)

Converts a file into another file type and returns the new filename.

Converts a file into another file type and returns the new filename.
sourceraw docstring

dataset-seq->column-namesclj

(dataset-seq->column-names ds-seq)

Returns a sequence of column names for a given dataset sequence.

The ds-seq argument should be a sequence of datasets for which to return the column names. The returned sequence will contain the column names for the first dataset in the sequence.

Returns a sequence of column names for the given dataset sequence.

Returns a sequence of column names for a given dataset sequence.

The `ds-seq` argument should be a sequence of datasets for which to
return the column names. The returned sequence will contain the column
names for the first dataset in the sequence.

Returns a sequence of column names for the given dataset sequence.
sourceraw docstring

ds-seq->rows->mapsclj

(ds-seq->rows->maps ds-seq rows)
source

extensionclj

(extension filename)

Returns a filenames last file extension.

Returns a filenames last file extension.
sourceraw docstring

file?clj

(file? filename)

Returns true if a file exists and false otherwise.

Returns true if a file exists and false otherwise.
sourceraw docstring

filename->formatclj

(filename->format filename)

Parses a format lookup key from a filename.

The filename argument should be a string containing the filename to parse. It must contain a file extension that is in formats.

Returns the format lookup key for the given filename.

Parses a format lookup key from a filename.

The `filename` argument should be a string containing the filename to parse. It 
must contain a file extension that is in formats.

Returns the format lookup key for the given filename.
sourceraw docstring

formatsclj

Supported file formats for reading and writing datasets.

Supported file formats for reading and writing datasets.
sourceraw docstring

generate-filenameclj

(generate-filename prefix)
source

read-dataset-seqclj

(read-dataset-seq)
(read-dataset-seq filename)
(read-dataset-seq s key)

Loads the dataset at the file path in key.

If the filename argument is provided, it should be a string containing the file path of the dataset to load. If the s and key arguments are provided, the s argument should be a map containing the key value that identifies the file path of the dataset to load.

Returns a sequence of datasets from the specified file.

Examples:

(read-dataset-seq '/path/to/file.csv') (read-dataset-seq {:filename '/path/to/file.csv'} :filename)

Loads the dataset at the file path in key.
 
If the `filename` argument is provided, it should be a string containing the
file path of the dataset to load. If the `s` and `key` arguments are provided,
the `s` argument should be a map containing the `key` value that identifies
the file path of the dataset to load.

Returns a sequence of datasets from the specified file.
 
Examples:
  
(read-dataset-seq '/path/to/file.csv')
(read-dataset-seq {:filename '/path/to/file.csv'} :filename)
sourceraw docstring

write-datasetclj

(write-dataset filename dataset)
(write-dataset s key dataset)

Writes a dataset to a file using the specified format.

The dataset argument should be a sequence of datasets to write to the file. The file format will be determined by the file extension of the filename.

Returns nil.

Writes a dataset to a file using the specified format.

The `dataset` argument should be a sequence of datasets to write to the file. 
The file format will be determined by the file extension of the filename.

Returns nil.
sourceraw docstring

write-dataset-seqclj

(write-dataset-seq k-means-state key ds-seq)

Writes a sequence of datasets to a file using the specified format.

The k-means-state argument should be a map containing the key value that identifies the file to write to. The ds-seq argument should be a sequence of datasets to write to the file. The file format will be determined by the file extension of the filename specified in the k-means-state map.

Returns nil.

Writes a sequence of datasets to a file using the specified format.

The `k-means-state` argument should be a map containing the `key` value that
identifies the file to write to. The `ds-seq` argument should be a sequence of
datasets to write to the file. The file format will be determined by the file
extension of the filename specified in the `k-means-state` map.

Returns nil.
sourceraw docstring

write-datasetsclj

(write-datasets filename ds-seq)

Writes a sequence of datasets to filename.

The ds-seq argument should be a sequence of datasets to write to the file. The file format will be determined by the file extension of the filename.

Returns nil.

Writes a sequence of datasets to filename.

The `ds-seq` argument should be a sequence of datasets to write to the file. 
The file format will be determined by the file extension of the filename.
 
Returns nil.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close