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

scraper-pmf

v1.0.3

Published

scraper for private market flood website

Downloads

4

Readme

Private Market Flood Insurance Scraper

Installation

npm install --save scraper-pmf

Parameters

Paramaters for the a and v flood zones can be found in /schema/index.js.

A Flood Zone

| Key | Type | Description | Criteria | Required | | ------------- |:-------------:| -----:| -------------------:| --------:| | floodReady | boolean | is the house prepped for a flood | | False | | occupancy | string/enum | how many units in the building | "twotofour", "fiveplus", "other_noneresident" | True | | buildingCoverageAmt | int | amount to cover your building | | True | | contentsCoverageAmt | int | amount to cover your belongings | | True | | deductible | string/enum | out of pocket cost | "2000", "5000" | True | | effectiveDate | string/enum | | "before", "after" | False | foundationType | string/enum | foundation of your home | "slab on ground", "basement", "split level slab", "split level basement", "elevated building with no enclosure", "elevated building with an enclosure", "walkout basement", "crawlspace", "below grade crawlspace" | True | | isOwnerOccupied | boolean | does the owner live in the home for at least 292 days out of the year | |True| | isPre1984 | boolean | was the home created prior to 1984 || True | | isSingleResidential | boolean | is the home only occupied by one family || True | | premiumPeriod | string/enum | how long you would like to keep your premium | "one year", "one year with one year rate lock", "one year with two year rate lock", "two years", "three years" | True | | state | string | what state the home is in | no abbreviations. capitalize words | True | | replacementCostAmt | int | | keep numbers even, ex. 250000| True | | zipCode | string | | zipcode of the home | True |

V Flood Zone

| Key | Type | Description | Criteria | Required | | ------------- |:-------------:| -----:| -------------------:| --------:| | occupancy | string/enum | units in building | "twotofour", "fiveplus", "other_nonresident" | True | | buildingCoverageAmt | int | amount to cover your building || True | | contentsCoverageAmt | int | amount to cover your belongings || True | | deductible | string/enum | out of pocket cost | "2000", "5000" | True | effectiveDate | string/enum | | "before", "after" | False | | hasCrawlSpace | boolean | does the home have crawl space underneath || True | | isOwnerOccupied | boolean | does the owner live in the home for at least 292 days || True| | isSingleResidential | boolean | is the home only occupied by one family | | True | | numberOfFloors | string/enum | how many floors | "one", "two", "three plus" | True | | premiumPeriod | string/enum | how long you would like to keep your premium | "one year", "one year with one year rate lock", "one year with two year rate lock", "two years", "three years" | True | | state | string | what state the home is in | no abbreviations. capitalize words | True | | replacementCostAmt | int | | keep numbers even, ex. 250000| True | | zipCode | string | | zipcode of the home | True |

Making the call

const scraper = require('scraper-pmf');

const aParams = {...};
const vParams = {...};


const aTotals = scraper.aFloodZone(aParams);
const zTotals = scraper.vFloodZone(vParams);

Response

For all array values, they are int types. Index 0 is the dollar amount and index 1 is the cents amount. Response looks the same for both flood types.

    {
        total: [120, 0],
        building: [220, 20],
        contents: [1000, 0],
        icc: [5000, 20],
        state: [1050, 50],
        policy: [0, 0]
    }

Expected responses can also be found in /schema/index.js.