Hello Opendatasoft Community,
I hope this message finds you well.
I am currently working on a project where we utilize the ODS Widgets to display various datasets. Our application is designed to pull data from multiple sources, and currently, we hardcode the year values for dataset parameters. Here is a snippet of our configuration:
Â
<!-- Conteneur principal de l'application AngularJS utilisant la librairie ODS Widgets -->
<div ng-app="ods-widgets">
  <!-- Définition des sources de données et des paramètres pour les requêtes -->
  <ods-dataset-context domain="opendata.fr.ch"
             context="population,Â
                 populationlatest,
                 emplois,
                 emploislatest,
                 logements,
                 logementslatest,
                 vacantslatest,
                 education,
                 educationlatest,
                 educationecolelatest,
                 ctxdistricts,Â
                 ctxcommunes"
             population-dataset="01_02_age_5_sex_natio"
             populationlatest-dataset="01_02_age_5_sex_natio"
             emplois-dataset="06_02_etablissements_emplois_branches"
             emploislatest-dataset="06_02_etablissements_emplois_branches"             Â
             logements-dataset="09_03_parc_log_selon_categorie_batiment_et_nbre_pieces_des_2010"
             logementslatest-dataset="09_03_parc_log_selon_categorie_batiment_et_nbre_pieces_des_2010"
             vacantslatest-dataset="09_03_log_vacants_1_categorie_batiment_des_1995"
             education-dataset="15_02_eleves_lieu_domicile"
             educationlatest-dataset="15_02_eleves_lieu_domicile"
             educationecolelatest-dataset="15_02_eleves_lieu_ecole"
             populationlatest-parameters="{'refine.annee':'2022'}"
             emploislatest-parameters="{'refine.annee':'2021'}"
             logementslatest-parameters="{'refine.annee':'2022'}"
             vacantslatest-parameters="{'refine.statyear_taux_log_vacant':'2023'}"
             educationlatest-parameters="{'refine.annee':'2021'}"
             educationecolelatest-parameters="{'refine.annee':'2021'}"
             ctxdistricts-dataset="01_02_age_5_sex_natio"
             ctxcommunes-dataset="01_02_age_5_sex_natio"
             ng-init="values = {};
                 selected = {}">
</div>
Â
We would like to know if it is possible to dynamically refine our data by using a variable, such as the maximum year available in the dataset, instead of setting a hardcoded value. For example, instead of setting educationecolelatest-parameters="{'refine.annee':'2021'}"
, we would like to use something like educationecolelatest-parameters="{'refine.annee': max(annee)}"
so that our dashboards automatically adapt to the latest year available in the data.
This feature would greatly enhance the flexibility and maintenance of our dashboards, allowing them to remain up-to-date without manual intervention each year.
Is there a way to achieve this within the current capabilities of the ODS Widgets? If not, are there any planned updates or workarounds that you could suggest?
Thank you in advance for your assistance and guidance!
Best regards,
Auto-translation 🪄
Bonjour la communauté Opendatasoft, J'espère que ce message vous trouvera bien. Je travaille actuellement sur un projet dans lequel nous utilisons les widgets ODS pour afficher divers ensembles de données. Notre application est conçue pour extraire des données de plusieurs sources, et actuellement, nous codons en dur les valeurs de l'année pour les paramètres de l'ensemble de données. Voici un extrait de notre configuration :Â