
Get data on every Commune of one territory
Source:R/get_local_data_by_com.R
get_local_data_by_com.Rd
Get data on every Commune of one territory
Usage
get_local_data_by_com(
ds_name,
geo,
geo_object,
filter = "",
base_url_melodi = "https://api.insee.fr/melodi"
)
Examples
get_local_data_by_com(
ds_name = "DS_POPULATIONS_REFERENCE",
geo = "44",
geo_object = "DEP"
) |>
head()
#> Total count request : https://api.insee.fr/melodi/data/DS_POPULATIONS_REFERENCE?GEO=DEP-44%2ACOM&totalCount=TRUE&maxResult=0
#> Number of lines : 1 863
#> GEO_REF GEO_OBJECT GEO FREQ TIME_PERIOD POPREF_MEASURE OBS_VALUE
#> 1 2024 COM 44130 A 2016 PCAP 96
#> 2 2024 COM 44214 A 2016 PCAP 29
#> 3 2024 COM 44099 A 2016 PMUN 1960
#> 4 2024 COM 44202 A 2011 PCAP 42
#> 5 2024 COM 44102 A 2022 PTOT 3418
#> 6 2024 COM 44214 A 2016 PTOT 2089
get_local_data_by_com(
ds_name = "DS_POPULATIONS_REFERENCE",
geo = "44",
geo_object = "DEP",
filter = "POPREF_MEASURE=PMUN&TIME_PERIOD=2022"
) |>
head()
#> Total count request : https://api.insee.fr/melodi/data/DS_POPULATIONS_REFERENCE?GEO=DEP-44%2ACOM&POPREF_MEASURE=PMUN&TIME_PERIOD=2022&totalCount=TRUE&maxResult=0
#> Number of lines : 207
#> GEO_REF GEO_OBJECT GEO FREQ TIME_PERIOD POPREF_MEASURE OBS_VALUE
#> 1 2024 COM 44217 A 2022 PMUN 6633
#> 2 2024 COM 44179 A 2022 PMUN 5435
#> 3 2024 COM 44086 A 2022 PMUN 1064
#> 4 2024 COM 44162 A 2022 PMUN 50561
#> 5 2024 COM 44055 A 2022 PMUN 16613
#> 6 2024 COM 44119 A 2022 PMUN 2042