From b6b2b46ed4c49269c97ce9c249391114f9d53640 Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Thu, 24 Oct 2024 13:46:47 -0500 Subject: [PATCH] Update README.md --- README.md | 40 +++++----------------------------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 927ba64..07e10f2 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,18 @@ [![pullreminders](https://pullreminders.com/badge.svg)](https://pullreminders.com?ref=badge) -# zoo-event-stats -Event stream reader and JSON stats API for Zooniverse wide and project classification and comment counts. +# zoo-event-stats (DEPRECATED STATS SERVICE. ONLY USED TO PUSH DATA TO PUSHER PUBLIC DATA STREAM) + +DEPRECATED STATS SERVICE. Replaced with ERAS: https://github.com/zooniverse/eras. This service is only used to push data to Pusher public data stream. #### Stream Reader This service contains a Kinesis stream reader for the internal Zooniverse data stream. Each record on the input stream is processed if it's a talk comment or classification event. -Processing invovles tranforming the incoming data and -pushing data into both the Elastic Search data store and to the Pusher public data stream (public data only). +Processing involves tranforming the incoming data and +pushing data into the Pusher public data stream (public data only). See [KCLReader](./lib/input/kcl_reader.rb) and [start_stream](./bin/start_stream) for more details. -#### API -The stats service has a json API to query the event counts for projects - -##### `GET /counts/$event_type/$period?user_id=1&project_id=1` -Get the counts of events that match the event type over the period. - -Valid `$event_type` values are `classification` and `comment`. - -Valid `$period` values are `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`. -More details at [Value ES period values](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-datehistogram-aggregation.html#_calendar_intervals) - -Valid `?user_id` values are integers, e.g. `1` - -Valid `?project_id` values are integers or a comma seperated list, e.g. `1` or `1,2,3` - -This end points returns json data in the format below where the each period will return an object in the buckets list. -``` -{ - "events_over_time": { - "buckets": [ - { - "key_as_string": "2016-06-13T00:00:00.000Z", - "key":1465776000000, - "doc_count":25 - } - ] - } -} -``` #### Getting Started @@ -62,8 +34,6 @@ Once all the above steps complete you will have a working copy of the checked ou * Run: `docker-compose run --rm --service-ports api /bin/bash` * Then in the container run: `bundle exec rake test` -0. Seed some data into elastic search - * Then in the container run: `bundle exec rake seed_es_dev_data` Note: To update Gems from the api container you'll need to run `bundle install --with stream`. This is due to the way the stream & api docker images differ with how their gems are installed via groups. See `bundle config` in the container for details of what groups are installed.