You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using fancy indexing currently, indexing can break if some of the lookup values are not present. For example, take the following parameter for some e.g. benefit amount defined per US region and number of household members.
Many US parameters are defined like this: a default for a large region, and overrides for specific regions, and current solutions of defining specific mappings for each parameter will lead to a lot of code inelegance. Here's an idea for a feature in Core that could completely solve this: possible index variables.
E.g. if that same parameter had some extra metadata:
metadata:
index:
- state
- region
... then when indexing, a formula could fetch the value for each entity first by attempting to look up the state value, then the region if that fails. I'd be happy to have a go at this if this would be useful/in the spirit of Core features/we could specify it out in a bit more detail. @benjello@MattiSG how does this idea sound, and are there use cases in other countries too?
The text was updated successfully, but these errors were encountered:
I find it elegant, but it definitely seems like a major step away from OpenFisca's current “make everything explicit” mentality. In particular, relying on metadata seems risky since that field has not been normalised yet, and inappropriate since in the given usage it would definitely be data not meta-data 😉
Naming considerations aside, I'm just extremely wary of avoiding to re-introduce inferences-like systems that were painstakingly removed (see #458). In this case, the mechanism would be explicit, so it is probably not at the same level.
Would a default value for list-type parameters work for you? In the example you gave, something like:
It would be very helpful if you could provide us with clearer, real-life examples along with references to the implemented legislation 🙂 we want to document precisely how any OpenFisca feature is immediately useful for modelling existing rules.
When using fancy indexing currently, indexing can break if some of the lookup values are not present. For example, take the following parameter for some e.g. benefit amount defined per US region and number of household members.
Many US parameters are defined like this: a default for a large region, and overrides for specific regions, and current solutions of defining specific mappings for each parameter will lead to a lot of code inelegance. Here's an idea for a feature in Core that could completely solve this: possible index variables.
E.g. if that same parameter had some extra metadata:
... then when indexing, a formula could fetch the value for each entity first by attempting to look up the state value, then the region if that fails. I'd be happy to have a go at this if this would be useful/in the spirit of Core features/we could specify it out in a bit more detail. @benjello @MattiSG how does this idea sound, and are there use cases in other countries too?
The text was updated successfully, but these errors were encountered: