ScientiaFelis / sebmsR

Swedish Butterflies - tools and apps
GNU Affero General Public License v3.0
2 stars 0 forks source link

Probable mismatch between lists in region and in Sweden #65

Closed larspett closed 4 months ago

larspett commented 4 months ago

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;

ScientiaFelis commented 4 months ago

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

larspett commented 4 months ago

Hej jo det funkar yay 😊 men jag tänkte inte på att man ofta vill ha alla lokaler för ett år, inte bara punkter och slingor.

From: Georg @.> Reply to: ScientiaFelis/sebmsR @.> Date: Wednesday, 28 February 2024 at 17:23 To: ScientiaFelis/sebmsR @.> Cc: Lars Pettersson @.>, Mention @.***> Subject: Re: [ScientiaFelis/sebmsR] Probable mismatch between lists in region and in Sweden (Issue #65)

@larspetthttps://github.com/larspett hur fungerar den här med filen jag skickade? Blir det samma error där också?

— Reply to this email directly, view it on GitHubhttps://github.com/ScientiaFelis/sebmsR/issues/65#issuecomment-1969355326, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEVQXZBNABVRLDTPPMCPCADYV5KW5AVCNFSM6AAAAABDMHLUUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRZGM2TKMZSGY. You are receiving this because you were mentioned.Message ID: @.***>

ScientiaFelis commented 4 months ago

@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 commented 4 months ago

@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 commented 4 months ago

works fine now