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

Probable mismatch between lists in region and in Sweden #65

Closed
larspett opened this issue Feb 16, 2024 · 5 comments
Closed

Probable mismatch between lists in region and in Sweden #65

larspett opened this issue Feb 16, 2024 · 5 comments
Assignees
Labels
bug Something isn't working function A function needs to be fixed prio1 High priority

Comments

@larspett
Copy link
Collaborator

I get a failure when trying:

get_trimComparedPlots(year=2010:2023,Län = 'Västra Götaland')
Species with ID 2 skipped, no observations! 1% | ETA: 3m
Species with ID 3 skipped, no observations! 2% | ETA: 3m
Species with ID 4 skipped, no observations! 3% | ETA: 3m
Species with ID 10 skipped, no observations! 7% | ETA: 3m
Species with ID 13 skipped, no observations! 9% | ETA: 2m
Species with ID 15 skipped, no observations! 10% | ETA: 2m
Species with ID 20 skipped, no observations! 15% | ETA: 2m
Species with ID 21 skipped, no observations! 16% | ETA: 2m
Species with ID 31 skipped, no observations! 24% | ETA: 2m
Species with ID 39 skipped, no observations! 27% | ETA: 2m
Species with ID 41 skipped, no observations! 28% | ETA: 2m
Species with ID 48 skipped, no observations! 35% | ETA: 2m
Species with ID 49 skipped, no observations! 36% | ETA: 2m
Species with ID 55 skipped, no observations! 39% | ETA: 2m
Species with ID 64 skipped, no observations! 45% | ETA: 2m
Species with ID 66 skipped, no observations! 47% | ETA: 1m
Species with ID 69 skipped, no observations! 50% | ETA: 1m
Species with ID 78 skipped, no observations!■ 57% | ETA: 1m
Species with ID 82 skipped, no observations!■■ 60% | ETA: 1m
Species with ID 84 skipped, no observations!■■ 61% | ETA: 1m
Species with ID 96 skipped, no observations!■■■■■ 69% | ETA: 1m
Species with ID 97 skipped, no observations!■■■■■ 70% | ETA: 1m
Species with ID 113 skipped, no observations!■■■■■■■ 80% | ETA: 34s
Species with ID 123 skipped, no observations!■■■■■■■■■ 87% | ETA: 22s
Species with ID 126 skipped, no observations!■■■■■■■■■■ 89% | ETA: 19s
Species with ID 127 skipped, no observations!■■■■■■■■■■ 90% | ETA: 17s
Species with ID 134 skipped, no observations!■■■■■■■■■■■ 94% | ETA: 9s
Species with ID 181 skipped, no observations!■■■■■■■■■■■■ 98% | ETA: 3s
Species with ID 183 skipped, no observations!■■■■■■■■■■■■■ 99% | ETA: 2s
Error in postgresqlExecStatement(conn, statement, ...) :
RPosgreSQL error: could not Retrieve the result : ERROR: column "na" does not exist
LINE 9: ...3,95,105,106,108,109,110,111,112,115,117,118,119,120,125,NA)
^

Error in group_by():
! Must group by variables found in .data.
Column speuid is not found.
Column art is not found.
Run rlang::last_trace() to see where the error occurred.
Warning message:
In postgresqlQuickSQL(conn, statement, ...) :
Could not create execute: SELECT
spv_flightweekmin AS min,
spv_flightweekmax as max,
spv_spe_speciesid AS speuid,
spe_semainname AS art
FROM spv_speciesvalidation AS spv
INNER JOIN spe_species AS spe ON spe.spe_uid = spv_spe_speciesid
WHERE
spv_spe_speciesid IN (5,6,8,11,16,17,18,19,23,24,25,26,28,29,30,33,38,40,42,43,44,47,50,52,56,57,58,60,63,67,68,70,71,72,73,77,79,80,89,90,91,92,93,95,105,106,108,109,110,111,112,115,117,118,119,120,125,NA)
AND
spv_flightweekmin IS NOT NULL
ORDER BY speuid;

@larspett larspett added the bug Something isn't working label Feb 16, 2024
@ScientiaFelis ScientiaFelis added this to the sebmsR version 2.0.0 milestone Feb 28, 2024
@ScientiaFelis ScientiaFelis added function A function needs to be fixed prio1 High priority labels Feb 28, 2024
@ScientiaFelis
Copy link
Owner

@larspett hur fungerar den här med filen jag skickade?
Blir det samma error där också?

@larspett
Copy link
Collaborator Author

larspett commented Feb 29, 2024 via email

@ScientiaFelis
Copy link
Owner

@larspett jag såg detta nu så jag la till de andra önskemålen också.

Nu finns alltså Landsdel (Län, Landskap och Kommun), samt source att välja på i sebms_site_maps och sebms_distribution_maps()
I sebms_site_maps() finns också maptype

@ScientiaFelis
Copy link
Owner

@larspett I manage to fix the bug. It was due to there was a mismatch between species name when joining in species uid for the combined species agglomerates.
sebms_trimComparedPlots() now works for them too.

@larspett
Copy link
Collaborator Author

larspett commented Mar 5, 2024

works fine now

@larspett larspett closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working function A function needs to be fixed prio1 High priority
Projects
None yet
Development

No branches or pull requests

2 participants