Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrape bill status information of in-demand bills #51

Open
waldoj opened this issue Jan 15, 2018 · 0 comments
Open

Scrape bill status information of in-demand bills #51

waldoj opened this issue Jan 15, 2018 · 0 comments

Comments

@waldoj
Copy link
Member

waldoj commented Jan 15, 2018

When bills have a high level of interest, on a day when they are slated for a hearing, scrape status updates, instead of waiting for the CSV to update.

For instance, this would yield the ID of every bill that’s had more than 50 views in the past hour that is listed on the docket for today:

SELECT DISTINCT bill_id
FROM dockets
WHERE bill_id IN
    (SELECT bill_id
    FROM bills_views
    WHERE date > DATE_SUB(CURDATE(), INTERVAL 1 HOUR)
    GROUP BY bill_id
    HAVING COUNT(*) >= 50)
AND date = CURDATE()

Of course, this doesn't help with the scraping, but at least it IDs the bills in question. Of course, the 50-view mark is entirely contrived.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant