Datasets:
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- fr
|
| 4 |
+
tags:
|
| 5 |
+
- france
|
| 6 |
+
- public-sector
|
| 7 |
+
- embeddings
|
| 8 |
+
- directory
|
| 9 |
+
- open-data
|
| 10 |
+
- government
|
| 11 |
+
- etalab
|
| 12 |
+
pretty_name: French Local Administrations Directory
|
| 13 |
+
size_categories:
|
| 14 |
+
- 10K<n<100K
|
| 15 |
+
license: etalab-2.0
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# 🇫🇷 French Local Administrations Directory Dataset
|
| 19 |
+
|
| 20 |
+
This dataset is a processed and embedded version of the public data **Annuaire de l’administration - Base de données locales** (French Local Administrations Directory), published by **DILA** (Direction de l'information légale et administrative) on [data.gouv.fr](https://www.data.gouv.fr/datasets/service-public-fr-annuaire-de-l-administration-base-de-donnees-locales/).
|
| 21 |
+
This information is also available on the official directory website of Service-Public.fr: https://lannuaire.service-public.fr/
|
| 22 |
+
|
| 23 |
+
The dataset provides semantic-ready, structured and chunked data of French **local** public entities, including organizational details, missions, contact information, and hierarchical links. Each chunk of text is vectorized using the [BAAI/bge-m3](https://huggingface.co/BAAI/bge-m3) embedding model to enable semantic search and retrieval tasks.
|
| 24 |
+
|
| 25 |
+
---
|
| 26 |
+
|
| 27 |
+
## 🗂️ Dataset Contents
|
| 28 |
+
|
| 29 |
+
The dataset is provided in **Parquet format** and contains the following columns:
|
| 30 |
+
|
| 31 |
+
| Column Name | Type | Description |
|
| 32 |
+
|------------------------|-----------------------------|-----------------------------------------------------------------------------|
|
| 33 |
+
| `chunk_id` | `str` | Unique source based identifier of the chunk |
|
| 34 |
+
| `types` | `str` | Type(s) of administrative entity. |
|
| 35 |
+
| `name` | `str` | Name of the organization or service. |
|
| 36 |
+
| `mission_description` | `str` | Description of the entity's mission. |
|
| 37 |
+
| `addresses` | `list[dict]` | List of address objects (street, postal code, city, etc.). |
|
| 38 |
+
| `phone_numbers` | `list[str]` | List of telephone numbers. |
|
| 39 |
+
| `mails` | `list[str]` | List of contact email addresses. |
|
| 40 |
+
| `urls` | `list[str]` | List of related URLs. |
|
| 41 |
+
| `social_medias` | `list[str]` | Social media accounts. |
|
| 42 |
+
| `mobile_applications` | `list[str]` | Related mobile applications. |
|
| 43 |
+
| `opening_hours` | `str` | Opening hours. |
|
| 44 |
+
| `contact_forms` | `list[str]` | Contact form URLs. |
|
| 45 |
+
| `additional_information` | `str` | Additional information. |
|
| 46 |
+
| `modification_date` | `str` | Last update date. |
|
| 47 |
+
| `siret` | `str` | SIRET number. |
|
| 48 |
+
| `siren` | `str` | SIREN number. |
|
| 49 |
+
| `people_in_charge` | `list[dict]` | List of responsible persons. |
|
| 50 |
+
| `organizational_chart` | `list[str]` | Organization chart references. |
|
| 51 |
+
| `hierarchy` | `list[dict]` | Links to parent or child entities. |
|
| 52 |
+
| `directory_url` | `str` | Source URL from the official state directory website. |
|
| 53 |
+
| `chunk_text` | `str` | Textual content of the administrative chunk. |
|
| 54 |
+
| `embeddings_bge-m3` | `str` (stringified list) | Embeddings of `chunk_text` using `BAAI/bge-m3`. Stored as a JSON array string. |
|
| 55 |
+
|
| 56 |
+
---
|
| 57 |
+
|
| 58 |
+
## 🛠️ Data Processing Methodology
|
| 59 |
+
|
| 60 |
+
### 📥 1. Field Extraction
|
| 61 |
+
|
| 62 |
+
The following fields were extracted and/or transformed from the original JSON:
|
| 63 |
+
|
| 64 |
+
- **Basic fields**: `chunk_id`, `name`, `types`, `mission_description`, `additional_information`, `siret`, `siren`, `directory_url`, `modification_date` are directly extracted from JSON attributes.
|
| 65 |
+
- **Structured lists**:
|
| 66 |
+
- `addresses`: list of dictionaries with `adresse`, `code_postal`, `commune`, `pays`, `longitude`, and `latitude`.
|
| 67 |
+
- `phone_numbers`, `mails`, `urls`, `social_medias`, `mobile_applications`, `contact_forms`: derived from their respective fields with formatting.
|
| 68 |
+
- **People and structure**:
|
| 69 |
+
- `people_in_charge`: list of dictionaries representing staff members or leadership (title, name, rank, etc.).
|
| 70 |
+
- `organizational_chart`, `hierarchy`: structural information within the administration.
|
| 71 |
+
- **Other fields**:
|
| 72 |
+
- `opening_hours`: built using a custom function that parses declared time slots into readable strings.
|
| 73 |
+
|
| 74 |
+
### ✂️ 2. Generation of `chunk_text`
|
| 75 |
+
|
| 76 |
+
A synthetic text field called `chunk_text` was created to summarize key aspects of each administrative body. This field is designed for semantic search and embedding generation. It includes:
|
| 77 |
+
|
| 78 |
+
- The entity’s name : `name`
|
| 79 |
+
- Its mission statement (if available) : `mission_description`
|
| 80 |
+
- Key responsible individuals (formatted using role, title, name, and rank) : `people_in_charge`
|
| 81 |
+
|
| 82 |
+
There was no need here to split characters here.
|
| 83 |
+
|
| 84 |
+
### 🧠 3. Embeddings Generation
|
| 85 |
+
|
| 86 |
+
Each `chunk_text` was embedded using the [**`BAAI/bge-m3`**](https://huggingface.co/BAAI/bge-m3) model.
|
| 87 |
+
The resulting embedding vector is stored in the `embeddings_bge-m3` column as a **string**, but can easily be parsed back into a `list[float]` or NumPy array.
|
| 88 |
+
|
| 89 |
+
## 📌 Embeddings Notice
|
| 90 |
+
|
| 91 |
+
⚠️ The `embeddings_bge-m3` column is stored as a stringified list (e.g., `"[-0.03062629,-0.017049594,...]"`).
|
| 92 |
+
To use it as a vector, you need to parse it into a list of floats or NumPy array. For example:
|
| 93 |
+
|
| 94 |
+
```python
|
| 95 |
+
import pandas as pd
|
| 96 |
+
import json
|
| 97 |
+
|
| 98 |
+
df = pd.read_parquet("local-administrations-directory-latest.parquet")
|
| 99 |
+
df["embeddings_bge-m3"] = df["embeddings_bge-m3"].apply(json.loads)
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
## 📚 Source & License
|
| 103 |
+
|
| 104 |
+
## 🔗 Source :
|
| 105 |
+
- [Lannuaire.Service-Public.fr](https://lannuaire.service-public.fr/)
|
| 106 |
+
- [Data.Gouv.fr : Service-public.fr - Annuaire de l’administration - Base de données locales](https://www.data.gouv.fr/datasets/service-public-fr-annuaire-de-l-administration-base-de-donnees-locales/)
|
| 107 |
+
|
| 108 |
+
## 📄 Licence :
|
| 109 |
+
**Open License (Etalab)** — This dataset is publicly available and can be reused under the conditions of the Etalab open license.
|