jeffreyshen19 / billscraper.js Goto Github PK
View Code? Open in Web Editor NEWA Javascript module to scrape, analyze, and cache Congressional bills
License: Creative Commons Zero v1.0 Universal
A Javascript module to scrape, analyze, and cache Congressional bills
License: Creative Commons Zero v1.0 Universal
Update the documentation in examples/searchbill.js to show more examples of how to use mongoose to search for specific queries.
Create a file called printBill.test.js in test/parser. Add unit tests in a similar manner as cleanBill.js (just changed for printBill).
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).
Look at past unit tests for inspiration @malcolmessaid.
When using the library, the following will be logged to the console:
(node:36783) DeprecationWarning: sys is deprecated. Use util instead.
Index.js looks really bad right now. Help me refactor it
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.
Errors can be thrown as following:
throw new Error(message, file name, line number);
However, some of the errors are thrown as just throw new Error(message)
. Add a file name and line number to all of these.
Code coverage is currently sitting at a meager 57%. Fix this by adding more unit tests to cover more lines of code.
Replace all instances of require("path/to/file.js")
with require("path/to/file")
.
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.
There is a folder "examples" that contains example javascript files. However, I don't want these to be included in my coverage report. Help me exclude them.
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
Fix the markdown styling in VALID_BILL_TYPES (one of the line breaks isn't working), and add documentation using billScraper.validBillTypes to get an array of valid bill types.
Add an array field called validCongresses
to index.js that contains the integer entries 113, 114, and 115.
Currently, the chamber field can be either "IN THE SENATE OF THE UNITED STATES" or "IN THE HOUSE OF REPRESENTATIVES". I want these to be converted into "senate" and "house", respectively.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.