nyphil

package
v0.0.0-...-aea4da5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2019 License: MIT Imports: 10 Imported by: 0

README

This folder contains the Go code used in the coperformance project.

Documentation

Overview

This contains functions to process the JSON files for the NY philharmonic data

Index

Constants

This section is empty.

Variables

View Source
var (
	YearInds  = loadYears()
	NoDataErr = errors.New("Not enough data to write file")
)

Functions

func Coperformance

func Coperformance(CompMap map[string]Composer, Nprog int) ([]([]float64), []string)

this function makes the coperformance matrix from a map of composers

func LoadComposers

func LoadComposers(file string, MinProg int, Years string) (map[string]Composer, int, error)

this function returns a map of composer names to program ids and seasons

func Ncommon_Uint16

func Ncommon_Uint16(Slice1, Slice2 []uint16) (common int)

this function returns the number of common occurrences in 2 slices of uints

func ProcessJSON

func ProcessJSON(minprog int, yearbounds, infile, jsonfile, csvfile string) (jsonMessage, csvMessage, loadMessage string)

now export a function that does everything

func WriteComposer

func WriteComposer(CompMap map[string]Composer, filename string) error

this function writes the json of Composers given a map[string]Composers

func WriteCoperformance

func WriteCoperformance(Coperf [][]float64, CompNames []string, filename string) error

this function writes the coperformance matrix

Types

type Composer

type Composer struct {
	Nprog    int
	Programs []uint16
	Seasons  []string
}

create a composer type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL