Code Monkey home page Code Monkey logo

Comments (11)

lpofredc avatar lpofredc commented on June 15, 2024 1

ex:

const months = [
      'Jan',
      'Fév',
      'Mars',
      'Avril',
      'Mai',
      'Juin',
      'Juil',
      'Août',
      'Sept',
      'Oct',
      'Nov',
      'Déc',
    ]

const data = [{
  label: 3,
    value: 5
},{
label:6,
value:10
}]

 const values = months.map((e,i) => data.find(de => de.label==i+1)?.value || 0  )

from birdatlasoffrance.

lpofredc avatar lpofredc commented on June 15, 2024

Pour les epocs, cf. #19.

from birdatlasoffrance.

eguilley avatar eguilley commented on June 15, 2024

L'API /api/v1/area/general_stats/{id_area} renvoie une erreur 500

from birdatlasoffrance.

lpofredc avatar lpofredc commented on June 15, 2024

Fixé, du a l'absence des vues matérialisées en bdd (drop ... cascade)

from birdatlasoffrance.

eguilley avatar eguilley commented on June 15, 2024

Répartition temporelle des données

@lpofredc Certaines mailles (/api/v1/area/time_distrib/661699/month) ne présentent aucune donnée pour certains mois. Au lieu de ne rien renvoyer pour les mois concernés (cela provoque un bug sur l'affichage de l'histogramme), j'aurais besoin de la valeur 0, comme suit :

[
  {
    "label": 1,
    "count_data": 0
  },
  ...
]

from birdatlasoffrance.

lpofredc avatar lpofredc commented on June 15, 2024

Complexe au regard de la généricité de la fonction qui éxécute une requête côté BDD avec les fonctions natives d'extraction de dates et ne retourne que périodes avec données. Privilégier une attribution des données côté frontend avec une itération sur les lables: index du label dans l'array + 1 = label de l'API.

from birdatlasoffrance.

eguilley avatar eguilley commented on June 15, 2024

Merci, c'est corrigé !

from birdatlasoffrance.

eguilley avatar eguilley commented on June 15, 2024

@lpofredc : La valeur data_count de l'API /api/v1/area/general_stats/{id_area} fournit le total des données sans contrainte de temps, alors que c'est le total après 2019 qui est attendu.

from birdatlasoffrance.

lpofredc avatar lpofredc commented on June 15, 2024

fix in 616e9f4

from birdatlasoffrance.

eguilley avatar eguilley commented on June 15, 2024

Je me demande s'il n'y a pas toujours un problème avec data_count...

Exemple de la maille E100N656 qui ne présente aucune espèce après 2019. Pourtant l'API /api/v1/area/general_stats/50061 renvoie les données suivantes :

{
  "last_date": "2015-08-20",
  "data_count": 22,
  "taxa_count_all_period": 0,
  "taxa_count_wintering": 0,
  "taxa_count_breeding": 0,
  "prospecting_hours_other_period": 0,
  "prospecting_hours_wintering": 0,
  "prospecting_hours_breeding": 0
}

avec un data_count qui n'est pas égal à 0. C'est normal @lpofredc ?

from birdatlasoffrance.

lpofredc avatar lpofredc commented on June 15, 2024

MaJ non appliqué sur la bdd, corrigé

from birdatlasoffrance.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.