Coverage for src/papierstat/datasets/geojson.py: 100%
7 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-30 06:49 +0200
« prev ^ index » next coverage.py v7.2.7, created at 2023-06-30 06:49 +0200
1# -*- coding: utf-8 -*-
2"""
3@file
4@brief Jeux de données reliés aux vins.
5"""
7import os
8from .data_helper import get_data_folder
11def get_geojson_countries():
12 """
13 Retourne les contours des pays au format :epkg:`GeoJSON`.
14 Les données sont disponibles dans le répertoire
15 `data <https://github.com/sdpython/papierstat/tree/master/src/papierstat/datasets/data>`_
16 et viennent de `countries.geo.json <https://github.com/johan/world.geo.json/blob/master/countries.geo.json>`_.
17 Notebooks associés à ce jeu de données :
19 .. runpython::
20 :rst:
22 from papierstat.datasets.documentation import list_notebooks_rst_links
23 links = list_notebooks_rst_links('visualisation', 'enedis_cartes')
24 links = [' * %s' % s for s in links]
25 print('\\n'.join(links))
27 @param cache where to cache or unzip the data if downloaded a second time
28 @return text content (str)
29 """
30 data = get_data_folder()
31 name = os.path.join(data, 'countries.geo.json')
32 return name