Documentation
¶
Overview ¶
Package crosswalk provides mappings between NAICS and other industry classification systems (SIC codes, NAICS version changes).
All types are safe for concurrent reads after construction.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SIC ¶
type SIC struct {
// contains filtered or unexported fields
}
SIC holds bidirectional SIC-to-NAICS mappings.
func NewSICFromCSV ¶
NewSICFromCSV creates a SIC crosswalk from CSV data read from r. The CSV must have a header row and columns: naics_code, naics_title, sic_code, sic_title.
func (*SIC) AllMappings ¶
func (s *SIC) AllMappings() []SICMapping
AllMappings returns all SIC-NAICS mappings.
func (*SIC) NAICSToSIC ¶
func (s *SIC) NAICSToSIC(naicsCode string) ([]SICMapping, bool)
NAICSToSIC returns all SIC mappings for a given NAICS code. One NAICS code may map to multiple SIC codes (merges). Returns false if the NAICS code has no mappings.
func (*SIC) SICToNAICS ¶
func (s *SIC) SICToNAICS(sicCode string) ([]SICMapping, bool)
SICToNAICS returns all NAICS mappings for a given SIC code. One SIC code may map to multiple NAICS codes (splits). Returns false if the SIC code has no mappings.
type SICMapping ¶
SICMapping represents a single mapping between a SIC code and a NAICS code.
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
Version holds bidirectional NAICS 2017-to-2022 mappings.
func NewVersion ¶
NewVersion creates a Version crosswalk loaded with the embedded NAICS 2017-to-2022 concordance data.
func NewVersionFromCSV ¶
NewVersionFromCSV creates a Version crosswalk from CSV data read from r. The CSV must have a header row and columns: naics_2017, title_2017, naics_2022, title_2022.
func (*Version) AllMappings ¶
func (v *Version) AllMappings() []VersionMapping
AllMappings returns all version crosswalk mappings.