greenelab / word-lapse

Explore how a word changes over time
https://greenelab.github.io/word-lapse/
Other
6 stars 3 forks source link

Frequency data sometimes not sorted by year #29

Closed vincerubinetti closed 2 years ago

vincerubinetti commented 2 years ago

image

Example:

https://greenelab.github.io/word-lapse/?search=microarray

Response:

[
  {
    "year": 2019,
    "frequency": 3762
  },
  {
    "year": 2010,
    "frequency": 3971
  },
  {
    "year": 2012,
    "frequency": 4139
  },
  {
    "year": 2017,
    "frequency": 3936
  },
  {
    "year": 2015,
    "frequency": 4388
  },
  {
    "year": 2011,
    "frequency": 3858
  },
  {
    "year": 2013,
    "frequency": 3740
  },
  {
    "year": 2020,
    "frequency": 2966
  },
  {
    "year": 2016,
    "frequency": 4001
  },
  {
    "year": 2014,
    "frequency": 3420
  },
  {
    "year": 2018,
    "frequency": 3708
  },
  {
    "year": 2021,
    "frequency": 529
  }
]

I can easily sort this on the frontend, but it should probably be fixed in the backend at its source, in case anyone uses the api directly.