From acb3ed55e03760265fee6bf624eeec9a6b176857 Mon Sep 17 00:00:00 2001 From: Daniel Heinesen Date: Fri, 13 Sep 2024 11:48:08 +0200 Subject: [PATCH] Updates units --- .../eeareader/EEATimeseriesReader.py | 17 +- src/pyaro_readers/eeareader/data.toml | 366 +++++------------- .../eeareader/utils/generate_data_toml.py | 6 +- 3 files changed, 114 insertions(+), 275 deletions(-) diff --git a/src/pyaro_readers/eeareader/EEATimeseriesReader.py b/src/pyaro_readers/eeareader/EEATimeseriesReader.py index 452e0a1..edcb593 100644 --- a/src/pyaro_readers/eeareader/EEATimeseriesReader.py +++ b/src/pyaro_readers/eeareader/EEATimeseriesReader.py @@ -17,6 +17,11 @@ Station, ) +try: + import tomllib +except ImportError: # python <3.11 + import tomli as tomllib + FLAGS_VALID = {-99: False, -1: False, 1: True, 2: False, 3: False, 4: True} VERIFIED_LVL = [1, 2, 3] DATA_TOML = Path(__file__).parent / "data.toml" @@ -73,6 +78,7 @@ def __init__( self._set_filters(filters) self.metadata = self._read_metadata(filename) + self.datafile = self._read_data() self._read_polars(filters, filename) @@ -167,7 +173,7 @@ def _read_polars(self, filters, filename) -> None: except: continue - file_unit = df.row(0)[df.get_column_index("Unit")] + file_unit = self._convert_unit(df.row(0)[df.get_column_index("Unit")]) for key in PARQUET_FIELDS: array[key][ @@ -248,6 +254,15 @@ def _read_metadata(self, folder: str) -> dict: } return metadata + + def _read_data(self) -> dict: + with open(DATA_TOML, "rb") as f: + data = tomllib.load(f) + return data + + def _convert_unit(self, unit: str) -> str: + return self.datafile["units"][unit] + def _unfiltered_data(self, varname) -> Data: return self._data[varname] diff --git a/src/pyaro_readers/eeareader/data.toml b/src/pyaro_readers/eeareader/data.toml index ba76e26..d4aed9e 100644 --- a/src/pyaro_readers/eeareader/data.toml +++ b/src/pyaro_readers/eeareader/data.toml @@ -1,5 +1,5 @@ [defaults] -"pollutants" = [ +"pollutatnts" = [ "SO2", "SO4--", "SO4 (H2SO4 aerosols) (SO4--)", @@ -24,44 +24,45 @@ ] [units] -"Bq" = "Bq" +"bq" = "Bq" "fg.m-3" = "fg/m3" "m-1" = "m-1" "mg.l-1" = "mg/l" "mg.m-3" = "mg/m3" -"mg.m-3.day" = "mg/m-3*day" +"mg.m-3.day" = "mg/m-3.day" "mg.m-3.h" = "mg/m3.h" -"mgN.l-1" = "mg N/l" -"mgN.m-2.m-1" = "mg N/m2/m" -"mgS.l-1" = "mg S/l" -"mgS.m-1" = "mgS.m-1" -"mgS.m-2.m-1" = "mg S/m2.m" +"mgn.l-1" = "mg N/l" +"mgn.m-2.m-1" = "mg N/m2/m" +"mgs.l-1" = "mg S/l" +"mgs.m-1" = "mgS.m-1" +"mgs.m-2.m-1" = "mg S/m2.m" "mm" = "mm" "ng.l-1" = "ng/l" "ng.m-2" = "ng/m2" "ng.m-2.day-1" = "ng/m2/day" "ng.m-3" = "ng/m3" -"pHunits" = "pH units" +"phunits" = "pH units" "particles.cm-3" = "particles.cm-3" "pg.m-2.day-1" = "pg/m2/day" "pg.m-3" = "pg/m3" "ppbv" = "ppbv" "ppmv" = "ppmv" "pptv" = "pptv" -"uS.cm-1" = "uS/cm" -"ueH.l-1" = "ue H/l" +"us.cm-1" = "uS/cm" +"ueh.l-1" = "ue H/l" "ug.l-1" = "µg/l" "ug.m-2.day-1" = "ug/m2/day" "ug.m-3" = "µg/m3" -"ug.m-3.day" = "ug/m3*day" +"ug.m-3.day" = "ug/m3·day" "ug.m-3.h" = "ug/m3·h" -"ugC.m-3" = "µg C/m3" -"ugN.m-3" = "µg N/m3" -"ugNO2.m-3" = "ugNO2/m3" -"ugS.m-3" = "µg S/m3" -"ugSO2.m-3" = "µg SO2/m3" +"ugc.m-3" = "µg C/m3" +"ugn.m-3" = "µg N/m3" +"ugno2.m-3" = "ugNO2/m3" +"ugs.m-3" = "µg S/m3" +"ugso2.m-3" = "µg SO2/m3" "nm" = "nm" + [pollutant] 1 = "SO2" 10 = "CO" @@ -72,7 +73,7 @@ 1016 = "Cr in PM2.5" 1017 = "Mn in PM2.5" 1018 = "As in PM2.5" -1029 = "BaP in PM2.5" +1129 = "BaP in PM2.5" 1045 = "NH4+ in PM2.5" 1046 = "NO3- in PM2.5" 1047 = "SO42- in PM2.5" @@ -83,13 +84,12 @@ 1065 = "Fe in PM2.5" 1073 = "Cu in PM2.5" 11 = "H2S" -1129 = "BaP in PM2.5" -12 = "Pb" -13 = "Hg" -14 = "Cd" +7012 = "Pb" +7013 = "Hg" +7014 = "Cd" 1419 = "Dibenzo(ah)anthracene in PM2.5" -15 = "Ni" -16 = "Cr" +7015 = "Ni" +7016 = "Cr" 1610 = "Benzo(a)anthracene in PM2.5" 1617 = "Benzo(b)fluoranthene in PM2.5" 1626 = "Benzo(k)fluoranthene in PM2.5" @@ -99,36 +99,29 @@ 1657 = "K+ in PM2.5" 1659 = "Mg2+ in PM2.5" 1668 = "Na+ in PM2.5" -17 = "Mn" +2017 = "Mn" 1759 = "Benzo(j)fluoranthene in PM2.5" 1771 = "EC in PM2.5" 1772 = "OC in PM2.5" -18 = "As" +7018 = "As" 19 = "CS2" 20 = "C6H6" -2012 = "Pb" -2013 = "Hg" -2014 = "Cd" -2015 = "Ni" -2016 = "Cr" -2017 = "Mn" -2018 = "As" -2063 = "Zn" -2064 = "Co" -2065 = "Fe" -2073 = "Cu" +7063 = "Zn" +64 = "Co" +65 = "Fe" +7073 = "Cu" 2076 = "pH" 21 = "C6H5-CH3" 22 = "C6H5-CH=CH2" 23 = "CH2=CH-CN" -2380 = "Benzo(b,j,k)fluoranthene" +7380 = "Benzo(b,j,k)fluoranthene" 24 = "CH2=CH-CH=CH2" 25 = "HCHO" 26 = "CHCl=CCl2" -27 = "C2Cl4" +455 = "C2Cl4" 2770 = "PO43-" 28 = "CH2Cl2" -29 = "BaP" +7029 = "BaP" 3 = "SA" 30 = "PAH" 3012 = "Pb in TSP" @@ -165,32 +158,32 @@ 324 = "4-methylbenzaldehyde" 326 = "NOy" 33 = "T-VOC" -330 = "PCB-105" +4330 = "PCB-105" 333 = "PCB-128" -336 = "PCB-149" -339 = "PCB-156" +4336 = "PCB-149" +4339 = "PCB-156" 34 = "PAN" 340 = "PCB-177" -341 = "PCB-18" +4341 = "PCB-18" 344 = "PCB-26" -347 = "PCB-31" +4347 = "PCB-31" 348 = "PCB-44" 35 = "NH3" -351 = "Acenaphthene" +7351 = "Acenaphthene" 352 = "Acenaphtylene" -356 = "Aldrin" +780 = "Aldrin" 36 = "N-DEP" 3631 = "Cl- in TSP" -364 = "Anthanthrene" +7364 = "Anthanthrene" 3668 = "Na+ in TSP" 37 = "S-DEP" 372 = "Benzaldehyde" 373 = "Benzo(a)fluoranthene" 38 = "NO" 380 = "Benzo(b+j+k)fluoranthenes" -381 = "Benzo(e)pyrene" +7381 = "Benzo(e)pyrene" 39 = "HCl" -390 = "Biphenyl" +7390 = "Biphenyl" 391 = "Black Carbon" 393 = "Butanales" 394 = "H3C-CH2-CH2-CH3" @@ -199,14 +192,14 @@ 40 = "HF" 401 = "Carbon-tetrachloride" 4013 = "Hg0" -406 = "Chrysene" +7406 = "Chrysene" 41 = "CH4" 412 = "k" -415 = "Coronene" +7415 = "Coronene" 416 = "Cyclo-hexane" 417 = "Cyklopenta(cd)pyrene" 418 = "Dibenzo(ac+ah)anthracenes" -419 = "Dibenzo(ah)anthracene" +763 = "Dibenzo(ah)anthracene" 420 = "Dibenzofuran" 421 = "Dibenzothiophene" 425 = "N2O" @@ -217,17 +210,11 @@ 430 = "H2C=CH2" 431 = "C6H5-C2H5" 432 = "HC=CH" -4330 = "PCB-105" -4336 = "PCB-149" -4339 = "PCB-156" -4341 = "PCB-18" -4347 = "PCB-31" -435 = "Fluorene" +7435 = "Fluorene" 438 = "Halon 1211" 439 = "Halon 1301" -440 = "Heptachlor" -4406 = "Chrysene" -4407 = "Chrysene + Triphenylene" +779 = "Heptachlor" +7407 = "Chrysene + Triphenylene" 441 = "C7H16" 442 = "n-Hexanal" 443 = "C6H14" @@ -251,7 +238,7 @@ 485 = "Valeraldehyde" 486 = "H3C-(CH2)3-CH3" 487 = "Pentenes" -488 = "Perylene" +7488 = "Perylene" 49 = "V" 491 = "Acetophenone" 5 = "PM10" @@ -264,7 +251,7 @@ 5017 = "Mn in PM10" 5018 = "As in PM10" 502 = "Propanal" -5029 = "BaP in PM10" +5129 = "BaP in PM10" 503 = "H3C-CH2-CH3" 504 = "Acetone" 5045 = "NH4+ in PM10" @@ -279,33 +266,26 @@ 5073 = "Cu in PM10" 508 = "Retene" 51 = "HC C2-C6(excl. AROM. & CHLH)" -5129 = "BaP in PM10" 517 = "sum-PCB" 52 = "HC > C6 (excl. AROM. & CHLH)" 520 = "SO2 + SO4--" 53 = "Aromatics (except C6H6)" -5380 = "Benzo(b,j,k)fluorantheneInPM1" +6380 = "Benzo(b,j,k)fluorantheneInPM1" 54 = "Chlorinated hydrocarbons" 5418 = "Dibenzo(ac+ah)anthracene in PM10" -5419 = "Dibenzo(ah)anthracene in PM10" +5763 = "Dibenzo(ah)anthracene in PM10" 5480 = "Benzo(b,j)fluorantheneinPM10" -5609 = "Benzo(a)anthracene in PM10" -648 = "H+" 5610 = "Benzo(a)anthracene in PM10" -5616 = "Benzo(b)fluoranthene in PM10" +648 = "H+" 5617 = "Benzo(b)fluoranthene in PM10" -5625 = "Benzo(k)fluoranthene in PM10" 5626 = "Benzo(k)fluoranthene in PM10" 5629 = "Ca2+ in PM10" 5631 = "Cl- in PM10" -5654 = "Indeno-(1,2,3-cd)pyrene in PM" 5655 = "Indeno-(1,2,3-cd)pyrene in PM" 5657 = "K+ in PM10" 5659 = "Mg2+ in PM10" 5668 = "Na+ in PM10" -5759 = "Benzo(j)fluoranthene in PM10" 5762 = "Benzo(j)fluoranthene in PM10" -5763 = "Dibenzo(ah)anthracene in PM10" 5771 = "EC in PM10" 5772 = "OC in PM10" 6 = "BS" @@ -320,87 +300,48 @@ 6011 = "1,2,4-C6H3(CH3)3" 6012 = "1,2,3-C6H3(CH3)3" 6013 = "1,3,5-C6H3(CH3)3" -6015 = "BaP" 602 = "9-methylphenantrene" -604 = "Al" 605 = "Al" -606 = "Anthracene" -607 = "Anthracene" 608 = "Anthracene" -609 = "Benzo(a)anthracene" -610 = "Benzo(a)anthracene" 611 = "Benzo(a)anthracene" 613 = "Benzo(a)fluorene" -616 = "Benzo(b)fluoranthene" -617 = "Benzo(b)fluoranthene" 618 = "Benzo(b)fluoranthene" 619 = "Benzo(b)fluorene" 62 = "Fluor (except HF)" -620 = "Benzo(ghi)fluoranthene" 621 = "Benzo(ghi)fluoranthene" -622 = "Benzo(ghi)perylene" -623 = "Benzo(ghi)perylene" 624 = "Benzo(ghi)perylene" -625 = "Benzo(k)fluoranthene" -626 = "Benzo(k)fluoranthene" 627 = "Benzo(k)fluoranthene" -629 = "Ca++" -63 = "Zn" 630 = "Ca++" -631 = "Cl-" 632 = "Cl-" -633 = "Dibenz(ac+ah)anthracenes" 634 = "Dibenz(ac+ah)anthracenes" 635 = "Dibenz(ah)anthracene" -636 = "Dibenzo(ae)pyrene" -637 = "Dibenzo(ah)pyrene" -638 = "Dibenzo(ai)pyrene" -6380 = "Benzo(b,j,k)fluorantheneInPM1" -639 = "Dibenzo(ai)pyrene" -64 = "Co" -640 = "Dieldrin" -641 = "Dieldrin" -643 = "Fluoranthene" -644 = "Fluoranthene" +7636 = "Dibenzo(ae)pyrene" +7637 = "Dibenzo(ah)pyrene" +7639 = "Dibenzo(ai)pyrene" +7640 = "Dieldrin" 645 = "Fluoranthene" -649 = "HCB" -65 = "Fe" -650 = "HCB" +7781 = "HCB" 652 = "Heptachlor Epoxide" 653 = "Hg-reactive" -654 = "Indeno-(1,2,3-cd)pyrene" -655 = "Indeno-(1,2,3-cd)pyrene" 656 = "Indeno-(1,2,3-cd)pyrene" -657 = "K+" 658 = "K+" -659 = "Mg++" -66 = "Back scattering" 660 = "Mg++" +66 = "Back scattering" 661 = "Mo" 664 = "NH4+" 666 = "NO3-" -668 = "Na+" 669 = "Na+" 67 = "HNO3+NO3" -670 = "PCB-101" -671 = "PCB-101" 672 = "PCB-101" 673 = "PCB-114" -674 = "PCB-118" -675 = "PCB-118" 676 = "PCB-118" -677 = "PCB-138" 678 = "PCB-138" 679 = "PCB-141" 68 = "NH3+NH4" -680 = "PCB-153" -681 = "PCB-153" 682 = "PCB-153" 683 = "PCB-157" 684 = "PCB-167" 685 = "PCB-170" -686 = "PCB-180" -687 = "PCB-180" 688 = "PCB-180" 689 = "PCB-183" 69 = "Radioactivity" @@ -409,21 +350,11 @@ 692 = "PCB-194" 693 = "PCB-206" 694 = "PCB-209" -695 = "PCB-28" -696 = "PCB-28" 697 = "PCB-28" 698 = "PCB-33" 699 = "PCB-37" 7 = "O3" 700 = "PCB-47" -701 = "PCB-52" -7012 = "Pb" -7013 = "Hg" -7014 = "Cd" -7015 = "Ni" -7018 = "As" -702 = "PCB-52" -7029 = "BaP" 703 = "PCB-52" 704 = "PCB-60" 705 = "PCB-66" @@ -434,54 +365,30 @@ 71 = "CO2" 710 = "PCB_128" 711 = "PCB_138" -712 = "Phenanthrene" -713 = "Phenanthrene" 714 = "Phenanthrene" -715 = "Pyrene" -716 = "Pyrene" 717 = "Pyrene" 719 = "SO4--" 720 = "SO4-- corr" 723 = "TI" 728 = "Vanadium" -729 = "alpha-HCH" -73 = "Cu" -730 = "alpha-HCH" 731 = "alpha-HCH" -732 = "beta-HCH" 733 = "beta-HCH" -734 = "cis-CD" -735 = "cis-CD" +7734 = "cis-CD" 736 = "cis-NO" -737 = "gamma-HCH" -738 = "gamma-HCH" -7380 = "Benzo(b,j,k)fluoranthene" 739 = "gamma-HCH" -7407 = "Chrysene + Triphenylene" -741 = "o,p'-DDD" -7419 = "Dibenzo(ah)anthracene" -742 = "o,p'-DDE" -743 = "o,p'-DDT" 744 = "o,p'-DDD" 745 = "o,p'-DDE" 746 = "o,p'-DDT" -747 = "p,p'-DDD" -748 = "p,p'-DDE" -749 = "p,p'-DDT" -750 = "p,p'-DDD" -751 = "p,p'-DDE" -752 = "p,p'-DDT" +7750 = "p,p'-DDD" +7751 = "p,p'-DDE" +7752 = "p,p'-DDT" 753 = "precip_amount" 754 = "precip_amount_off" -755 = "trans-CD" -756 = "trans-CD" -757 = "trans-NO" +7755 = "trans-CD" +7757 = "trans-NO" 758 = "trans_NO" -759 = "Benzo(j)fluoranthene" -760 = "Benzo(j)fluoranthene" -761 = "Benzo(j)fluorene" 762 = "Benzo(j)fluoranthene" -763 = "Dibenzo(ah)anthracene" +761 = "Benzo(j)fluorene" 771 = "EC" 772 = "OC" 78 = "C6H4-(CH3)2" @@ -499,45 +406,31 @@ 5417 = "Cyclopenta(c,d)pyrene in PM10" 5488 = "Perylene in PM10" 5521 = "4.5-Methylene phenanthrene in PM10" -5522 = "5-Methyl Chrysene in PM10" -5523 = "9-Methyl anthracene in PM10" -5524 = "Benzo(b)naphtho(2,1-d)thiophene in PM10" -5525 = "Benzo(c)phenanthrene in PM10" -5526 = "Cholanthrene in PM10" -5527 = "Dibenzo(ac)anthracene in PM10" -5528 = "Dibenzo(al)pyrene in PM10" -5580 = "Benzo(b+j)fluoranthene in PM10" 5622 = "5-Methyl Chrysene in PM10" -5623 = "Benzo(ghi)perylene in PM10" +5523 = "9-Methyl anthracene in PM10" 5624 = "Benzo(b)naphtho(2,1-d)thiophene in PM10" +5725 = "Benzo(c)phenanthrene in PM10" +5526 = "Cholanthrene in PM10" 5627 = "Dibenzo(ac)anthracene in PM10" 5628 = "Dibenzo(al)pyrene in PM10" -5633 = "Dibenzo(ah+ac)anthracene in PM10" +5580 = "Benzo(b+j)fluoranthene in PM10" +5623 = "Benzo(ghi)perylene in PM10" +5733 = "Dibenzo(ah+ac)anthracene in PM10" 5636 = "Dibenzo(ae)pyrene in PM10" -2867 = "PFDA" +4867 = "PFDA" 5637 = "Dibenzo(ah)pyrene in PM10" 5639 = "Dibenzo(ai)pyrene in PM10" -5725 = "Benzo(c)phenanthrene in PM10" -5733 = "Dibenzo(ah+ac)anthracene in PM10" 7301 = "1-Methyl anthracene" 7309 = "1-Methyl Naphthalene" 7310 = "1-Methyl phenanthrene" 7313 = "2-Methyl anthracene" 7315 = "2-Methyl Naphthalene" 7317 = "2-Methyl phenanthrene" -7351 = "Acenaphthene" 7352 = "Acenaphthylene" -7364 = "Anthanthrene" -7381 = "Benzo(e)pyrene" -7390 = "Biphenyl" -7406 = "Chrysene" -7415 = "Coronene" 7417 = "Cyclopenta(c,d)pyrene" 7418 = "Dibenzo(ah+ac)anthracene" -7435 = "Fluorene" 7465 = "Naphthalene" 7480 = "Benzo(b+j)fluoranthene" -7488 = "Perylene" 7521 = "4.5-Methylene phenanthrene" 7522 = "5-Methyl Chrysene" 7523 = "9-Methyl anthracene" @@ -546,16 +439,11 @@ 7526 = "Cholanthrene" 7527 = "Dibenzo(ac)anthracene" 7528 = "Dibenzo(al)pyrene" -7636 = "Dibenzo(ae)pyrene" -7637 = "Dibenzo(ah)pyrene" -7639 = "Dibenzo(ai)pyrene" 374 = "C8H8O" 396 = "Methacroleine + Butanal" -433 = "C9H12" 434 = "C9H12" 453 = "C6H4Cl2" 454 = "C9H20" -455 = "C2Cl4" 456 = "Tetrachloromethane (air)" 457 = "Chlorobenzene (air)" 458 = "1,1,2-trichloroethane (air)" @@ -578,48 +466,12 @@ 6411 = "NVPM2.5" 6420 = "VPM1" 6421 = "NVPM1" -7016 = "Cr" -7063 = "Zn" -7073 = "Cu" -2861 = "PFBA" -2862 = "PFPeA" -2863 = "PFHxA" -2864 = "PFHpA" -2865 = "PFOA" -2866 = "PFNA" -2868 = "PFUnDA" -2871 = "PFBS" -2872 = "PFHxS" -2873 = "PFOSA" -2874 = "6:2-FTS" -2875 = "PFOS" -2876 = "PFDS" -4821 = "TCDD" -4822 = "CDD1N" -4823 = "CDD4X" -4824 = "CDD6X" -4825 = "CDD9X" -4826 = "CDD6P" -4827 = "CDDO" -4841 = "CDF2T" -4842 = "CDFDN" -4843 = "CDF2N" -4844 = "CDFDX" -4845 = "CDF6X" -4846 = "CDF9X" -4847 = "CDF4X" -4848 = "CDF6P" -4849 = "CDF9P" -4850 = "CDFO" -4851 = "CDFX1" -4852 = "CDFP2" 4861 = "PFBA" 4862 = "PFPeA" 4863 = "PFHxA" 4864 = "PFHpA" 4865 = "PFOA" 4866 = "PFNA" -4867 = "PFDA" 4868 = "PFUnDA" 4871 = "PFBS" 4872 = "PFHxS" @@ -627,52 +479,6 @@ 4874 = "6:2-FTS" 4875 = "PFOS" 4876 = "PFDS" -4901 = "BDE47" -4902 = "BDE85" -4903 = "BDE99" -4904 = "BDE100" -4905 = "BDE153" -4906 = "BDE154" -4907 = "BDE209" -4908 = "SCCP" -4909 = "MCCP" -4910 = "HBCD" -4911 = "HBB" -4912 = "PBT" -4913 = "PBEB" -4914 = "α-DBE-DBCH" -4915 = "β-DBE-DBCH" -4916 = "BEH-TEBP" -4917 = "BTBPT" -4918 = "EH-TBB" -4919 = "Syn-DP" -4920 = "Anti-DP" -4921 = "DBDPE" -4922 = "TBP" -7640 = "Dieldrin" -773 = "alpha-Endosulfan" -7734 = "cis-CD" -774 = "beta-Endosulfan" -775 = "Endosulfan sulfate" -7750 = "p,p'-DDD" -7751 = "p,p'-DDE" -7752 = "p,p'-DDT" -7755 = "trans-CD" -7757 = "trans-NO" -776 = "DCMU" -777 = "Atrazine" -7773 = "alpha-Endosulfan" -7774 = "beta-Endosulfan" -7775 = "Endosulfan sulfate" -7776 = "DCMU" -7777 = "Atrazine" -7778 = "Isoproturon" -7779 = "Heptachlor" -778 = "Isoproturon" -7780 = "Aldrin" -7781 = "HCB" -779 = "Heptachlor" -780 = "Aldrin" 7821 = "TCDD" 7822 = "CDD1N" 7823 = "CDD4X" @@ -702,12 +508,28 @@ 7908 = "SCCP" 7909 = "MCCP" 7910 = "HBCD" +4911 = "HBB" +4912 = "PBT" +4913 = "PBEB" +4914 = "α-DBE-DBCH" +4915 = "β-DBE-DBCH" +4916 = "BEH-TEBP" +4917 = "BTBPT" +4918 = "EH-TBB" +4919 = "Syn-DP" +4920 = "Anti-DP" +4921 = "DBDPE" +4922 = "TBP" +7773 = "alpha-Endosulfan" +7774 = "beta-Endosulfan" +7775 = "Endosulfan sulfate" +7776 = "DCMU" +7777 = "Atrazine" +778 = "Isoproturon" 2771 = "TP" 667 = "Kj-N" 6017 = "C6H12O2" 6003 = "UFPs" -382 = "Benzo(k+j)fluoranthene" -5382 = "Benzo(k+j)fluoranthene in PM10" -7382 = "Benzo(k+j)fluoranthene" 6382 = "Benzo(k+j)fluoranthene" -44 = "NT" +5382 = "Benzo(k+j)fluoranthene in PM10" +view = "NT" diff --git a/src/pyaro_readers/eeareader/utils/generate_data_toml.py b/src/pyaro_readers/eeareader/utils/generate_data_toml.py index 62d8631..2f67098 100644 --- a/src/pyaro_readers/eeareader/utils/generate_data_toml.py +++ b/src/pyaro_readers/eeareader/utils/generate_data_toml.py @@ -1,6 +1,6 @@ """ response.json can be downloaded with -curl -X 'GET' 'https://eeadmz1-downloads-api-appservice.azurewebsites.net/Property' -H 'accept: text/plain' > response.json +curl -X 'GET' 'https://eeadmz1-downloads-api-appservice.azurewebsites.net/Pollutant' -H 'accept: text/plain' > response.json concentration.csv can be found at https://dd.eionet.europa.eu/vocabulary/uom/concentration """ @@ -9,6 +9,8 @@ pollutants = [ "SO2", + "SO4--", + "SO4 (H2SO4 aerosols) (SO4--)", "PM10", "PM2.5", "O3", @@ -56,7 +58,7 @@ target.write("[units]\n") for key in response: - target.write(f'"{key}" = {response[key]}\n') + target.write(f'"{key.lower()}" = {response[key]}\n') target.write("\n\n") target.write("[pollutant]\n") for entry in properties: