Closed SPTKL closed 3 years ago
convert them into computed properties
with open(f"{Path(__file__).parent}/data/metadata.json") as f:
self.metadata = json.load(f)
with open(f"{Path(__file__).parent}/data/median.json") as f:
self.median = json.load(f)
with open(f"{Path(__file__).parent}/data/special.json") as f:
self.special = json.load(f)
to
@cached_property
def metadata(self) -> list:
with open(f"{Path(__file__).parent}/data/{source}/{year}/metadata.json") as f:
return json.load(f)
source
to indicateacs
ordecennial
self.metadata
,self.median
, andself.special
to parse the year parameter and point to the correct jsonTo initialize class: