Title: | 'La Societe Nouvelle' API Access |
---|---|
Description: | Tools facilitating access to the 'macro_data' service of the 'La Societe Nouvelle' API. It ensures an easy and fully-disclosed access to all macro-level data used in the 'La Societe Nouvelle' systems and the related metadata. Related API can be accessed from <https://api.lasocietenouvelle.org/>. |
Authors: | Joris Blain [aut, cre] |
Maintainer: | Joris Blain <[email protected]> |
License: | CeCILL |
Version: | 1.0.1 |
Built: | 2025-01-27 04:55:41 UTC |
Source: | https://github.com/la-societe-nouvelle/lsnstat |
Get formatted SQL filter from R named list
from_filter_list_to_sql(filter_list)
from_filter_list_to_sql(filter_list)
filter_list |
Filter (named list). |
fl = list(year = '2018',industry = 'A01',serie_id = 'ghg_obs') lsnstat:::from_filter_list_to_sql(fl)
fl = list(year = '2018',industry = 'A01',serie_id = 'ghg_obs') lsnstat:::from_filter_list_to_sql(fl)
Get table-related endpoint
get_endpoint(dataset)
get_endpoint(dataset)
dataset |
dataset requested. |
lsnstat:::get_endpoint("figaro_main_aggregates")
lsnstat:::get_endpoint("figaro_main_aggregates")
Get dataset list and related informations #'
get_lsn_dataset_list()
get_lsn_dataset_list()
get_lsn_dataset_list()
get_lsn_dataset_list()
R companion of 'La Societe Nouvelle' stats API services
lsnstat_macrodata(dataset, filter_list, filters, sort, verbose = T)
lsnstat_macrodata(dataset, filter_list, filters, sort, verbose = T)
dataset |
dataset requested : list available at https://docs.lasocietenouvelle.org/series-donnees (required) |
filter_list |
filters to apply : R list of dataset 'params' available through function lsnstat_metadata or get_lsn_dataset_list (optional) |
filters |
filters to apply : formatted list of dataset 'params' available through function lsnstat_metadata or get_lsn_dataset_list (optional) |
sort |
Sort the dataset by one or more 'params' available(s) through function lsnstat_metadata or get_lsn_dataset_list (optional). |
verbose |
display or hide supplementary informations. |
A data.frame()
.
#GET macro footprint : Greenhouse gases emissions intensities # for sector "C19" between 2015 and 2021 lsnstat_macrodata(dataset = "macro_fpt", filter_list = list(indic = 'GHG',year = 2015:2021,industry = 'C19')) #GET macro footprint trend : Energy uses intensities # for sector "C28" between 2025 and 2030 lsnstat_macrodata(dataset = "macro_fpt_trd", filters = "indic=NRG&year=2025+2026+2027+2028+2029+2030&industry=C28") # GET sectoral value-added, production and intermediate consumption from FIGARO # for sector 'O84' in 2010 and 2030 lsnstat_macrodata("figaro_main_aggregates",list(aggregate = c('X','VA','P2'), industry = 'O84', year = c("2010","2030")), sort = c('country','value'))
#GET macro footprint : Greenhouse gases emissions intensities # for sector "C19" between 2015 and 2021 lsnstat_macrodata(dataset = "macro_fpt", filter_list = list(indic = 'GHG',year = 2015:2021,industry = 'C19')) #GET macro footprint trend : Energy uses intensities # for sector "C28" between 2025 and 2030 lsnstat_macrodata(dataset = "macro_fpt_trd", filters = "indic=NRG&year=2025+2026+2027+2028+2029+2030&industry=C28") # GET sectoral value-added, production and intermediate consumption from FIGARO # for sector 'O84' in 2010 and 2030 lsnstat_macrodata("figaro_main_aggregates",list(aggregate = c('X','VA','P2'), industry = 'O84', year = c("2010","2030")), sort = c('country','value'))
Metadata query function for lsnstat_macrodata requests.
lsnstat_metadata(dataset, param)
lsnstat_metadata(dataset, param)
dataset |
dataset requested : list available through get_lsn_dataset_list (required) |
param |
list of dataset 'params' available for a dataset (optional) |
A data.frame()
.
# GET 'figaro_main_aggregates' (Sectoral production accounts from FIGARO) # table parameters and codes. lsnstat_metadata(dataset = "figaro_main_aggregates") # GET 'figaro_intermediate_inputs' (flattened intermediate flows matrix from FIGARO) # filters for parameter 'use_country'. lsnstat_metadata("figaro_intermediate_inputs",param = "use_country")
# GET 'figaro_main_aggregates' (Sectoral production accounts from FIGARO) # table parameters and codes. lsnstat_metadata(dataset = "figaro_main_aggregates") # GET 'figaro_intermediate_inputs' (flattened intermediate flows matrix from FIGARO) # filters for parameter 'use_country'. lsnstat_metadata("figaro_intermediate_inputs",param = "use_country")