def requires(self): requires = {} for key, url in self.URLS.items(): requires[key] = (RepoFile(resource_id=key+"_"+self.task_id, version=self.version(), url=url)) return requires
def requires(self): themes = { THEME_DEC_IRIS_2012: 'BASE_TD_FILO_DEC_IRIS_2012.xls', THEME_DISP_IRIS_2012: 'BASE_TD_FILO_DISP_IRIS_2012.xls', } URL = self.URL_base + themes.get(self.table_theme) return RepoFile(resource_id=self.task_id, version=self.version(), url=URL)
def requires(self): requirements = {} # Query API, extract table ID from name meta = requests.get(self.API_URL.format(self.table)).json() api_id = (meta['structure']['keyfamilies']['keyfamily'][0]['id']).lower() for geo in self.GEO_TYPES: requirements[geo] = RepoFile(resource_id='{task_id}_{geo}'.format(task_id=self.task_id, geo=geo), version=self.version(), url=self.DOWNLOAD_URL.format(id=api_id, geo=geo)) return requirements
def requires(self): themes = { 'population': '2028582/', 'housing': '2028267/', 'education': '2028265/', 'household': '2028569/', 'employment': '2028654/' } URL = self.URL_base + themes.get( self.table_theme) + self.iris_overseas.get(self.table_theme) return RepoFile(resource_id=self.task_id, version=self.version(), url=URL)
def requires(self): return RepoFile(resource_id=self.task_id, version=self.version(), url=self.url_template.format(year=self.year))
def requires(self): return RepoFile(resource_id=self.task_id, version=self.version(), url=self.URL.format(year=self.year, sample=self.sample))
def requires(self): url = self.URL.format(code=self.table_code.lower()) return RepoFile(resource_id=self.task_id, version=self.version(), url=url)
def requires(self): return RepoFile(resource_id=self.task_id, version=self.version(), url=self.URL, downloader=cdrc_downloader)
def requires(self): return RepoFile(resource_id=self.task_id, version=self.version(), url=self.URL.format(seq=self.seq))
def requires(self): return RepoFile(resource_id=self.task_id, version=self.version(), url=self.url())