Database Reference
In-Depth Information
This app is not intended to track users; it is merely an interesting data
source that enables distributed data collection and can showcase the
streaming ingestion features of BigQuery. For the sake of privacy, location is
reported only at a coarse ZIP code level, and the app gives users the ability
to turn off the collection of individual sensors. The application also enables
you to change the rate at which the sensors are reported; by default, they are
sampled once every 5 minutes.
Chapter 8 shows how to install the app on your own Android devices. The
default settings log to the main BigQuery Sensors app at
http://bigquery-sensors.appspot.com , but you can change it to
point to your own AppEngine instance after you have that up and running.
The app will log, periodically, the coarse-grained location of the user, the
applications the user has running, and the values of various sensors. More
information about the application and the schema of the data collected is in
Chapter 4, in the section entitled “Data Model for End-to-End Application.”
If you're not comfortable running the sensor collection app on your phone,
no worries; you can always copy the sample data from the bigquery-e2e
public project. It still may be useful, however, to browse the source code
that posts the sensor data directly to BigQuery. The code is written in Java
because that is the standard development language for Android apps.
BigQuery Sensors AppEngine App
The main part of the BigQuery Sensors application is the AppEngine data
reporting web app, which demonstrates how BigQuery can be used in a
real-world application. It uses most of the major features of the BigQuery
API, from managing tables to running queries to importing AppEngine
Datastore backups.
The application generates custom charts and reports for a set of BigQuery
tables. You can see a histogram of the number of different ZIP codes users
visited during a day, or track which applications are most popular. Of
course, because this application is not widely deployed, there may not be
great geographic coverage, but there should be enough to whet your appetite
to see how it can apply to your own purposes.
We use GViz and Dygraph to generate the graphs. If you are more
comfortable using another graphing utility, it is relatively easy to adapt the
graphing display to another framework. Our goal is to show off BigQuery,
Search WWH ::




Custom Search