policyengine / policyengine Goto Github PK
View Code? Open in Web Editor NEWSource code for PolicyEngine
Home Page: https://policyengine.org
License: GNU Affero General Public License v3.0
Source code for PolicyEngine
Home Page: https://policyengine.org
License: GNU Affero General Public License v3.0
The official icons are at https://www.facebook.com/brand/resources/facebookapp/logo
For minor reforms, this can look weird with 0% 0% 1% 1%
kind of thing, but for most it'll look cleaner without the decimal.
The URL currently includes only policy parameters, to avoid users accidentally revealing their income and other household information. We should also provide a way for users to share the scenario including their household information (with clear disclaimers about it including income).
e.g. from this:
This has colors flipped, doesn't use rdbl
, and labels as if it's a household.
That chart gets created here:
policyengine/policyengine/countries/country.py
Lines 104 to 106 in 389dae3
Which calls population_waterfall_chart
here:
And waterfall_chart
has different logic for formatting the waterfall chart depending on:
policyengine/policyengine/utils/charts.py
Line 206 in 30b7255
The simplest explanation would be if isinstance(baseline, Microsimulation)
no longer holds, but it still looks like that would be the case:
policyengine/policyengine/countries/country.py
Lines 33 to 36 in 389dae3
Our current Donate link in the footer goes to https://opencollective.com/psl. This creates two problems:
We should create a Donate page that describes the options for donors and suggests that they email us or PSL to direct the donation. PSL-F will likely do this soon, though I think we should mirror the information on PolicyEngine for a consistent user experience.
@jdebacker is it OK for us to put the PSL-F bank info on the site? Anything else you'd suggest here?
For parallelism with the organization-level parameters like the UBI Center logo
Currently the text in Your Plan
describing a parameter's change (light gray text) is specified from a template provided in openfisca. This requires extra work, creates redundant text, and produces inconsistencies:
Here's an example of the summary:
https://github.com/PolicyEngine/openfisca-uk/blob/192cea3c0c38c27cdb6ad574ae25b9f5943143fc/openfisca_uk/parameters/benefit/universal_credit/means_test/work_allowance.yaml#L19
I think this can instead be Change to @
for all. If we need to vary it by parameter type (I don't think we do), we can have logic based on metadata.policyengine.type
.
It'd be cool for the policy cart + buttons to be frozen on the right side, so as you scroll through the charts it remains visible.
This is a significant rewrite, consolidating the PolicyEngine-UK and -US repos into one package, PolicyEngine (containing both PolicyEngine (python server) and policyengine-client (React app). The advantages include:
I haven't seen other policy organizations include this, risks looking juvenile
Per user feedback
http://policyengine.org/uk/household-impact?abolish_CB=1 shows no difference between baseline and reform when the household has a child.
Avoid 0% 0% 1% 1%
but don't introduce decimals unnecessarily. See also #76.
Splitting off from #14:
For example, this is how Compute Studio presents inputs, see this from Tax-Cruncher:
(base) mghenis@penguin:~/PolicyEngine/policyengine$ make debug-client
cd policyengine-client; npm start
> [email protected] start
> react-scripts start
sh: 1: react-scripts: not found
make: *** [Makefile:19: debug-client] Error 127
Since they're centered, they look like section breaks that would contain multiple parameters, and then the description seems more like the variable name. I think left-aligning would be more consistent with the theme and easier to read.
Similarly, the household variables could be left-aligned, but the descriptions don't seem necessary.
They currently differ between the header, the form, and the graphs
e.g. Raise from 25% to 30%
or Lower from £12,570 to £4,000
See #78
Cap at 100? Add an open circle?
http://policyengine.org/uk/household?abolish_UC_child=1
Net income doesn't change. Changing the adult age fixes it. Bug with no working-age adults by default.
Here's an example from the policy page, but the same issue shows up on the household definition page.
Might get crowded so we can shrink Share your feedback
to Feedback
e.g. at http://policyengine.org/uk/population-impact?basic_rate=23 it tweets
I just simulated a reform to the UK tax and benefit system with @ThePolicyEngine. Check it out or make your own! https://uk.policyengine.org/uk/population-impact?basic_rate=23
https://uk.policyengine.org/uk/population-impact?basic_rate=23 doesn't work
Simulate on the population
-> See UK impact
Skip to your household
-> Describe your household
See your results
-> See household impact
Change the policy reform
-> Adjust the policy
e.g. https://github.com/PolicyEngine/policyengine/runs/4012526696?check_suite_focus=true#step:5:452 says
WARNING: You are using pip version 21.3; however, version 21.3.1 is available.
You should consider upgrading via the '/opt/hostedtoolcache/Python/3.7.12/x64/bin/python -m pip install --upgrade pip' command.
This traces to https://github.com/actions/virtual-environments, e.g. actions/runner-images#3285. It isn't affecting anything so just logging to keep track.
Not exactly sure how to do this, but not having this type of test has caused a fair few issues recently. Essentially, we want to have a GH action briefly host the built site "locally", and test all the API endpoints and client pages.
Something like plcyn.gn
? Won't need for a while so just jotting down for now.
e.g. going from http://policyengine.org/uk/household-impact?basic_rate=30, the Change your household
button goes to http://policyengine.org/uk/undefined/household?basic_rate=30
See also the gif in #50 (comment)
e.g. Sam's slides
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.