Giter Site home page Giter Site logo

jeffreyshen19 / billscraper.js Goto Github PK

View Code? Open in Web Editor NEW
34.0 2.0 5.0 23.33 MB

A Javascript module to scrape, analyze, and cache Congressional bills

License: Creative Commons Zero v1.0 Universal

JavaScript 100.00%
javascript civic-engagement politics api congress analyze-bills congressional-bills

billscraper.js's People

Contributors

dabao12321 avatar jeffreyshen19 avatar ksun0 avatar malcolmessaid avatar optomal7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

billscraper.js's Issues

Write unit tests for printBill.js

Create a file called printBill.test.js in test/parser. Add unit tests in a similar manner as cleanBill.js (just changed for printBill).

Add a linter to this library

It would be nice to add a linter to this project, so there isn't any inconsistency in code styling. For instance, having a linter to make sure require(path/to/file.js) becomes require(path/to/file) (see #9).

Deprecation warning

When using the library, the following will be logged to the console:

(node:36783) DeprecationWarning: sys is deprecated. Use util instead.

Check inputs for generateDb.js

In generateDB.js (locating in lib/database), check that type is one of the items in validBillTypes, congress is either 113, 114, or 115, and session is either one or two. If these cases aren't true, throw a TypeError with a helpful message.

Improve code coverage

Code coverage is currently sitting at a meager 57%. Fix this by adding more unit tests to cover more lines of code.

tagBill.js returns some useless tags.

The tagBill function (located at lib/parser/tagBill.js) is designed to take in bill text, and output a relevant array of "tags" for the bill. However, I don't want this function to return tags like "paragraph" or "congress" or "america" because these are pretty useless tags. Therefore, I have an array called wordsToExcludeFromTags (see below), where all these words I want to ignore are included. Help me add more words to this array.

screen shot 2018-02-07 at 12 34 25 pm

Update the docs on gh-pages

Clone the latest version of the branch, then run the following commands:

git checkout gh-pages
git rebase master
npm run docs
git add .
git commit -m "Updated docs"
git push origin gh-pages

Submit a PR to the gh-pages branch

Make maxTags work

In tagBill.js, there is an integer option maxTags, intended to limit the size of the array tags to a size less than or equal to maxTags. It doesn't yet work, so implement the functionality to limit the size of tags. Add code right before the callback on l.56 in lib/parser/tagBill.js
screen shot 2018-02-11 at 4 32 14 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.