Synaplan
기업을 위한 오픈소스 AI 플랫폼
저장소 정보는 아직 수집하지 않았습니다.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
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.