Skip to content

Commit

Permalink
MAJ villeplus
Browse files Browse the repository at this point in the history
  • Loading branch information
mquandalle committed Dec 4, 2023
1 parent 6dcd693 commit 0ccd3d9
Show file tree
Hide file tree
Showing 4 changed files with 285 additions and 254 deletions.
5 changes: 5 additions & 0 deletions data-fetch/maj-villesplus.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ const normalizeEpci = (s) => epci.find(({ nom }) => simplify(nom).includes(simpl

const data = Object.fromEntries(await Promise.all(classsements.map(fetchAndNormalize)));

data.dateClassement = new Intl.DateTimeFormat('fr-FR', {
year: 'numeric',
month: 'long',
}).format(new Date());

if (data.metropoles.find((n) => !n)) {
console.log('❌ Missing EPCI:');
console.log(data.metropoles.filter(Boolean).join('\n'));
Expand Down
Loading

0 comments on commit 0ccd3d9

Please sign in to comment.