dbca-wa / wastdr

An R Client for the WA Sea Turtles and Strandings Database WAStD
https://dbca-wa.github.io/wastdr/
Other
3 stars 0 forks source link

Map odkc$track_tally to LineTransectEncounter and related TrackTallyObservations #23

Closed florianm closed 4 years ago

florianm commented 4 years ago

Source odkc$track_tally

"id"                                 "observation_start_time"             "reporter"                           "observation_end_time"              
 [5] "system_submission_date"             "system_submitter_id"                "system_submitter_name"              "meta_instance_id"                  
 [9] "overview_location"                  "overview_location_latitude"         "overview_location_longitude"        "overview_location_altitude"        
[13] "overview_fb_evidence"               "overview_gn_evidence"               "overview_hb_evidence"               "overview_lh_evidence"              
[17] "overview_or_evidence"               "overview_unk_evidence"              "overview_predation_evidence"        "overview_training_record"          
[21] "fb_fb_no_old_tracks"                "fb_fb_no_fresh_successful_crawls"   "fb_fb_no_fresh_false_crawls"        "fb_fb_no_fresh_tracks_unsure"      
[25] "fb_fb_no_fresh_tracks_not_assessed" "fb_fb_no_hatched_nests"             "odata_context"                      "tx"                                
[29] "site_id"                            "site_name"                          "area_id"                            "area_name"                  

Combinations of species - nest age - nest type are hard coded in variable names. Dataset only contains observed combinations, non observed combinations may be missing.

For each of

do:

florianm commented 4 years ago

Sending a full record to ODK Central seems to have bricked the export. Can't delete via API (no submission delete endpoint), can't delete via Briefcase (possibly purge online and upload all but broken record). Will attempt deleting in db directly first.

florianm commented 4 years ago

Uploading track-tally obs and tndisttally obs fails with 400. Debug on the wastd side: BatchUpsertViewSet needs to handle Observation models with source/source_id referring to Encounter model.

florianm commented 4 years ago

wastd API fixed now, import works, pending comprehensive QA #21