Ejemplo n.º 1
0
    """
    json_data = istat_helper.area(show=False)
    for area in json_data:
        list_dataset_dim(istat_helper, area)


if __name__ == "__main__":
    # cache_dir where to store downloaded data file
    JSONSTAT_HOME = os.path.join(os.path.dirname(__file__), "..")
    cache_dir = os.path.normpath(os.path.join(JSONSTAT_HOME, "istat-tests", "fixtures", "istat_cached"))
    downloader = jsonstat.Downloader(cache_dir)
    istat = IstatHelper(downloader, lang=1)

    # list_area_dataset_dim(istat_helper)

    istat.help()

    print("*** all areas")
    istat.area()

    # ...
    # {
    #      "Cod": "LAB",
    #      "Desc": "Lavoro",
    #      "Id": 26
    #  }
    # ...

    print("*** show dataset contained into area code 26 (labour)")
    istat.dslist(26)
Ejemplo n.º 2
0
    json_data = istat_helper.area(show=False)
    for area in json_data:
        list_dataset_dim(istat_helper, area)


if __name__ == "__main__":
    # cache_dir where to store downloaded data file
    JSONSTAT_HOME = os.path.join(os.path.dirname(__file__), "..")
    cache_dir = os.path.normpath(
        os.path.join(JSONSTAT_HOME, "istat-tests", "fixtures", "istat_cached"))
    downloader = jsonstat.Downloader(cache_dir)
    istat = IstatHelper(downloader, lang=1)

    # list_area_dataset_dim(istat_helper)

    istat.help()

    print("*** all areas")
    istat.area()

    # ...
    # {
    #      "Cod": "LAB",
    #      "Desc": "Lavoro",
    #      "Id": 26
    #  }
    # ...

    print("*** show dataset contained into area code 26 (labour)")
    istat.dslist(26)