Documentation
¶
Index ¶
- Constants
- func FromSector(company, yamlFile string) (companies []string, sectorName string, err error)
- func FuzzyFind(source string, targets []string, maxDistance int) (found string)
- func FuzzyMatch(src string, list []string, distance int) bool
- func Hash(s string) uint32
- func ImportCsv(db *sql.DB, dataType string, file string) (err error)
- func RemoveDiacritics(original string) (result string)
- func SectorsToYaml(yamlFile string) (err error)
- type S
- type Sector
- type Segment
- type Subsector
Constants ¶
const ( UNDEF uint32 = iota SPACE // Balance Sheet Caixa AplicFinanceiras Estoque Equity DividaCirc DividaNCirc // Income Statement Vendas CustoVendas DespesasOp EBIT LucLiq // DFC FCO FCI FCF // Value Added Statement Deprec JurosCapProp Dividendos )
Bookkeeping account codes If you add new const values, run 'go generate' to update the generated code
Variables ¶
This section is empty.
Functions ¶
func FromSector ¶ added in v0.8.1
FromSector returns all companies from the same sector as the 'company'
func FuzzyFind ¶ added in v0.8.1
FuzzyFind returns the most approximate string inside 'list' that matches the 'src' string within a maximum 'distance'.
func FuzzyMatch ¶ added in v0.8.1
FuzzyMatch measures the Levenshtein distance between the source and the list, returning true if the distance is less or equal the 'distance'. Diacritics are removed from 'src' and 'list'.
func ImportCsv ¶ added in v0.9.0
ImportCsv start the data import process, including the database creation if necessary
func RemoveDiacritics ¶ added in v0.8.1
RemoveDiacritics transforms, for example, "žůžo" into "zuzo"
func SectorsToYaml ¶ added in v0.8.1
SectorsToYaml grab data from B3 website and prints out to a yaml file with all companies grouped by sector, subsector, segment