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

Activity #3B #9

Open
jbericat opened this issue Oct 27, 2020 · 10 comments
Open

Activity #3B #9

jbericat opened this issue Oct 27, 2020 · 10 comments
Labels
Follow-Up & Resources Activity follow-up & related resources discussion thread

Comments

@jbericat
Copy link
Member

Here we could share resources related with this activity (bibliography, links, etc), as well as discuss any problem or issue we might face while performing it (English is not mandatory).

@jbericat jbericat added the Follow-Up & Resources Activity follow-up & related resources discussion thread label Oct 27, 2020
@cdelbg
Copy link
Contributor

cdelbg commented Nov 7, 2020

Some improvement on "IsolatedData" part but cannot limit to just 5 nodes

"agrupated data" remains the same as the last changes.

@jbericat
Copy link
Member Author

jbericat commented Nov 8, 2020

Hey Carles,

I got a first approach of the "agrupatedData" part that already works to retrieve the confirmed_cases from Tarragona's same week when there's a max in Lleida. However, I think I must cap-out the results to the maximum value from the filtered ones, since I get two results for Tarragona. For example, there are two nodes for the 15/07/2020 date, one with 0 confirmed_cases (residence = no) and another with 75 cases (residence = yes). I guess we should take the highest (I still haven't reviewed your code, I wanted to understand perfectly how xQuery works before).

My code -> uoc.abd.prac2/activity_3/activity_3B.txt

@jbericat
Copy link
Member Author

jbericat commented Nov 8, 2020

Ok I think I got the "AggrupatedData" part working. Now I just have to check that the results are correct, and if there is any other way more efficient to do the same thing. Here's the upgraded code:

uoc.abd.prac2/activity_3/activity_3B.txt

These are the results I get:

v3 1

I'll check the correctness of these results after lunch and then I'll try to help you with the "IsolatedData" part 👍

@jbericat
Copy link
Member Author

jbericat commented Nov 8, 2020

Hey @cdelbg ,

I've already reviewed your code for the <aggregatedData> part, and I see what's wrong with it: You're not filtering the results in DadesTarragona.xml by the startDate retrieved from DadesLleida.xml. Instead you're getting the max value (among all dates) on each xml file, and then showing that result in the return clause. Check out the code in my previous comment to see how do I filter the results with a for clause and then assign ALL the rows returned into a variable with let. Then, I can filter individually on each return element using the xPath expression (predicate filter) we defined in previous activities.

I also checked that the results I got are right, but it would be great if you could take a look also, just in case I missed anything.

In regards to the <IsolatedData> part, I'll start reviewing your code now (I'll keep you updated)

@cdelbg
Copy link
Contributor

cdelbg commented Nov 8, 2020

o k, I'll check what you say.

about the isolateddata part I think that it's working at last, please have a look.

@jbericat
Copy link
Member Author

jbericat commented Nov 8, 2020

o k, I'll check what you say.

about the isolateddata part I think that it's working at last, please have a look.

It looks great at a first sight, good job! I'll test it and see a way to integrate it nicely with the other part (also, we could define functions to make the return code more readable)

@jbericat
Copy link
Member Author

jbericat commented Nov 8, 2020

okay so I've already tested your part and it works perfectly to me, well done again 👍 . I've also put it together along with the previous part of the code, so we can say that this activity is done (we still have to comment the code, I'll proceed with the <AgrupatedData> part between tonight and tomorrow).

Here is the final code of the activity (I did not implemented the custom functions though, since I finally thought that they were not really necessary - we're not using them more than once):

https://github.com/UOC-Assignments/uoc.abd.prac2/blob/jordi_v3.2/activity_3/activity_3B.txt

@cdelbg
Copy link
Contributor

cdelbg commented Nov 8, 2020

I've checked the whole code and runs perfect
do you want to meet tomorrow 16h and check that everything is o k in order to deliver the PA?

@jbericat
Copy link
Member Author

jbericat commented Nov 9, 2020

I've checked the whole code and runs perfect
do you want to meet tomorrow 16h and check that everything is o k in order to deliver the PA?

Ok at 16 is fine (I just saw your comment)

@jbericat
Copy link
Member Author

jbericat commented Nov 9, 2020

I've already added the latest comments to the code, so there is nothing else to do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Follow-Up & Resources Activity follow-up & related resources discussion thread
Projects
None yet
Development

No branches or pull requests

2 participants