Parse single line NYC addresses and BBLs.
Project description
NYC Parser
A utility to parse NYC addresses and BBLs from a single line input.
Install
$ pip install nyc-parser
or clone this repo, cd
into it and
$ pip install .
Usage
>> from nycparser import Parser
>> p = Parser()
# parse an address
>> p.address('74-12 35th ave, Queens NY 11372')
{'PHN': '74-12',
'STREET': '35TH AVE',
'BOROUGH_CODE': 4,
'BOROUGH_NAME': 'QUEENS',
'ZIP': '11372'}
# parse a BBL
>> p.bbl('1004380006')
{'BLOCK': 438,
'LOT': 6,
'BOROUGH_CODE': 1,
'BOROUGH_NAME': 'MANHATTAN'}
# can contain special characters, just needs 10 digits
>> p.bbl('1-00438-0006')
{'BLOCK': 438,
'LOT': 6,
'BOROUGH_CODE': 1,
'BOROUGH_NAME': 'MANHATTAN'}
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nyc-parser-0.0.3.tar.gz
(2.8 kB
view details)
File details
Details for the file nyc-parser-0.0.3.tar.gz
.
File metadata
- Download URL: nyc-parser-0.0.3.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03e56d3fb6b26e960c6734f1b7cd8fba530e609a038a6d7ae8e13a8b47ce0c43 |
|
MD5 | a898611e2ea2144f9225ca0225f6d66c |
|
BLAKE2b-256 | 2441ece180dee3d0a271e5193cc822ef98c585ffedcb58284b047d3abef4c178 |