diff options
-rw-r--r-- | data/mintages/ad-c-circ.csv | 48 | ||||
-rw-r--r-- | data/mintages/ad-c-nifc.csv | 48 | ||||
-rw-r--r-- | data/mintages/ad-c-proof.csv | 48 | ||||
-rw-r--r-- | data/mintages/ad-s-circ.csv | 26 | ||||
-rw-r--r-- | data/mintages/ad-s-nifc.csv | 26 | ||||
-rw-r--r-- | data/mintages/ad-s-proof.csv | 26 | ||||
-rw-r--r-- | src/mintage/mintage.go | 16 | ||||
-rw-r--r-- | src/mintage/parser.go | 16 |
8 files changed, 130 insertions, 124 deletions
diff --git a/data/mintages/ad-c-circ.csv b/data/mintages/ad-c-circ.csv index 3482b8e..1887fac 100644 --- a/data/mintages/ad-c-circ.csv +++ b/data/mintages/ad-c-circ.csv @@ -1,28 +1,28 @@ -Year,Name,Mintmark,Mintage -2014,20 Years in the Council of Europe,, -2015,30 Years of Political Rights,, -2015,25th Anniversary of the Customs Agreement,, -2016,25th Anniversary of the Radio and Television of Andorra,, -2016,150th Anniversary of the New Reform of 1866,, -2017,100th Anniversary of the National Anthem of Andorra,, -2017,The Pyrenean Country,, -2018,70th Anniversary of the Universal Declaration of Human Rights,, -2018,25th Anniversary of the Andorran Constitution,, -2019,600th Anniversary of the Council of the Land,, -2019,2019 Alpine Ski World Cup Finals,, -2020,50 Years of Universal Female Suffrage,, -2020,The 27th Ibero-American Summit,, -2021,Taking Care of Our Seniors,, -2021,Our Lady of Meritxell,, -2022,The Legend of Charlemagne,, -2022,10th Anniversary of the Monetary Agreement with the EU,, -2023,Summer Solstice Fire Festivals in the Pyrenees,, -2023,30 Years of United Nations Membership,, +Year,Name,Mintmark,Mintage,Reference +2014,20 Years in the Council of Europe,,, +2015,30 Years of Political Rights,,, +2015,25th Anniversary of the Customs Agreement,,, +2016,25th Anniversary of the Radio and Television of Andorra,,, +2016,150th Anniversary of the New Reform of 1866,,, +2017,100th Anniversary of the National Anthem of Andorra,,, +2017,The Pyrenean Country,,, +2018,70th Anniversary of the Universal Declaration of Human Rights,,, +2018,25th Anniversary of the Andorran Constitution,,, +2019,600th Anniversary of the Council of the Land,,, +2019,2019 Alpine Ski World Cup Finals,,, +2020,50 Years of Universal Female Suffrage,,, +2020,The 27th Ibero-American Summit,,, +2021,Taking Care of Our Seniors,,, +2021,Our Lady of Meritxell,,, +2022,The Legend of Charlemagne,,, +2022,10th Anniversary of the Monetary Agreement with the EU,,, +2023,Summer Solstice Fire Festivals in the Pyrenees,,, +2023,30 Years of United Nations Membership,,, # TODO: Find the official name of this coin -2024,100 Years of Skiing in Andorra,, +2024,100 Years of Skiing in Andorra,,, # TODO: Find the official name of this coin -2024,UCI Mountain Bike World Cup,, +2024,UCI Mountain Bike World Cup,,, # TODO: Find the official name of this coin -2025,Bearded Vulture,, +2025,Bearded Vulture,,, # TODO: Find the official name of this coin -2025,Games of the Small States of Europe,,
\ No newline at end of file +2025,Games of the Small States of Europe,,,
\ No newline at end of file diff --git a/data/mintages/ad-c-nifc.csv b/data/mintages/ad-c-nifc.csv index f230855..f61f577 100644 --- a/data/mintages/ad-c-nifc.csv +++ b/data/mintages/ad-c-nifc.csv @@ -1,24 +1,24 @@ -Year,Name,Mintmark,Mintage -2014,20 Years in the Council of Europe,, -2015,30 Years of Political Rights,, -2015,25th Anniversary of the Customs Agreement,, -2016,25th Anniversary of the Radio and Television of Andorra,, -2016,150th Anniversary of the New Reform of 1866,, -2017,100th Anniversary of the National Anthem of Andorra,, -2017,The Pyrenean Country,, -2018,70th Anniversary of the Universal Declaration of Human Rights,, -2018,25th Anniversary of the Andorran Constitution,, -2019,600th Anniversary of the Council of the Land,, -2019,2019 Alpine Ski World Cup Finals,, -2020,50 Years of Universal Female Suffrage,, -2020,The 27th Ibero-American Summit,, -2021,Taking Care of Our Seniors,, -2021,Our Lady of Meritxell,, -2022,The Legend of Charlemagne,, -2022,10th Anniversary of the Monetary Agreement with the EU,, -2023,Summer Solstice Fire Festivals in the Pyrenees,, -2023,30 Years of United Nations Membership,, -2024,100 Years of Skiing in Andorra,, -2024,UCI Mountain Bike World Cup,, -2025,Bearded Vulture,, -2025,Games of the Small States of Europe,,
\ No newline at end of file +Year,Name,Mintmark,Mintage,Reference +2014,20 Years in the Council of Europe,,, +2015,30 Years of Political Rights,,, +2015,25th Anniversary of the Customs Agreement,,, +2016,25th Anniversary of the Radio and Television of Andorra,,, +2016,150th Anniversary of the New Reform of 1866,,, +2017,100th Anniversary of the National Anthem of Andorra,,, +2017,The Pyrenean Country,,, +2018,70th Anniversary of the Universal Declaration of Human Rights,,, +2018,25th Anniversary of the Andorran Constitution,,, +2019,600th Anniversary of the Council of the Land,,, +2019,2019 Alpine Ski World Cup Finals,,, +2020,50 Years of Universal Female Suffrage,,, +2020,The 27th Ibero-American Summit,,, +2021,Taking Care of Our Seniors,,, +2021,Our Lady of Meritxell,,, +2022,The Legend of Charlemagne,,, +2022,10th Anniversary of the Monetary Agreement with the EU,,, +2023,Summer Solstice Fire Festivals in the Pyrenees,,, +2023,30 Years of United Nations Membership,,, +2024,100 Years of Skiing in Andorra,,, +2024,UCI Mountain Bike World Cup,,, +2025,Bearded Vulture,,, +2025,Games of the Small States of Europe,,,
\ No newline at end of file diff --git a/data/mintages/ad-c-proof.csv b/data/mintages/ad-c-proof.csv index f230855..f61f577 100644 --- a/data/mintages/ad-c-proof.csv +++ b/data/mintages/ad-c-proof.csv @@ -1,24 +1,24 @@ -Year,Name,Mintmark,Mintage -2014,20 Years in the Council of Europe,, -2015,30 Years of Political Rights,, -2015,25th Anniversary of the Customs Agreement,, -2016,25th Anniversary of the Radio and Television of Andorra,, -2016,150th Anniversary of the New Reform of 1866,, -2017,100th Anniversary of the National Anthem of Andorra,, -2017,The Pyrenean Country,, -2018,70th Anniversary of the Universal Declaration of Human Rights,, -2018,25th Anniversary of the Andorran Constitution,, -2019,600th Anniversary of the Council of the Land,, -2019,2019 Alpine Ski World Cup Finals,, -2020,50 Years of Universal Female Suffrage,, -2020,The 27th Ibero-American Summit,, -2021,Taking Care of Our Seniors,, -2021,Our Lady of Meritxell,, -2022,The Legend of Charlemagne,, -2022,10th Anniversary of the Monetary Agreement with the EU,, -2023,Summer Solstice Fire Festivals in the Pyrenees,, -2023,30 Years of United Nations Membership,, -2024,100 Years of Skiing in Andorra,, -2024,UCI Mountain Bike World Cup,, -2025,Bearded Vulture,, -2025,Games of the Small States of Europe,,
\ No newline at end of file +Year,Name,Mintmark,Mintage,Reference +2014,20 Years in the Council of Europe,,, +2015,30 Years of Political Rights,,, +2015,25th Anniversary of the Customs Agreement,,, +2016,25th Anniversary of the Radio and Television of Andorra,,, +2016,150th Anniversary of the New Reform of 1866,,, +2017,100th Anniversary of the National Anthem of Andorra,,, +2017,The Pyrenean Country,,, +2018,70th Anniversary of the Universal Declaration of Human Rights,,, +2018,25th Anniversary of the Andorran Constitution,,, +2019,600th Anniversary of the Council of the Land,,, +2019,2019 Alpine Ski World Cup Finals,,, +2020,50 Years of Universal Female Suffrage,,, +2020,The 27th Ibero-American Summit,,, +2021,Taking Care of Our Seniors,,, +2021,Our Lady of Meritxell,,, +2022,The Legend of Charlemagne,,, +2022,10th Anniversary of the Monetary Agreement with the EU,,, +2023,Summer Solstice Fire Festivals in the Pyrenees,,, +2023,30 Years of United Nations Membership,,, +2024,100 Years of Skiing in Andorra,,, +2024,UCI Mountain Bike World Cup,,, +2025,Bearded Vulture,,, +2025,Games of the Small States of Europe,,,
\ No newline at end of file diff --git a/data/mintages/ad-s-circ.csv b/data/mintages/ad-s-circ.csv index fd05b7c..fc7b2a2 100644 --- a/data/mintages/ad-s-circ.csv +++ b/data/mintages/ad-s-circ.csv @@ -1,13 +1,13 @@ -Year,Mintmark,"€0,01","€0,02","€0,05","€0,10","€0,20","€0,50","€1,00","€2,00" -2014,,60000,60000,860000,860000,860000,340000,511843,360000 -2015,,0,0,0,0,0,0,0,1072400 -2016,,0,0,0,0,0,0,2339200,0 -2017,,2582395,1515000,2191421,1103000,1213000,968800,17000,794588 -2018,,2430000,2550000,1800000,980000,1014000,890000,0,868000 -2019,,2447000,1727000,2100000,1610000,1570000,930000,0,1058310 -2020,,0,0,0,860000,175000,740000,0,1500000 -2021,,200000,700000,0,1400000,1420000,600000,50000,1474500 -2022,,700000,450000,400000,700000,700000,380000,0,1708000 -2023,,0,0,0,0,0,0,0,2075250 -2024,,0,900300,1950000,1000000,700000,500000,1050000,1601200 -2025,,,,,,,,,
\ No newline at end of file +Year,Mintmark,"€0,01","€0,02","€0,05","€0,10","€0,20","€0,50","€1,00","€2,00",Reference +2014,,60000,60000,860000,860000,860000,340000,511843,360000, +2015,,0,0,0,0,0,0,0,1072400, +2016,,0,0,0,0,0,0,2339200,0, +2017,,2582395,1515000,2191421,1103000,1213000,968800,17000,794588, +2018,,2430000,2550000,1800000,980000,1014000,890000,0,868000, +2019,,2447000,1727000,2100000,1610000,1570000,930000,0,1058310, +2020,,0,0,0,860000,175000,740000,0,1500000, +2021,,200000,700000,0,1400000,1420000,600000,50000,1474500, +2022,,700000,450000,400000,700000,700000,380000,0,1708000, +2023,,0,0,0,0,0,0,0,2075250, +2024,,0,900300,1950000,1000000,700000,500000,1050000,1601200, +2025,,,,,,,,,,
\ No newline at end of file diff --git a/data/mintages/ad-s-nifc.csv b/data/mintages/ad-s-nifc.csv index dc8b452..a19bbb3 100644 --- a/data/mintages/ad-s-nifc.csv +++ b/data/mintages/ad-s-nifc.csv @@ -1,13 +1,13 @@ -Year,Mintmark,"€0,01","€0,02","€0,05","€0,10","€0,20","€0,50","€1,00","€2,00" -2014,,70000,70000,70000,70000,70000,70000,70000,70000 -2015,,40000,40000,40000,40000,40000,40000,40000,40000 -2016,,35000,35000,35000,35000,35000,35000,35000,35000 -2017,,22000,22000,22000,22000,22000,22000,22000,22000 -2018,,20000,20000,20000,20000,20000,20000,20000,20000 -2019,,15000,15000,15000,15000,15000,15000,15000,15000 -2020,,12000,12000,12000,12000,12000,12000,12000,12000 -2021,,10500,10500,10500,10500,10500,10500,10500,10500 -2022,,10500,10500,10500,10500,10500,10500,10500,10500 -2023,,10500,10500,10500,10500,10500,10500,10500,10500 -2024,,,,,,,,, -2025,,,,,,,,,
\ No newline at end of file +Year,Mintmark,"€0,01","€0,02","€0,05","€0,10","€0,20","€0,50","€1,00","€2,00",Reference +2014,,70000,70000,70000,70000,70000,70000,70000,70000, +2015,,40000,40000,40000,40000,40000,40000,40000,40000, +2016,,35000,35000,35000,35000,35000,35000,35000,35000, +2017,,22000,22000,22000,22000,22000,22000,22000,22000, +2018,,20000,20000,20000,20000,20000,20000,20000,20000, +2019,,15000,15000,15000,15000,15000,15000,15000,15000, +2020,,12000,12000,12000,12000,12000,12000,12000,12000, +2021,,10500,10500,10500,10500,10500,10500,10500,10500, +2022,,10500,10500,10500,10500,10500,10500,10500,10500, +2023,,10500,10500,10500,10500,10500,10500,10500,10500, +2024,,,,,,,,,, +2025,,,,,,,,,,
\ No newline at end of file diff --git a/data/mintages/ad-s-proof.csv b/data/mintages/ad-s-proof.csv index c8ed593..1e5ef65 100644 --- a/data/mintages/ad-s-proof.csv +++ b/data/mintages/ad-s-proof.csv @@ -1,13 +1,13 @@ -Year,Mintmark,"€0,01","€0,02","€0,05","€0,10","€0,20","€0,50","€1,00","€2,00" -2014,,,,,,,,, -2015,,,,,,,,, -2016,,,,,,,,, -2017,,,,,,,,, -2018,,,,,,,,, -2019,,,,,,,,, -2020,,,,,,,,, -2021,,,,,,,,, -2022,,,,,,,,, -2023,,,,,,,,, -2024,,,,,,,,, -2025,,,,,,,,,
\ No newline at end of file +Year,Mintmark,"€0,01","€0,02","€0,05","€0,10","€0,20","€0,50","€1,00","€2,00",Reference +2014,,,,,,,,,, +2015,,,,,,,,,, +2016,,,,,,,,,, +2017,,,,,,,,,, +2018,,,,,,,,,, +2019,,,,,,,,,, +2020,,,,,,,,,, +2021,,,,,,,,,, +2022,,,,,,,,,, +2023,,,,,,,,,, +2024,,,,,,,,,, +2025,,,,,,,,,,
\ No newline at end of file diff --git a/src/mintage/mintage.go b/src/mintage/mintage.go index cc94de7..0e98bd1 100644 --- a/src/mintage/mintage.go +++ b/src/mintage/mintage.go @@ -6,16 +6,18 @@ type Data struct { } type SRow struct { - Year int - Mintmark string - Mintages [denoms]int + Year int + Mintmark string + Mintages [denoms]int + Reference string } type CRow struct { - Year int - Name string - Mintmark string - Mintage int + Year int + Name string + Mintmark string + Mintage int + Reference string } const ( diff --git a/src/mintage/parser.go b/src/mintage/parser.go index daeb05d..290f407 100644 --- a/src/mintage/parser.go +++ b/src/mintage/parser.go @@ -57,7 +57,7 @@ func parseS(path string) ([]SRow, error) { r := csv.NewReader(f) r.Comment = '#' - r.FieldsPerRecord = 10 + r.FieldsPerRecord = 11 r.ReuseRecord = true /* Skip header */ @@ -74,14 +74,17 @@ func parseS(path string) ([]SRow, error) { return nil, err } - data := SRow{Mintmark: record[1]} + data := SRow{ + Mintmark: record[1], + Reference: record[10], + } data.Year, err = strconv.Atoi(record[0]) if err != nil { return nil, err } - for i, s := range record[2:] { + for i, s := range record[2:10] { if s == "" { data.Mintages[i] = Unknown } else { @@ -109,7 +112,7 @@ func parseC(path string) ([]CRow, error) { r := csv.NewReader(f) r.Comment = '#' - r.FieldsPerRecord = 4 + r.FieldsPerRecord = 5 r.ReuseRecord = true /* Skip header */ @@ -127,8 +130,9 @@ func parseC(path string) ([]CRow, error) { } data := CRow{ - Name: record[1], - Mintmark: record[2], + Name: record[1], + Mintmark: record[2], + Reference: record[4], } data.Year, err = strconv.Atoi(record[0]) |