Closed florianm closed 4 years ago
Manually import the 20-odd loggerenc from ODKA downloads.
import os; path = os.path.join(settings.MEDIA_ROOT, "odka")
from wastd.observations.utils import *
save_all_odka(path=path)
Search all "Track or Treat" ( = TurtleNestEncounter, TNE) submissions for logger_details
.
Example submission:
{
"submission": {
"@xmlns": "http://opendatakit.org/submissions",
"@xmlns:orx": "http://openrosa.org/xforms",
"data": {
"data": {
"@id": "build_Track-or-Treat-0-51_1517196378",
"@instanceID": "uuid:5717cb2e-569a-412f-9be1-7e46e2180cc5",
"@submissionDate": "2018-01-31T11:32:53.850Z",
"@isComplete": "true",
"@markedAsCompleteDate": "2018-01-31T11:32:53.850Z",
"orx:meta": {
"orx:instanceID": "uuid:5717cb2e-569a-412f-9be1-7e46e2180cc5"
},
"observation_start_time": "2018-01-30T22:50:50.701Z",
"reporter": "Karratha5",
"device_id": "15206a105ccfb2db",
"details": {
"nest_age": "old",
"species": "natator-depressus",
"nest_type": "hatched-nest",
"observed_at": "-20.4658400000 117.0753833000 15.8000000000 4.7000000000"
},
"track_photos":...,
"nest_photos": ...,
"nest": {
"habitat": "beach-above-high-water",
"disturbance": "absent",
"nest_tagged": "yes",
"logger_found": "yes",
"eggs_counted": "yes",
"hatchlings_measured": "no",
"fan_angles_measured": "no"
},
"egg_count": ...
"nest_tag": {
"status": "resighted",
"flipper_tag_id": "WA88343",
"date_nest_laid": "2017-12-03",
"tag_label": null,
"tag_comments": null,
"photo_tag": null
},
"logger_details": {
"logger_id": "763",
"photo_logger": "1517353298662.jpg"
},
"fan_angles": ...,
"hatchling_emergence_time_group": ...,
"emergence_climate": ...,
"other_light_sources":...,
"observation_end_time": "2018-01-30T23:01:44.317Z"
}
},
"mediaFile": {
"filename": "1517353298662.jpg",
"hash": "md5:528fac01397c1070710b212de716251f",
"downloadUrl": "https://dpaw-data.appspot.com/view/binaryData?blobKey=build_Track-or-Treat-0-51_1517196378%5B%40version%3Dnull+and+%40uiVersion%3Dnull%5D%2Fdata%5B%40key%3Duuid%3A5717cb2e-569a-412f-9be1-7e46e2180cc5%5D%2Flogger_details%5B%40ordinal%3D1%5D%2Fphoto_logger%5B%40ordinal%3D1%5D&as_attachment=true"
}
}
},
20216759 20216761 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/12387 20216762 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/12473
20216759 20216761 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/12387 20216761 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/143381
20216762 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/143371 20216765 20216766 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/12403 20216766 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/144060
Other loggers: 20216445 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/12395 20216763 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/12385 20216767 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/12451 20216770 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/12393 20216772 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/144067
20216773 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/12406 20216773 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/144071
20216774 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/12449 20216774 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/144058
20216776 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/12420 20216776 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/144062 20216778 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/12409 20216778 https://wastd.dbca.wa.gov.au/admin/observations/turtlenestencounter/144056
26 loggers from other sites are still to backfill. Closing this issue.
Problem
The data import for early form versions did load loggers, the newer versions (36-54) did not. The current ETL pipeline does. Easiest to search raw submissions and backfill loggers.