Synaplan
開源 AI 平台,供企業使用:自行託管的 AI 代理、符合 GDPR 的聊天機器人小工具、RAG 知識庫、WhatsApp 與 Outlook AI、MCP、多模型路由。Docker、Kubernetes 或託管於 Germ
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證All 42 Romanian counties and 13,755 localities with SIRUTA codes, postal codes and proper diacritics. JSON, CSV, SQL + search API for JS and PHP. Official open data.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Every Romanian shop needs a county → city dropdown. Most copies floating around have no diacritics, broken ş/ș characters, no way to tell apart the 11 villages called Valea Mare, and no postal codes. This one is built from the official open data with a reproducible script.
import { county, localities, search } from 'romania-geo-data';
county('IS'); // { code: 'IS', name: 'Iași', region: 'Nord-Est', seat: 'Iași', ... }
localities('CJ').length; // 434
search('valea mare', { county: 'AG' })[0].label; // "Valea Mare (com. Priboieni)"
search('bucuresti')[0].label; // "București, Sectorul 1"
data/counties.json | 42 counties: plate code (AB…VN, B), name, SIRUTA, development region, county seat, number of localities |
data/localities.json | 13,755 localities: SIRUTA, name, label, county, type, urban/rural, parent commune/town/municipality, postal code |
data/localities.min.json | compact [siruta, name, county, label, postal_code] arrays (850 KB) for the browser |
data/*.csv | the same as CSV (UTF-8) |
data/romania.sql | CREATE TABLE + INSERTs for MySQL, MariaDB, PostgreSQL and SQLite |
A locality looks like this:
{
"siruta": 179560,
"name": "Voluntari",
"label": "Voluntari",
"county": "IF",
"type": "oraș",
"urban": true,
"uat_siruta": 179551,
"uat_name": "Voluntari",
"uat_type": "oraș",
"postal_code": "077190",
"street_level_postal_codes": false
}
label is ready for dropdowns: villages that share a name get their commune in brackets — Fetești (com. Scobinți).type: municipiu, oraș, sector, localitate componentă or sat.postal_code is filled for 13,688 localities. Big cities (Iași, Cluj-Napoca, Bucharest sectors…) have one code per street, so it is null there and street_level_postal_codes is true.ș ț and modern â spelling (Câmpuri, not Cîmpuri).npm install romania-geo-data
import { counties, county, localities, locality, search, byPostalCode, normalize } from 'romania-geo-data';
counties(); // all 42, sorted by name
county('Bistrita-Nasaud'); // by code or name, diacritics optional
localities('B'); // the 6 Bucharest sectors
locality(179560); // by SIRUTA
search('chis', { limit: 5 }); // exact > prefix > substring, cities before villages
byPostalCode('077190'); // [Voluntari]
normalize('Bistrița-Năsăud'); // "bistrita-nasaud"
Works in Node 18+. In the browser, import the JSON directly: import data from 'romania-geo-data/data/localities.min.json'. Types are included.
composer require gabrieldevro/romania-geo-data
use Gabrieldev\RomaniaGeo\RomaniaGeo;
RomaniaGeo::counties();
RomaniaGeo::county('IS')['name']; // "Iași"
RomaniaGeo::localities('CJ');
RomaniaGeo::search('valea mare', 'AB');
RomaniaGeo::byPostalCode('077190');
Laravel seeder in three lines:
foreach (array_chunk(RomaniaGeo::localities(), 1000) as $chunk) {
DB::table('localities')->insert(array_map(fn ($l) => Arr::only($l, ['siruta', 'name', 'label', 'county', 'postal_code']), $chunk));
}
Or import RomaniaGeo::path('romania.sql') directly into your database.
<select id="county"></select>
<select id="city"></select>
<script type="module">
import { counties, localities } from 'https://cdn.jsdelivr.net/npm/romania-geo-data/+esm';
const c = document.querySelector('#county'), l = document.querySelector('#city');
c.innerHTML = counties().map((x) => `<option value="${x.code}">${x.name}</option>`).join('');
const fill = () => (l.innerHTML = localities(c.value).map((x) => `<option value="${x.siruta}">${x.label}</option>`).join(''));
c.onchange = fill; fill();
</script>
| Source | Publisher | Licence |
|---|---|---|
| SIRUTA – administrative units and localities | Institutul Național de Statistică | OGL-ROU-1.0 |
| Coduri poștale cu SIRUTA – postal codes (Infocod) | Poșta Română | OGL-ROU-1.0 |
pip install xlrd
python tools/build.py # downloads the sources and regenerates data/
These are the latest editions published on data.gov.ro. Administrative changes since then are rare; if you spot one, open an issue or a PR against tools/build.py.
Lista completă cu cele 42 de județe și 13.755 de localități din România, din datele oficiale INS (SIRUTA) și Poșta Română (coduri poștale), în JSON, CSV și SQL:
ș, ț cu virgulă, â modern);Valea Mare (com. Priboieni);iasi → Iași), pentru JavaScript și PHP/Laravel.Perfect pentru selectorul județ → localitate din checkout.
Code: MIT © Gabriel Dev. Data: © INS and Poșta Română, published under the Open Government Licence Romania 1.0; attribution is kept above.
If it saved you an afternoon of data cleaning, a ⭐ helps other developers find it.