Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating LUSA data collection #22

Open
2 tasks done
Oliph opened this issue Jun 9, 2022 · 5 comments
Open
2 tasks done

Creating LUSA data collection #22

Oliph opened this issue Jun 9, 2022 · 5 comments

Comments

@Oliph
Copy link
Collaborator

Oliph commented Jun 9, 2022

  • Integrate the sample dataset into a collection
  • Contact LUSA back to have access to their data
@BlancaCalvo
Copy link
Contributor

  • Look for a week with a lot of claims and a variety of topics to use for the POC

@BlancaCalvo
Copy link
Contributor

  • Ask for that of the month surrounding that week and for data based on the extracted keywords

@Oliph
Copy link
Collaborator Author

Oliph commented Jun 17, 2022

I did it per month

I run the following command:

db.maldita.aggregate([
{
$group: { _id: {$dateToString:  {date: {$dateFromString: {dateString:  "$createdAt"}}, format: "%Y-%m"}}, 
nbrClaims: {$sum: 1} }
}, 
{$sort: {_id: 1}}
])

{ "_id" : "2020-06", "nbrClaims" : 1 }
{ "_id" : "2021-08", "nbrClaims" : 1 }
{ "_id" : "2021-10", "nbrClaims" : 51 }
{ "_id" : "2021-11", "nbrClaims" : 52 }
{ "_id" : "2021-12", "nbrClaims" : 73 }
{ "_id" : "2022-01", "nbrClaims" : 240 }
{ "_id" : "2022-02", "nbrClaims" : 113 }
{ "_id" : "2022-03", "nbrClaims" : 193 }
{ "_id" : "2022-04", "nbrClaims" : 108 }
{ "_id" : "2022-05", "nbrClaims" : 53 }
{ "_id" : "2022-06", "nbrClaims" : 25 }

So the month with the highest numbers of claims is January 2022 but I would suggest asking for March (to avoid being between 2021 and 2022 if needed to go back slightly more in the past)

@BlancaCalvo
Copy link
Contributor

Why are there no dates previous 2020 and why are there months missing?

@Oliph
Copy link
Collaborator Author

Oliph commented Jun 17, 2022

No idea, it is either their API that only started to work properly from 2022, or our script to access the data.
After checking the db, all records have a key 'createdAt' so we can discard that possibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants