-
EarthOutreach
GettingStartedwithMobileDataCollectionusingODKMoreandmoreorganizationsareusingmobiledevicestocollectdatainthefield.OpenDataKit(ODK)isasuiteoftoolsthatallowsdatacollectionusingAndroidmobiledevicesanddatasubmissiontoanonlineserver,evenwithoutanInternetconnectionormobilecarrierserviceatthetimeofdatacollection.StreamlinethedatacollectionprocesswithODKCollectbyreplacingtraditionalpaperformswithelectronicformsthatallowtext,numericdata,GPS,photo,video,barcodes,andaudiouploadstoanonlineserver.YoucanhostyourdataonlineusingGoogle'spowerfulhostingplatform,AppEngine,manageyourdatausingODKAggregateandvisualizeyourdataasamapusingGoogleFusionTablesandGoogleEarth.
CreatedbydevelopersattheUniversityofWashington'sComputerScienceandEngineeringdepartmentandmembersofChange,OpenDataKitisanopensourceprojectavailabletoall.PleasevisittheirODKprojectpageonGoogle'scodesiteformoreinformationfordevelopers,recentupdates,moretutorials,andtocontributetotheproject.
ThisimageshowsdatacollectedremotelyusingOpenDataKitanddisplayedinFusionTables.
-
TutorialContents:
PrerequisitesLet'sGetStarted!CreateFormsusingODKBuildCreateanAppEngineInstanceRestrictingPermissionstoAppEngineIntancesforincreasedSecurityUploadingFormstoyourAppEngineInstanceDiscussion&FeedbackWhat'sNext?
Prerequisites
Noprogrammingskillsneeded!YouneedawebenabledmobiledevicerunningAndroidOS1.6ornewer.YouwillneedaGoogleAccounttocreateaGoogleAppEngineinstance.(Getonehere.)YouwillneedJava6installedandrunningonyourcomputerforODKAggregate(downloaditherefree).
Let'sGetStarted!
1.Searchforthe"ODKCollect"appfromGooglePlayonyourmobiledevice,orfromGooglePlayinyourbrowser.Installthelatestversiontoyourmobiledevice.FormoreinformationaboutODKCollectanditsrequirements,visittheODKProjectPage.
2.DownloadtheSampleformtouseduringthistutorial.
CreateODKFormsusingODKBuild
-
ThereareseveralwaysyoucancreateformsforODK.YoucanuseODKBuild,XLSforms,andbycreatingXMLforms.Ifyou'recreatingaformforthefirsttime,ODKBuildmaybethesimplestwaytostart,andthistutorialwillcoverusingODKBuild.Forcreatingmorecomplexforms,takealookatthedocumentationprovidedonXLSforms'FormhubUniversity.
1. GotoODKBuildathttp://build.opendatakit.org2.
Createanewaccountorloginwithanexistingaccount.Notethatthisaccountis
differentfromyourGoogleAccount,andyoucanchoosetouseadifferentloginandpassword.Yourformswillbesavedtothisaccountforfuturereference.
3.
Addquestionstoyourformbyclickingonthetypeofquestionyou'dliketoadd(eg.location,text,etc.)atthebottomofthepage.
Eachquestionhasseveralcommonpropertiesaswellasuniqueproperties.ForanexplanationoftheCommonProperties,seebelow.Youdonotneedtosaveeachquestionasyougo,butremembertosavetheformwhenyou'resatisfiedwithit.
4.
EnteraTextquestion,suchas"Whatisyourname?",intheCaptionTextsection.Fillinthepropertiesofthetextfieldquestionontherighthandside.Optional:youcanenteraminimumand/ormaximumcharacterlengthforthetextfield.
5.
EnteraNumericfieldtoallowuserstorecordanumberintheirform,suchas"Whatisyourage?"intheCaptionTextsection.Inthepropertiessection,specifywhetheryou'dliketorecordthenumberasanInteger(wholenumber)orDecimal(0.0)
6.
AllowtheformuserstospecifyaDate.Thephonewillautomaticallyrecordthecurrent
-
date,andallowtheusertoenterthedateormodifythedateinyourform.7.
IftheusersofyourformhaveamobiledevicethatisequippedwithaGPSchipset,you
canaddaLocationentryintoyourform.ThequestionwillprompttheusertorecordtheGPSlocation.Theuserwillbeabletoviewanestimateofthephone'sbuiltinGPSaccuracywhilethephone'sGPSacquiressatellitepositions.
8.
Allowusersofyourformtoattachmediafilestotheirformsubmissions.YoucanselectfromImage,AudioorVideoasmediaformat.Theformwillswitchtothedevice'scameramode,voicememomodeorvideocameramode,andthemediawillbestoredwiththatformentry.Forthisexample,enter"Takeaphoto"intheCaptionTextsectionandselect"Image"astheKindofmediayouwillusefromthedropdownmenu.Hint:ifyouknowyou'regoingtohaveaslowinternetconnectionwhenyouwanttouploadyourformsubmissions,andyouwishtohavephotosinsideyourforms,somedevicesallowyoutoreducethedefaultimagesizesothefilesizeissmallerwhenyouwanttosendyourcompleteddataovertheinternet.
9.
Usethe"ChooseOne"questiontypeifyou'dliketheusertoselectoneoptionfromseveraloptions.Youcanspecifywhichoptionsyoupresentbyclicking"AddOption."MakesureyouaddanunderlyingvaluetoyourOptionsthisisrequiredforeachOption.Uselowercasetextandunderscores(_)insteadofspaces.
10.
Usethe"ChooseMultiple"questiontypeformultiplechoicequestions.AswithChooseOne,makesuretoaddanunderlyingvaluetoeachOptionanduselowercaseandunderscoresfortheunderlyingvaluefields.
CommonPropertiesinFormQuestions
Dataname(required):Thisisthevariablenamethatisstoredinthexmlofyourform.Youmustuselowercaseandunderscores(_)insteadofspaces.
CaptionText(required):Enteryourquestionasyou'dlikeitpresentedtotheuser.
Hint:Specifyaquestion'shintorhelptext.Note:Ifyouarelocalizingyourform,youmustenterEnglishtexthereaswellaslocalizedtext.IfyoudonotwanttoenterEnglishdefaulttext,youmustcreatetheformsasxmlinatexteditor.Seethetipattheendofthistutorialformoreinformationaboutlocalizingforms.
Defaultvalue:thisisthedefaultinformationthatwillbepresentedtotheuser.Forexample,ifyouaregatheringinformationonagroupofchildrenandyouknowthemajorityofthechildrens'ageis12,youcanenter"12"asadefaultvalue.
-
Readonly:Ifyoudon'twanttheusertobeabletoenterinformationforthisquestion,checkthisbox.
Required:Userswillnotbeabletosaveaformascompletedunlesstheyhaveenteredinformationforquestionsthatarechecked"required."
11.
Onceyou'resatisfiedwithyourform,saveittoyourODKBuildaccount.GotoFile>SaveFormAs.Nexttimeyoulogintoyouraccount,youcanselectFile>Opentoopentheform.
12.
Todownloadtheformtoyourcomputer,selectFile>ExportasXML.Youwillseexmlcode.Clickthe"Download"buttontosavethefiletoyourcomputerasan.xmlfile.Thisistheformatthatyouwillimportontoyourmobiledeviceinthenextstep.
Tip:OneoftheadvantagesofODKisthatyoucancreatelocalizedforms.ThefunctionalitytocreatelocalizedformsinODKBuilddoesn'texistyet,butyoucanlookatthesesampleforms(andtheWidgetsforminparticular)asguidestocreatingyourownXMLformsthatarelocalized.
Branchingquestionswherethesecondfollowupquestionisdependentupontheanswertothefirstquestion,mustalsobewritteninXML.NotethatdisplayingdatafrombranchingquestionsismoredifficultinFusionTablesandGoogleEarth.
-
Ifyou'dliketolearnmoreaboutcreatingyourownformsusingxml,viewthejavarosaxformstrainingguide.
CreateanAppEngineInstance
GoogleAppEngineallowseasyhostingofyourapplications,andyourapplications'data,onanonlineserver.LearnmoreaboutAppEngineandreadthetermsofservice.
Forthistutorial,youwillsetupyourownserverusingAppEngineinfrastructureandODKAggregate.ODKAggregateallowsyoutosetupareadytodeployserverwhereyoucanuploadyourformsubmissions,exportthemas.csvfilesandsendthemontootherserviceslikeFusionTables.
1.
First,you'llneedtosetupaGoogleAppEngineaccount.IfthisisyourfirsttimeusingAppEngine,Googlewillsendyouatextmessagetoconfirmyouridentity,sohaveatextenabledphoneready.Note:AgivenmobilenumbercanonlybeusedonceforcreatinganAppEngineinstance.
2.
Onceyou'veconfirmedyourmobilenumberandloggedin,click"CreateanApplication."
3.
Giveyourapplicationan"ApplicationIdentifier."ThiswillbecomepartoftheURLforyourAppEngineinstance,e.g."myurl.appspot.com."(Ifyouwouldliketorestrictthepermissionsforwhocanaccessyourdata,readtheSecuritysectionbelow.YoucanedittheSecuritysettingsinthisstep.)
Forthistutorial,wewillusethedefault"OpentoallGoogleAccountUsers."Onceyou'veenteredanidentifier,youwillreceiveconfirmationthatyourapplicationhasregisteredsuccessfully.
-
4.
DownloadthelatestversionofODKAggregatefromtheODKDownloadspage.5.
Unzipit(singleclickthefileinyourDownloadsfolderonaMacorRightclickandunzip
itonaPC).Thefilewillunzipasafoldercalled"ODKAggregateversionOSinstaller."6.
Doubleclicktoruntheapplication.YouwillentertheODKAggregateSetupWizard.
Click"Next."7.
YouwillbepromptedtoagreetoODKAggregate'sLicenseAgreement.Then,select
thelocationonyourcomputerwhereyouwanttheinstallerfilestostorethesoftwarethatwillrunonGoogleAppEngine.
8.
RuntheSetupWizard.EntertheODKinstancename(e.g."odktutorial"forodktutorial.appspot.com)andtheGoogleaccountassociatedwiththatinstance.
9.
OncetheSetupWizardfinishesconfiguringODKAggregate,you'llbepromptedtoruntheinstallationscript.
10.
You'llbepromptedtoentertheGoogleAccountandpasswordassociatedwiththeAppEngineinstanceagain.
11.
Wait310minutesforthescripttorun.Onceit'sfinished,you'llgeta"Success"message.IfyoumadeamistakeenteringtheinformationintheSetupWizard,you'llfindoutinthisstage.YoucanreruntheSetupWizardbygoingbacktothefolderwhereyouinstalledODKAggregateanddoubleclicktheinstallertorunitagain.
12.
Congratulations!Whenthescriptisfinishedrunning,ODKAggregateisnowinstalledonyourAppEngineinstance.Whenit'sfinishedrunning,confirmthatit'ssetupcorrectlybyvisitingyourAppEngineurl(e.g.myurl.appspot.com).YoucansigninwithyourGoogleAccountorclick"AnonymousAccess"togetin.
RestrictingPermissionstoODKAggregateforIncreasedSecurity
SinceODKAggregate1.0.nwasreleased,usersnowhaveoptionsforsettingaccesspermissionstotheirODKAggregateinstancesthroughtheSiteAdmininterface.Now,youcandecidewhohasaccesstosubmitdatacollectedinthefield,whocanviewthesubmitteddata,whocaneditdataandpublishexternally.Wewillcoverthisinmoredetailinthenext
-
tutorialcalled"ManageyourDatawithODKAggregate."Alternately,youcansetrestrictionsviayourAppEngineinstance,butit'smoredifficultthanusingODKAggregatetosetaccesspermissions.LearnmoreaboutauthenticationforAppEngine.
UploadingyourFormstoyourAppEngineInstance
Nowthatyou'vesetupyourAppEngineinstancewithODKAggregate,youcanuploadyourformsthelaststepbeforeyoustartcollectingdataoutinthefieldwithyourforms!We'llwalkthroughthethreemaintabsoftheODKAggregateinterface:Submissions,FormManagementandSiteAdmininthenexttutorialcalled"ManageyourDatawithODKAggregate."YoucanuploadXMLyoudownloadedfromODKBuild.ODKBuildalsoletsyousendformsdirectlytoyourODKAggregateinstance,withouthavingtodownloadtheactualXMLfile.
1.
GotoyourAppEngineinstance(orviewthesampleonewecreatedathttp://odktutorial.appspot.com,butuseyourowninstancetouploadyourcustomformsto).
2. LoginwithyourGoogleAccountifprompted.3.
Clickonthe"FormManagement"tab.
-
4.
Choosetheformthatyouwishtouploadtoyourinstanceandhit"Upload."Ifyouhavemediafilesthatarepartofyourforms,forexampleforimagesinsidequestions,youcanalsouploadthemhere.
5.
Ifyourformhasuploadedsuccessfully,youcancloseouttheUploadFormswindow.Youwillnowseeyourformsinthe"FormManagement"tab,readytoacceptsubmissions.
Discussion&Feedback
Havequestionsaboutthistutorial?Wanttogiveussomefeedback?VisittheGoogleEarthOutreachDiscussionGrouptodiscussitwithothers.
What'sNext?
Gotonexttutorial:MobileDataCollectionUsingODKCollectSeevideotutorialpage.Seealltutorials.