{"action":"created","issue":{"url":"https://api.github.com/repos/semio/ddf_utils/issues/40","repository_url":"https://api.github.com/repos/semio/ddf_utils","labels_url":"https://api.github.com/repos/semio/ddf_utils/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/semio/ddf_utils/issues/40/comments","events_url":"https://api.github.com/repos/semio/ddf_utils/issues/40/events","html_url":"https://github.com/semio/ddf_utils/issues/40","id":192157405,"number":40,"title":"Procedure: Add missing concepts","user":{"login":"jheeffer","id":1596071,"avatar_url":"https://avatars.githubusercontent.com/u/1596071?v=3","gravatar_id":"","url":"https://api.github.com/users/jheeffer","html_url":"https://github.com/jheeffer","followers_url":"https://api.github.com/users/jheeffer/followers","following_url":"https://api.github.com/users/jheeffer/following{/other_user}","gists_url":"https://api.github.com/users/jheeffer/gists{/gist_id}","starred_url":"https://api.github.com/users/jheeffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jheeffer/subscriptions","organizations_url":"https://api.github.com/users/jheeffer/orgs","repos_url":"https://api.github.com/users/jheeffer/repos","events_url":"https://api.github.com/users/jheeffer/events{/privacy}","received_events_url":"https://api.github.com/users/jheeffer/received_events","type":"User","site_admin":false},"labels":[{"id":409892936,"url":"https://api.github.com/repos/semio/ddf_utils/labels/recipe","name":"recipe","color":"bfdadc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-29T00:40:26Z","updated_at":"2016-11-30T23:36:29Z","closed_at":null,"body":"Procedure to add missing concepts to a concepts ingredient.\r\n\r\nUse case:\r\nYou create new indicators or properties running operations, aggregates, cumsums etc. These new indicators are not in your dataset yet. They need to be in your concepts table.\r\n\r\n```yaml\r\n   - procedure: add_concepts\r\n     ingredient: concepts_incomplete\r\n     result: concepts_complete\r\n     options:\r\n       source_ingredients: [\"new_indicators\",\"more_new_indicators\"]\r\n```\r\n\r\nTakes all concepts mentioned in `source_ingredients` dataframes.\r\nFor each concept, if it's not in `ingredient`, add a row for the concept to `ingredient` and add concept_type according to values in that concept (numerical: measure, non-numerical: string)."},"comment":{"url":"https://api.github.com/repos/semio/ddf_utils/issues/comments/264031572","html_url":"https://github.com/semio/ddf_utils/issues/40#issuecomment-264031572","issue_url":"https://api.github.com/repos/semio/ddf_utils/issues/40","id":264031572,"user":{"login":"jheeffer","id":1596071,"avatar_url":"https://avatars.githubusercontent.com/u/1596071?v=3","gravatar_id":"","url":"https://api.github.com/users/jheeffer","html_url":"https://github.com/jheeffer","followers_url":"https://api.github.com/users/jheeffer/followers","following_url":"https://api.github.com/users/jheeffer/following{/other_user}","gists_url":"https://api.github.com/users/jheeffer/gists{/gist_id}","starred_url":"https://api.github.com/users/jheeffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jheeffer/subscriptions","organizations_url":"https://api.github.com/users/jheeffer/orgs","repos_url":"https://api.github.com/users/jheeffer/repos","events_url":"https://api.github.com/users/jheeffer/events{/privacy}","received_events_url":"https://api.github.com/users/jheeffer/received_events","type":"User","site_admin":false},"created_at":"2016-11-30T23:36:29Z","updated_at":"2016-11-30T23:36:29Z","body":"Maybe we should change this to `merge_concepts`.\r\n\r\n```yaml\r\n - procedure: merge_concepts\r\n   ingredient: concepts_incomplete || null || absent   # base ingredient: if null or ingredient \r\n                                                       # not given, no base concepts ingredient\r\n   result: concepts_complete\r\n   options:\r\n     source_ingredients: [\"new_indicators\",\"more_new_indicators\"]\r\n     remove_when_not_in_sources: true || false  # default false. if true, concepts not in source_ingredients \r\n```\r\n\r\nOld functionality stays: for each concept in source ingredients, if concept not in base, add it.\r\nNew functionality: if `remove_when_not_in_sources` is true, any concept that was not in sources should not be in result.\r\n\r\nWhen no base-ingredient given or it's null, it is as if it's base-ingredient is empty. So result is simply all concepts in source ingredients.\r\n`remove_when_not_in_sources` probably needs a better name. Maybe other names in this procedure also need to be revised."}}
{"actor":{"display_login":"jheeffer"}}