ouhscbbmc / referral-exposure Goto Github PK
View Code? Open in Web Editor NEWCalculating exposure over multiple CPS referrals
License: MIT License
Calculating exposure over multiple CPS referrals
License: MIT License
@DavidBard, I've created a small manifesto over the past two days of how to represent referrals & removals that facilitate our analyses better (and possibly be adopted by other states or CPS agencies).
What are your thoughts on this?
https://github.com/OuhscBbmc/referral-exposure/blob/master/documentation/data-structures.md
@DavidBard, I think this function is ready to discuss, and how it should behave with some of the corner cases, particularly when the exposure is non-continuous.
Here's the testing code that specifies the desired output for the following input. Here's the actual function. Notice that the bottom of the test file looks at each output column separately. This anticipates that we might wander into whackamole territory, and accidentally create problems while fixing others.
ds_kid_referral_input <-
tibble::tribble(
~client_id, ~referral_id, ~referral_date, ~was_removed, ~removal_begin_date, ~was_returned, ~removal_end_date,
1L, 1L, "2014-01-01", FALSE, NA_character_, FALSE, NA_character_,
1L, 1L, "2014-01-01", TRUE, "2014-02-01", TRUE, "2014-04-01",
1L, 2L, "2015-01-01", TRUE, "2015-02-01", TRUE, "2015-06-01",
1L, 3L, "2016-01-01", FALSE, NA_character_, FALSE, NA_character_,
2L, 4L, "2014-01-01", FALSE, NA_character_, FALSE, NA_character_,
2L, 5L, "2014-07-01", TRUE, "2014-08-01", TRUE, "2014-10-01",
2L, 6L, "2015-01-01", TRUE, "2015-03-01", FALSE, NA_character_,
3L, 7L, "2014-01-01", FALSE, NA_character_, FALSE, NA_character_,
3L, 8L, "2015-01-01", FALSE, NA_character_, FALSE, NA_character_,
4L, 9L, "2015-01-01", FALSE, NA_character_, FALSE, NA_character_,
5L, 10L, "2014-08-01", TRUE, "2014-11-01", TRUE, "2014-12-01"
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.