Skip to content

Commit

Permalink
[metrics] Add "législature intitale"
Browse files Browse the repository at this point in the history
next step: #96
  • Loading branch information
mdamien committed Dec 3, 2018
1 parent 694f05f commit 2b28ad7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tlfp/tools/make_metrics_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from lawfactory_utils.urls import enable_requests_cache
from senapy.dosleg import opendata
from senapy.dosleg.parser import guess_legislature

from tlfp.parse_one import *
from tlfp.tools import parse_texte
Expand Down Expand Up @@ -265,7 +266,7 @@ def clean_type_dossier(dos):
"Titre court",
"Date initiale",
"Année initiale",
# "Législature initiale",
"Législature initiale",
"Date de promulgation",
"Année de promulgation",
"Législature de promulgation",
Expand Down Expand Up @@ -392,6 +393,7 @@ def clean_type_dossier(dos):

dos['Année initiale'] = annee(dos['Date initiale'])
dos['Date initiale'] = format_date(dos['Date initiale'])
dos['Législature initiale'] = guess_legislature(dos['Date initiale'])
dos['Année de promulgation'] = annee(dos['Date de promulgation'])
dos['Date de promulgation'] = format_date(dos['Date de promulgation'])
dos["Durée d'adoption (jours)"] = (datize(dos["Date de promulgation"]) - datize(dos["Date initiale"])).days + 1
Expand Down

0 comments on commit 2b28ad7

Please sign in to comment.