@cityssm/mpac-yetf
Version:
Parses the MPAC Year-End Tax File (YETF) into a usable object.
55 lines (38 loc) • 2.41 kB
Markdown
# MPAC Year-End Tax File (YETF) Parser
[](https://www.npmjs.com/package/@cityssm/mpac-yetf)
[](https://www.codacy.com/gh/cityssm/node-mpac-yetf/dashboard?utm_source=github.com&utm_medium=referral&utm_content=cityssm/node-mpac-yetf&utm_campaign=Badge_Grade)
[](https://codeclimate.com/github/cityssm/node-mpac-yetf/maintainability)
[](https://codecov.io/gh/cityssm/node-mpac-yetf)
[](https://github.com/cityssm/node-mpac-yetf/actions/workflows/coverage.yml)
_This project is not endorsed by the [Municipal Property Assessment Corporation (MPAC)](https://www.mpac.ca)._
This project takes an MPAC YETF and parses it into usable objects.
## Features
- Fully typed results with TypeScript.
- Returns all of the data as strings, but can optionally parse the data into numbers.
- Optionally defines the codes used. (i.e. Structure Code '760' corresponds to 'Police Station')
- Makes all of the parsers, lookups, and helper functions available for reuse.
## Installation
npm install @cityssm/mpac-yetf
## Usage
```javascript
import { parseYetf } from '@cityssm/mpac-yetf'
await parseYetf('yetf2022.txt', {
addFormattedFields: true,
callbacks: {
all: (record, lineNumber) => {
console.log(record)
},
AA: (record) => {
// Save Property Creation record to database
}
}
})
```
## I Just Want the Data in a Format I Can Use
The City of Sault Ste. Marie uses this package in another project
that converts the YETF into a SQLite database, compatible with reporting tools like Microsoft Excel,
Microsoft Power BI, and [Metabase](https://github.com/metabase/metabase).
**See the [mpac-yetf-to-sqlite project](https://github.com/cityssm/mpac-yetf-to-sqlite).**
## I Prefer to Use Java
The City of Sault Ste. Marie also offers a similar Java application to parse the MPAC YETF.
**See the [mpacParser project](https://github.com/cityssm/mpacParser).**