npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

kyiv-streets

v1.1.0

Published

It's dataset with all kyiv streets (on 25.10.2020).

Downloads

8

Readme

kyiv-streets

It's dataset with all kyiv streets (on 25.10.2020).

Description

We have separated datasets (arrays with 2843 elements). These are parallel arrays. So you are not to use all of them if you do not want.

export const districtsFlagsDataSet: StreetDataSet<number>;
export const fullTitleDataSet: StreetDataSet<string>;
export const uniqueDigitalCodeDataSet: StreetDataSet<number>;
export const namingDateDataSet: StreetDataSet<string | null>;
export const namingDocumentDataSet: StreetDataSet<string | null>;
export const namingDocumentNumberDataSet: StreetDataSet<string | null>;
export const namingDocumentTitleDataSet: StreetDataSet<string | null>;
export const oldFullTitleDataSet: StreetDataSet<string | null>;
export const oldTypeDataSet: StreetDataSet<number | null>;
export const placeDescriptionDataSet: StreetDataSet<string | null>;
export const typeDataSet: StreetDataSet<number>;

Also There is one combined dataset:

export const street: StreetDataSet<IStreet>;
// where
interface IStreet {
  districtsFlags: number;
  fullTitle: string;
  type: number;
  uniqueDigitalCode: number;
  namingDate: string | null; // seems that dates are has format mm/dd/YYYY
  namingDocument: string | null;
  namingDocumentNumber: string | null;
  namingDocumentTitle: string | null;
  oldFullTitle: string | null;
  oldType: string | number;
  placeDescription: string | null;
}

Examples:

Search by titles

// utils/searchStreetTitle.ts
import { fullTitleDataSet } from "kyiv-streets";

export function searchStreetTitle(title: string): string[] {
  const trimmedLowerCased = title.trim().toLowerCase();

  return fullTitleDataSet.filter((fullTitle) =>
    fullTitle.toLowerCase().includes(trimmedLowerCased)
  );
}
// other file
import { searchStreetTitle } from "utils/searchStreetTitle";

const streetTitles = searchStreetTitle("Незал");
console.log(streetTitles); // ['Незалежності']

Search By Street Type

import { streetDataSet, Type } from "kyiv-streets";

streetDataSet.filter((street) => street.type === Type.Maidan);
// [
//   {
//     fullTitle: 'Незалежності',
//     districtsFlags: 16,
//     type: 13,
//     placeDescription: 'Розташований між Хрещатик, вул., Грінченка Бориса, вул., Шевченка Тараса, пров., Софіївською вул., Малою Житомирською вул., Михайлівською вул., Костьольною вул., Інститутською вул., Городецького Архітектора, вул.',
//     namingDate: '8/26/1991',
//     namingDocument: 'Рішення виконавчого комітету Київської міської ради народних депутатів',
//     namingDocumentNumber: '524',
//     namingDocumentTitle: '«Про перейменування площі Жовтневої революції і станції метро „Площа Жовтневої революції“» ',
//     oldFullTitle: null,
//     oldType: null
//   }
// ]

Search By City District

// Search by district
import { streetDataSet, DistrictFlag } from "kyiv-streets";
streetDataSet.filter(
  (street) => street.districtsFlags & DistrictFlag.Solomyanskyi
);
// [
//   {
//     fullTitle: '9-го Травня',
//     districtsFlags: 512,
//     type: 0,
//     placeDescription: 'Пролягає від Трублаїні, вул. до Відрадного просп.',
//     namingDate: '12/16/1974',
//     namingDocument: 'Рішення виконавчого комітету Київської міської ради депутатів трудящих',
//     namingDocumentNumber: '1476',
//     namingDocumentTitle: 'Про впорядкування найменувань та перейменування вулиць м. Києва',
//     oldFullTitle: null,
//     oldType: null
//   },
//   {
//     fullTitle: 'Абрикосова',
//     districtsFlags: 256,
//     type: 0,
//     placeDescription: 'Пролягає у новому мікрорайоні на схід від Богатирської вул. паралельно Сетомльській вул.',
//     namingDate: '7/14/2011',
//     namingDocument: 'Рішення Київської міської ради',
//     namingDocumentNumber: '374/5761',
//     namingDocumentTitle: '«Про найменування вулиць в Оболонському районі м. Києва»',
//     oldFullTitle: null,
//     oldType: null
//   }
//   ... 273 records
// ]

Available Street Types

Streets have only one of these street type

export enum Type {
  Street = 0,
  Lane = 1,
  Square = 2,
  Line = 3,
  Ave = 4,
  Bulvar = 5,
  Descent = 6,
  Proyizd = 7,
  Highway = 8,
  Road = 9,
  Alley = 10,
  Naberezhna = 11,
  BlindAlley = 12,
  Maidan = 13,
}

Available City Districts

There are such city districts:

enum DistrictFlag {
  Darnytskyi = 1,
  Podilskyi = 2,
  Solomyanskyi = 4,
  Dniprovskyi = 8,
  Shevchenkivskyi = 16,
  Holosiivskyi = 32,
  Desnyanskyi = 64,
  Pecherskyi = 128,
  Obolonskyi = 256,
  Svyatoshynskyi = 512,
  StDniprovskyy2 = 1024,
  SdtFrontovyk = 2048,
  Bortnychi = 4096,
  Chornobylets = 8192,
  StObolon = 16384,
  SdtStadne = 32768,
  StNyvky = 65536,
}

If street is placed in several districts it's districtsFlags field equal to bitwise OR of all DistrictFlag of the districts.

For example if a street is placed in Solomyanskyi and Shevchenkivskyi. Than it's districtsFlags will be equal DistrictFlag.Solomyanskyi | DistrictFlag.Shevchenkivskyi

Sources

Based on Реєстр вулиць Києва станом на 25.10.2020