-
Notifications
You must be signed in to change notification settings - Fork 1
Add UK microsim guidance #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Summary
Thanks for this comprehensive guide! I found a few critical issues that should be fixed before merging:
Critical Issues:
- Line 3: Typo - double space in "PolicyEngine UK ONLY"
- Line 454: Incorrect parameter -
map_to="person"when age is already person-level - Line 774: Formatting - missing newline before section header
I'll add inline comments on these specific lines.
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 3: Typo - there's a double space between "PolicyEngine" and "UK". Should be:
Guide for implementing policy reforms and microsimulation analysis in PolicyEngine UK ONLY projects.
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 454: Incorrect parameter usage. The code has:
age = sim.calculate("age", map_to="person")Since age is already a person-level variable, you don't need map_to="person". This line should either be:
age = sim.calculate("age") # Already person-levelOr if you're trying to aggregate to household level, it should be:
age = sim.calculate("age", map_to="household")
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 774: Formatting issue - missing newline before section header. There should be a blank line between the closing of the previous code block and the "### Conditional reform application" header.
Current:
sim.tax_benefit_system.process_parameters()
Conditional reform application
Should be:
sim.tax_benefit_system.process_parameters()
Conditional reform application
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Note: There are several incomplete code examples that should be filled in:
- Line 328:
# Use the values...leaves the example incomplete - Line 352:
# Apply logic based on working_count...is truncated - Line 796:
# ... complex logic hereshould show actual implementation
These placeholder comments should either be completed with actual code or removed if they're meant to be filled in by the user.
No description provided.