C01 Insert Cities And Iris¶
Insert cities and IRIS from geojson file and BPCE API.
Command
¶
Bases: BaseCommand
Source code in back/iarbre_data/management/commands/c01_insert_cities_and_iris.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
|
_insert_cities(data)
staticmethod
¶
Insert cities from a GEOJSON file. Args: data (str): path to the GEOJSON containing cities geometry.
Source code in back/iarbre_data/management/commands/c01_insert_cities_and_iris.py
84 85 86 87 88 89 90 91 92 93 94 95 |
|
_insert_iris(qs_city)
staticmethod
¶
Use BPCE API to download IRIS and insert them in a table Args: qs_city (QuerySet): Query set that correspond to one or multiple cities.
Source code in back/iarbre_data/management/commands/c01_insert_cities_and_iris.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
handle(*args, **options)
¶
Insert cities from geojson file and IRIS from BPCE API.
Source code in back/iarbre_data/management/commands/c01_insert_cities_and_iris.py
97 98 99 100 101 102 103 104 105 106 107 |
|