Giter Club home page Giter Club logo

cohort_me's People

Contributors

gabceb avatar jamesdaniels avatar kareem avatar n8 avatar nathanbertram avatar phlipper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cohort_me's Issues

Not compatible with mongoid

I tried using this with my app that uses Mongoid and got the following error:

>> CohortMe.analyze(activation_class: Hackathon)
NoMethodError: private method `select' called for Hackathon:Class
    from /Users/theycallmeswift/.rvm/gems/ruby-1.9.3-p194/gems/cohort_me-0.0.1/lib/cohort_me.rb:34:in `analyze'
    from (irb):2
    from /Users/theycallmeswift/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.12/lib/rails/commands/console.rb:47:in `start'
    from /Users/theycallmeswift/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.12/lib/rails/commands/console.rb:8:in `start'
    from /Users/theycallmeswift/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.12/lib/rails/commands.rb:41:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

Still working?

Hey Cohort Me Team,

Love the idea of this tool! Curious, is it still working? Or too outdated at this point for a more modern rails app? e.g. rails 5+

Thanks again for this useful idea!

Activations from same user counted multiple times in a cohort

CohortMe.analyze(period: 'months', activation_class: Transfer.unscoped) results in this query

SELECT DISTINCT transfers.user_id, transfers.created_at, cohort_date, FLOOR(extract(epoch from (transfers.created_at - cohort_date))/2592000) as periods_out FROM "transfers" JOIN (SELECT transfers.user_id, MIN(transfers.created_at) as cohort_date FROM "transfers" WHERE (created_at > '2014-04-18 11:31:53.062696') GROUP BY "transfers"."user_id") AS cohorts ON transfers.user_id = cohorts.user_id WHERE (created_at > '2014-04-18 11:31:53.062696')

If I make couple of transfers as a user in a cohort, then the count will increase by the number of transfers (activations) instead of just 1. That is, starting with this [2, 0, 0, 0, 0, 0, 0, 0, 0, 0] and then after multiple transfer by the same user results in [2, 0, 0, 0, 0, 0, 0, 0, 2, 0] instead of [2, 0, 0, 0, 0, 0, 0, 0, 1, 0].

I'm using Rails 4.2.1 and Postgresql 9.4.1. Please advice!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.