package bls // The OEWS regional wage baseline, shaped for Galapagos. Each Galapagos cleared role maps to the // closest detailed OEWS occupation (SOC). CALC labor categories are vendor free text, but OEWS SOC // codes are standard, so this is a clean, accurate local baseline for the Hawaii and New Mexico work. // Occupation is one OEWS occupation mapped to a Galapagos role. type Occupation struct { SOC string // 6 digit SOC, for example 151212 Title string // OEWS occupation title Role string // the Galapagos role label } // Area is an OEWS state area. type Area struct { Code string // 7 digit OEWS area code Abbr string // HI or NM Name string // Hawaii or New Mexico } // Metric is an OEWS datatype. type Metric struct { Datatype string // 04 annual mean, 13 annual median Name string // annual_mean or annual_median } // GalapagosOccupations maps each cleared role to the closest standard OEWS occupation. Computer Systems // Engineers and Architects has no single detailed SOC, so Computer Network Architects (151241) and // Software Developers (151252) stand in for the architect and engineer roles. var GalapagosOccupations = []Occupation{ {SOC: "151212", Title: "Information Security Analysts", Role: "ISSO and Cyber"}, {SOC: "151241", Title: "Computer Network Architects", Role: "Space and Cyber Architect"}, {SOC: "151252", Title: "Software Developers", Role: "Systems Engineer"}, {SOC: "113021", Title: "Computer and Information Systems Managers", Role: "Program Manager"}, {SOC: "151232", Title: "Computer User Support Specialists", Role: "Help Desk and IT Specialist"}, } // GalapagosAreas are the two states where Galapagos performs. var GalapagosAreas = []Area{ {Code: "1500000", Abbr: "HI", Name: "Hawaii"}, {Code: "3500000", Abbr: "NM", Name: "New Mexico"}, } // Metrics are the wage measures pulled. var Metrics = []Metric{ {Datatype: "04", Name: "annual_mean"}, {Datatype: "13", Name: "annual_median"}, } // SeriesSpec is a fully described OEWS series to pull. type SeriesSpec struct { SeriesID string OccCode string OccTitle string Role string Area string AreaName string Metric string } // seriesID builds an OEWS state series id: OEU + S(state) + area + industry 000000 + SOC + datatype. func seriesID(area, soc, datatype string) string { return "OEUS" + area + "000000" + soc + datatype } // NationalArea is the OEWS national area code (the seven zero area) and NationalIndustry is the all // industry code (the six zero industry). The national series prefix is OEUN (the N national variant of // the OEUS state series), not OEUS. const ( NationalArea = "0000000" NationalIndustry = "000000" ) // NationalAreaAbbr and NationalAreaName are the bls_wages area labels for a national row. National OEWS // data has no Galapagos role, so the national rows carry an empty role and this US area label, distinct // from the HI and NM state rows the Galapagos baseline writes. const ( NationalAreaAbbr = "US" NationalAreaName = "United States" ) // NationalSeriesID builds an OEWS national series id: OEUN + national area (0000000) + all industry // (000000) + the six digit SOC + the datatype (04 annual mean, 13 annual median). For SOC 151212 and // datatype 04 it returns OEUN000000000000015121204, the verified national annual mean series. func NationalSeriesID(soc, datatype string) string { return "OEUN" + NationalArea + NationalIndustry + soc + datatype } // NationalSeries returns the two national OEWS series specs (annual mean 04 and annual median 13) for one // detailed SOC occupation. The specs carry the national US area label and an EMPTY role (national OEWS data // has no Galapagos role), so the national rows are distinct from the HI and NM state rows. The OccTitle is // the OEWS occupation title from the flat file. func NationalSeries(soc, title string) []SeriesSpec { out := make([]SeriesSpec, 0, len(Metrics)) for _, m := range Metrics { out = append(out, SeriesSpec{ SeriesID: NationalSeriesID(soc, m.Datatype), OccCode: soc, OccTitle: title, Role: "", Area: NationalAreaAbbr, AreaName: NationalAreaName, Metric: m.Name, }) } return out } // GalapagosSeries returns every OEWS series to pull for the Galapagos baseline. func GalapagosSeries() []SeriesSpec { var out []SeriesSpec for _, a := range GalapagosAreas { for _, o := range GalapagosOccupations { for _, m := range Metrics { out = append(out, SeriesSpec{ SeriesID: seriesID(a.Code, o.SOC, m.Datatype), OccCode: o.SOC, OccTitle: o.Title, Role: o.Role, Area: a.Abbr, AreaName: a.Name, Metric: m.Name, }) } } } return out }