Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
leximpact-socio-fiscal-ui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leximpact
Simulateur socio-fiscal
leximpact-socio-fiscal-ui
Commits
290d6f2f
Commit
290d6f2f
authored
Jan 2, 2023
by
Emmanuel Raviart
Browse files
Options
Downloads
Patches
Plain Diff
Fix quantiles rates. Homogeneize Ir & Csg views
parent
91b4fb69
No related branches found
No related tags found
No related merge requests found
Pipeline
#7616
passed
Jan 2, 2023
Stage: build
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lib/components/CsgBudgetView.svelte
+33
-22
33 additions, 22 deletions
src/lib/components/CsgBudgetView.svelte
src/lib/components/IrBudgetView.svelte
+20
-24
20 additions, 24 deletions
src/lib/components/IrBudgetView.svelte
with
53 additions
and
46 deletions
src/lib/components/CsgBudgetView.svelte
+
33
−
22
View file @
290d6f2f
...
...
@@ -54,12 +54,12 @@
$
:
({
quantiles
:
lawQuantiles
,
state_budget
:
lawStateBudget
}
=
law
)
$
:
use
Amendment
=
$
:
show
Amendment
=
amendment
!==
undefined
&&
Boolean
(
amendmentQuantiles
?.
length
)
$
:
showBill
=
bill
!==
undefined
&&
Boolean
(
billQuantiles
?.
length
)
$
:
calculationsCount
=
1
+
(
showBill
?
1
:
0
)
+
(
use
Amendment
?
1
:
0
)
$
:
calculationsCount
=
1
+
(
showBill
?
1
:
0
)
+
(
show
Amendment
?
1
:
0
)
$
:
amendmentQuantile
=
amendmentQuantiles
?.[
quantileIndex
]
...
...
@@ -74,7 +74,7 @@
if
(
showBill
)
{
quantileByCalculationName
.
bill
=
billQuantiles
[
index
]
}
if
(
use
Amendment
)
{
if
(
show
Amendment
)
{
quantileByCalculationName
.
amendment
=
amendmentQuantiles
[
index
]
}
return
quantileByCalculationName
...
...
@@ -230,7 +230,7 @@
legend
unitName=
"currency-EUR"
valueByCalculationName=
{
{
amendment
:
use
Amendment
amendment
:
show
Amendment
?
-
amendmentStateBudget
.
csg_deductible_salaire
-
amendmentStateBudget
.
csg_imposable_salaire
:
undefined
,
...
...
@@ -278,7 +278,7 @@
/>
CSG PLFSS
</div>
{
/if
}
{
#if
use
Amendment
}
{
#if
show
Amendment
}
<div
class=
"flex items-center"
>
<iconify-icon
class=
"ml-1 text-le-jaune"
...
...
@@ -303,7 +303,8 @@
référence.
</span>
</Popover>
<div
class=
"mt-6 h-64 overflow-hidden"
>
<div
class=
"mt-4 h-64 overflow-hidden"
>
<LayerCake
data=
{
quantileByCalculationNameArray
}
let:width
...
...
@@ -342,7 +343,7 @@
y=
{
yFromQuantile
(
bill
)
}
/>
{
/if
}
{
#if
use
Amendment
}
{
#if
show
Amendment
}
<Column
fill=
"#ded500"
on:click=
{
()
=>
changeQuantileIndex
(
index
)
}
...
...
@@ -355,17 +356,21 @@
{
/if
}
{
/each
}
</Html>
<Svg
pointerEvents=
{
false
}
>
<AxisY
formatTick=
{
(
value
)
=>
euroAmountCompactFormatter
.
format
(
value
)
}
/>
</Svg>
<Html
pointerEvents=
{
false
}
>
<div
class=
"h-12 bg-gradient-to-b from-white"
/>
</Html>
<Html
pointerEvents=
{
false
}
>
<div
class=
"fond h-6"
/>
</Html>
<Html
pointerEvents=
{
false
}
>
<div
class=
"flex justify-end"
>
<button
...
...
@@ -398,6 +403,7 @@
</div>
</div>
<!--Onglets-->
<div
class=
"mx-4 grid grid-cols-10 justify-between justify-items-stretch"
>
{
#each
lawQuantiles
as
{
},
index
}
<button
on:click=
{
()
=>
changeQuantileIndex
(
index
)
}
>
...
...
@@ -421,12 +427,12 @@
<div
class=
"p-4"
>
<div
class=
"flex items-start justify-between gap-2"
>
<div
class=
"w-1/5"
>
<h4
class=
"
mb-2
text-lg font-bold text-le-bleu"
>
<h4
class=
"text-lg font-bold text-le-bleu"
>
{
formatLongOrdinal
(
quantileIndex
+
1
)
}
décile
</h4>
</div>
<div
class=
"w-4/5"
>
<p
class=
"text-sm leading-5 text-gray-600"
>
<p
class=
"
mt-1
text-sm leading-5 text-gray-600"
>
Les 10% des foyers fiscaux situés dans le
{
formatLongOrdinal
(
quantileIndex
+
1
,
)
}
décile, ont un revenu fiscal de référence situé entre
...
...
@@ -441,8 +447,10 @@
</div>
<div
class=
"mt-4 flex justify-between gap-6"
>
<div
class=
"flex w-1/2 items-start"
>
<div
class=
"w-1/3 sm:w-1/6 md:w-1/3 xl:w-1/6"
>
<PictoBudgetDecileIr
/>
<div>
</div>
<div
class=
"w-2/3 sm:w-5/6 md:w-2/3 xl:w-5/6"
>
<p
class=
"text-base leading-5"
>
Ce décile contribue pour
<span
class=
"text-xl font-bold"
...
...
@@ -451,7 +459,7 @@
inline
unitName=
"currency-EUR"
valueByCalculationName=
{
{
amendment
:
use
Amendment
amendment
:
show
Amendment
?
yFromQuantile
(
amendmentQuantile
)
:
undefined
,
bill
:
showBill
?
yFromQuantile
(
billQuantile
)
:
undefined
,
...
...
@@ -466,7 +474,7 @@
inline
unitName=
"/1"
valueByCalculationName=
{
{
amendment
:
use
Amendment
amendment
:
show
Amendment
?
-
yFromQuantile
(
amendmentQuantile
)
/
(
amendmentStateBudget
.
csg_deductible_salaire
+
amendmentStateBudget
.
csg_imposable_salaire
)
...
...
@@ -487,8 +495,10 @@
</div>
</div>
<div
class=
"flex w-1/2 items-start"
>
<div
class=
"w-1/3 sm:w-1/6 md:w-1/3 xl:w-1/6"
>
<PictoBudgetDecileIrFoyer
/>
<div>
</div>
<div
class=
"w-2/3 sm:w-5/6 md:w-2/3 xl:w-5/6"
>
<p
class=
"text-base leading-5"
>
En moyenne, un foyer est prélevé de
<span
class=
"text-xl font-bold"
...
...
@@ -496,7 +506,7 @@
inline
unitName=
"currency-EUR"
valueByCalculationName=
{
{
amendment
:
use
Amendment
amendment
:
show
Amendment
?
-
amendmentQuantile
.
csg_deductible_salaire_mean
-
amendmentQuantile
.
csg_imposable_salaire_mean
:
undefined
,
...
...
@@ -517,20 +527,20 @@
inline
unitName=
"/1"
valueByCalculationName=
{
{
amendment
:
use
Amendment
amendment
:
show
Amendment
?
(
-
amendmentQuantile
.
csg_deductible_salaire_mean
-
amendmentQuantile
.
csg_imposable_salaire_mean
)
/
amendment
StateBudget
.
rfr
amendment
Quantile
.
rfr_mean
:
undefined
,
bill
:
showBill
?
(
-
billQuantile
.
csg_deductible_salaire_mean
-
billQuantile
.
csg_imposable_salaire_mean
)
/
bill
StateBudget
.
rfr
bill
Quantile
.
rfr_mean
:
undefined
,
law
:
(
-
lawQuantile
.
csg_deductible_salaire_mean
-
lawQuantile
.
csg_imposable_salaire_mean
)
/
law
StateBudget
.
rfr
,
law
Quantile
.
rfr_mean
,
}
}
/></span
>
du RFR moyen des foyers du décile.
...
...
@@ -540,6 +550,7 @@
</div>
</div>
</div>
<div
class=
"px-4 py-2"
>
<p
class=
"text-right text-xs font-bold text-gray-600"
>
Données sources
:
...
...
This diff is collapsed.
Click to expand it.
src/lib/components/IrBudgetView.svelte
+
20
−
24
View file @
290d6f2f
...
...
@@ -54,12 +54,12 @@
$
:
({
quantiles
:
lawQuantiles
,
state_budget
:
lawStateBudget
}
=
law
)
$
:
use
Amendment
=
$
:
show
Amendment
=
amendment
!==
undefined
&&
Boolean
(
amendmentQuantiles
?.
length
)
$
:
showBill
=
bill
!==
undefined
&&
Boolean
(
billQuantiles
?.
length
)
$
:
calculationsCount
=
1
+
(
showBill
?
1
:
0
)
+
(
use
Amendment
?
1
:
0
)
$
:
calculationsCount
=
1
+
(
showBill
?
1
:
0
)
+
(
show
Amendment
?
1
:
0
)
$
:
amendmentQuantile
=
amendmentQuantiles
?.[
quantileIndex
]
...
...
@@ -74,7 +74,7 @@
if
(
showBill
)
{
quantileByCalculationName
.
bill
=
billQuantiles
[
index
]
}
if
(
use
Amendment
)
{
if
(
show
Amendment
)
{
quantileByCalculationName
.
amendment
=
amendmentQuantiles
[
index
]
}
return
quantileByCalculationName
...
...
@@ -230,19 +230,17 @@
legend
unitName=
"currency-EUR"
valueByCalculationName=
{
{
amendment
:
use
Amendment
?
-
amendmentStateBudget
.
irpp
:
undefined
,
amendment
:
show
Amendment
?
-
amendmentStateBudget
.
irpp
:
undefined
,
bill
:
showBill
?
-
billStateBudget
.
irpp
:
undefined
,
law
:
-
lawStateBudget
.
irpp
,
}
}
/>
</div>
<div
class=
"mt-10 flex flex-col items-center justify-between sm:flex-row"
>
<h4>
<span
class=
"text-lg text-gray-700"
>
<h4
class=
"text-lg text-gray-700"
>
Recettes par
<span
class=
"underline decoration-dotted hover:text-black"
id=
"infos-explication-deciles-ir"
>
déciles de RFR :
</span
></span
>
</h4>
<div
class=
"flex gap-2 text-xs text-gray-500"
>
...
...
@@ -272,7 +270,7 @@
/>
IR PLF
</div>
{
/if
}
{
#if
use
Amendment
}
{
#if
show
Amendment
}
<div
class=
"flex items-center"
>
<iconify-icon
class=
"ml-1 text-le-jaune"
...
...
@@ -337,7 +335,7 @@
y=
{
yFromQuantile
(
bill
)
}
/>
{
/if
}
{
#if
use
Amendment
}
{
#if
show
Amendment
}
<Column
fill=
"#ded500"
on:click=
{
()
=>
changeQuantileIndex
(
index
)
}
...
...
@@ -453,7 +451,7 @@
inline
unitName=
"currency-EUR"
valueByCalculationName=
{
{
amendment
:
use
Amendment
amendment
:
show
Amendment
?
yFromQuantile
(
amendmentQuantile
)
:
undefined
,
bill
:
showBill
?
yFromQuantile
(
billQuantile
)
:
undefined
,
...
...
@@ -468,14 +466,13 @@
inline
unitName=
"/1"
valueByCalculationName=
{
{
amendment
:
use
Amendment
amendment
:
show
Amendment
?
-
yFromQuantile
(
amendmentQuantile
)
/
amendmentStateBudget
.
irpp
:
undefined
,
bill
:
bill
===
undefined
?
undefined
:
-
yFromQuantile
(
billQuantile
)
/
billStateBudget
.
irpp
,
bill
:
showBill
?
-
yFromQuantile
(
billQuantile
)
/
billStateBudget
.
irpp
:
undefined
,
law
:
-
yFromQuantile
(
lawQuantile
)
/
lawStateBudget
.
irpp
,
}
}
/></span
...
...
@@ -495,7 +492,7 @@
inline
unitName=
"currency-EUR"
valueByCalculationName=
{
{
amendment
:
use
Amendment
amendment
:
show
Amendment
?
-
amendmentQuantile
.
irpp_mean
:
undefined
,
bill
:
showBill
?
-
billQuantile
.
irpp_mean
:
undefined
,
...
...
@@ -510,14 +507,13 @@
inline
unitName=
"/1"
valueByCalculationName=
{
{
amendment
:
use
Amendment
amendment
:
show
Amendment
?
-
amendmentQuantile
.
irpp_mean
/
amendmentQuantile
.
rfr_mean
:
undefined
,
bill
:
bill
===
undefined
?
undefined
:
-
billQuantile
.
irpp_mean
/
billQuantile
.
rfr_mean
,
bill
:
showBill
?
-
billQuantile
.
irpp_mean
/
billQuantile
.
rfr_mean
:
undefined
,
law
:
-
lawQuantile
.
irpp_mean
/
lawQuantile
.
rfr_mean
,
}
}
/></span
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment