Skip to content
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

Add NAF name and NAF code #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ def save(self, path):
emissions.to_csv(path + 'emissions.csv', index=False, encoding='UTF-8')

assessments = pd.DataFrame(self.collections['assessments'])
assessments = assessments[['id', 'organization_name', 'organization_description', 'organization_type',
'collectivity_type', 'staff', 'population', 'consolidation_method', 'reporting_year',
assessments = assessments[['id', 'organization_name', 'organization_description', 'organization_type', 'collectivity_type',
'naf_name', 'naf_code', 'staff', 'population', 'consolidation_method', 'reporting_year',
'total_scope_1', 'total_scope_2', 'total_scope_3',
'reference_year', 'action_plan',
'reductions_scope_1_2', 'reductions_scope_1', 'reductions_scope_2', 'reductions_scope_3',
Expand Down Expand Up @@ -260,6 +260,8 @@ def save(self):
'legal_unit_id_type': 'SIREN',
'legal_unit_id': match.groups()[0],
})
assessment['naf_name']= match.groups()[1]
assessment['naf_code']= match.groups()[2]
else:
print('ERROR: Invalid legal unit string format "%s".' % line)
del assessment['legal_units']
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ Le fichier **assessments.csv** (ou l'onglet **assessments** du fichier Excel) d
* `organization_description` : description libre de l'organisation,
* `organization_type` : type d'organisation,
* `collectivity_type` : type de collectivité (pour les collectivités territoriales),
* `naf_name`: nom de l’activité principale exercée selon la nomenclature INSEE
* `naf_code`: code de l’activité principale exercée selon la nomenclature INSEE
* `staff` : effectifs, nombre d'agents ou de salariés de l'organisation,
* `population` : population de la collectivité (pour les collectivités territoriales),
* `consolidation_method` : mode de consolidation du bilan,
Expand Down