Cametrics
- Download from Github (http://github.com/ibolmo/cametrics/zipball/master) or
git clone git://github.com/ibolmo/cametrics.git
- Rename
config.py.sample
toconfig.py
and edit the file appropriately - Update
app.yaml
(in particular theapplication
)
- none (no statistics, no type)
- elevation (altitude)
- zipcode
- city
- country
- accuracy
- binary (true|false)
- temperature
- counter
- choice
Sometimes it would be useful to modify statistics to exclude certain statistics. The following are examples of such filters. Concept from Django Template Filters.
type|filters
- off, no statistics
- number|off
All things related to models, objects, or classes and their respected statistics that are auto incremented/decremented/updated. The '*' items are not yet implemented. The '?' items are unverified for appropiateness.
- value
- prev*
- next*
- created_on
- statistics
- first
- last
- timestamp
- datetime
- statistics
- frequency*
- years (bucket)
- months (bucket)
- days (bucket)
- hours (bucket)
- minutes (bucket)
- seconds (bucket)
- weekdays (bucket)
- longitude
- latitude
- elevation?
- statistics
- area*
- centroid*
- speed*
- distance*
- displacement*
- max.longitude
- min.longitude
- max.latitude
- min.latitude
- geotudes
- x
- y
- statistics
- area
- centroid
- boundary
- grids (geotudes)?
- statistics
- min
- max
- mean
- sum
- deviation*
- mode*
- median*
- units (0.1, 1, 10, ...)*
- length?
- start (date)
- stop (date)
- duration (number)
Web hooks can be attached for when an event (for a namespace) occurs. Supports standard HTTP methods and position conditions (pre- and post- execution of the method).
# attach(namespace, callback_uri[, method = post|get|put|delete[, condition = post|pre);
attach(namespace, callback_uri)
# detach([namespace, callback_uri[, method = post|get|put|delete[, condition = post|pre]]);
detach(namespace, callback_uri, 'get', 'post')
detach()
The following map/alias between different type of inputs
- timestamp
->
date - datetime
->
date - int
->
number - integer
->
number - float
->
number - long
->
number - text
->
string - str
->
string - gps
->
location
# measure(namespace[, value = 1[, type = number]]);
measure('execution.start', 1240869175, 'timestamp');
measure('visitor::click');
measure(['participant', guid('ibolmo@gmail.com'), 'join']);
# measure.start|pause|resume|stop(namespace)
Universally Unique Identifier can be useful for namespacing to get a specific measurement for an object that is known to the campaign but is anonymous to the system. For example, I can track a user's data quality without implicating the user in the backend.
Google Charts API is supported by passing all the normal query parameters, as described in the Google Charts API and appending .gc
or .gchart
to the end of your URL.
For example visit:
http://cametrics.appspot.com/agljYW1ldHJpY3NyFQsSDm15YXBwX2NhbXBhaWduGNEPDA/name/space**.gchart?**cht=p3&chs=250x100
You do not need to include the chd
argument since this will be automatically populated by the system.
- Timezone for datetime calculations
- delete Campaign, Storage, and Statistics
- Olmo: Assuming: we have a good breadth of (statistical) processings for different objects, then incr/decr operations may not be necessary
- Olmo: Would be interesting to support abritrary/other actions, though.
- Olmo: Would be interesting to have statistics local to a grouping.
- Sasank: Delete all data for a campaign
- Sasank: Delete all data for a namespace
- Sasank: Query for specific stats, including filtering for withtin a boundary