Open Source Smartphone Libraries for Computational Social Science

902 views

Published on

Presented at the 2nd ACM Workshop on Mobile Systems for Computational Social Science. Workshop paper: http://www.cl.cam.ac.uk/~nkl25/publications/papers/lathia_mcss2013.pdf

Published in: Technology, Education
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
902
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
9
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Open Source Smartphone Libraries for Computational Social Science

  1. 1. Open Source Smartphone Libraries for Computational Social Science @neal_lathia, k. rachuri, c. mascolo, g. roussos september 2013
  2. 2. “...each of these transactions leaves digital traces that can be compiled into comprehensive pictures of both individual and group behaviour... “Computational Social Science” Lazer et. al
  3. 3. Accelerometer Microphone Camera GPS Compass Gyroscope Wi-Fi Bluetooth Proximity NFC Light
  4. 4. “... a number of challenges remain in the development of sensor-based applications [...] there is mixed API and operating system (OS) support to access the low-level sensors...” “A Survey of Mobile Phone Sensing,” Lane et. al
  5. 5. ● Battery-friendly sensor data collection ● Triggering notifications ● Data storage & transmission “Reinventing the Wheel” All smartphone-based research needs to begin by engineering solutions for:
  6. 6. if you don't like code, turn away now
  7. 7. ● Current approach: – Requires treating each sensor with different code – Hides battery & energy efficiency requirements ● We have built Android ESSensorManager – Everything is a “sensor” – Simple API with two modes (get, subscribe) – API exposes battery issues to programmer Sensor Data Collection
  8. 8. ● Pull Sensors – Accelerometer, Location, Microphone – Wi-Fi, Bluetooth, Camera – Active apps, SMS/Call Log Content ● Push Sensors – Battery, Connection State – Proximity, Screen – Phone Calls/SMS Events Everything as a 'Sensor'
  9. 9. aim: get data in 2 lines of code.
  10. 10. // get the instance ESSensorManager sm = ESSensorManager.getSensorManager(context) // ask for some data MicrophoneData data = (MicrophoneData) sm.getDatafromSensor( SensorUtils.SENSOR_TYPE_MICROPHONE) Get data, fast
  11. 11. aim: quickly configure sensing & respond to battery
  12. 12. // make a subscription int sid = sm.subscribeToSensorData( SensorUtils.SENSOR_TYPE_MICROPHONE, listener) // deal with data pushed to you class Listener implements SensorDataListener { public void onDataSensed(SensorData d){..} public void onCrossingLowBatteryThreshold(..) {..} } Get data, continuously
  13. 13. ● “I need to ask the user for some interaction...” – Based on time of day, randomly – Based on a sensor event – ESTriggerManager ● “I need the data to come back to me!” – Without using up all of my participant's 3G connection – ESDataManager Problems #2 & #3
  14. 14. ● JSON formatting – Flexible for various sensors – Includes sensing configuration { "zAxis":[9.959879,9.959879,....], "senseStartTime":"17:07:00:281 16 05 2013 -0500 CDT", "sampleLengthMillis":8000, "xAxis":[0.11492168,0.11492168,0.0766144548,...], "yAxis":[0.11492168,0.11492168,0.0766144548,...], "sensorTimeStamps":[1368742020298,1368742020488,....], "sensorType":"Accelerometer" } Data Management
  15. 15. ● Simple on-phone data querying – Only queries local data – “Give me all the accelerometer data from the last hour...” Data Management
  16. 16. ● Configurable Transfer Policy – Do not transfer (local storage only) – Transfer immediately (or fail) – Asynchronous transfer (Wi-Fi & timeout) Data Management
  17. 17. ● Student Project at Birkbeck College, London – Post-graduate students with programming experience – Sample Audio data from the environment – Measure noise pressure/audio features – Post data to COSM (Xively) Preliminary Feedback
  18. 18. ● Why wasn't it used? – Lack of experience; support for emulator ● Using the library – Easy, quick – Substantially less code (~ better quality): focus is on app features, not sensor engineering ● What is missing? – Data filters; inference algos; simulated data Preliminary Feedback
  19. 19. “it is useful for the research community to think about and propose sensing abstractions and APIs ...” “A Survey of Mobile Phone Sensing,” Lane et. al
  20. 20. Open Source Smartphone Libraries for Computational Social Science http://emotionsense.org https://github.com/nlathia/SensorManager https://github.com/nlathia/TriggerManager https://github.com/nlathia/SensorDataManager

×