Commit e12d5da2 authored by Christophe Benz's avatar Christophe Benz
Browse files

Merge branch 'b2015' into 'master'

METI fetcher: IIP zip filename has changed

See merge request !1
parents d80a8b70 31657e6e
Pipeline #111846 passed with stage
in 15 seconds
......@@ -43,7 +43,7 @@ PROVIDER_JSON = dict(
)
DATASETS_INFO = {
'iip': 'Indices of Industrial Production by Industry (2010 = 100.0)',
'iip': 'Indices of Industrial Production by Industry (2015 = 100.0)',
'sanzi': 'Indices of Tertiary Industry Activity by industry (2010 = 100.0)'
}
......@@ -389,7 +389,7 @@ def main():
write_category_tree_json(target_dir / 'category_tree.json')
# iip dataset
generate_dataset('iip', source_dir / 'b2010_g1e', DATASETS_INFO['iip'], target_dir, with_concept=True)
generate_dataset('iip', source_dir / 'b2015_g1e', DATASETS_INFO['iip'], target_dir, with_concept=True)
# sanzi dataset
sanzi_source_dir = source_dir / 'b2010_ke'
......
......@@ -95,7 +95,7 @@ def download_and_extract(url, target_dir: Path, dir_name, cache_dir: Path = None
# Extracts all CSV
csv_dir = target_dir / dir_name
csv_dir.mkdir()
csv_dir.mkdir(exist_ok=True)
zip_archive.extractall(str(csv_dir))
log.info('Zip [%s] extracted.', str(zip_filepath))
ok = True
......@@ -138,8 +138,8 @@ def main():
log.info('Downloading meti data')
download_and_extract('http://www.meti.go.jp/english/statistics/tyo/iip/csv/b2010_g1e.zip',
target_dir, 'b2010_g1e', cache_dir=args.cache_dir)
download_and_extract('http://www.meti.go.jp/english/statistics/tyo/iip/csv/b2015_g1e.zip',
target_dir, 'b2015_g1e', cache_dir=args.cache_dir)
download_and_extract('http://www.meti.go.jp/english/statistics/tyo/sanzi/csv/b2010_ke.zip',
target_dir, 'b2010_ke', cache_dir=args.cache_dir)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment