Giter Site home page Giter Site logo

gaodp / gga-api Goto Github PK

View Code? Open in Web Editor NEW
13.0 7.0 1.0 728 KB

A JSON REST API for GA General Assembly Information.

Home Page: http://gga.apis.gaodp.org

License: GNU Affero General Public License v3.0

CoffeeScript 88.85% CSS 1.12% Shell 0.26% HTML 9.77%

gga-api's Introduction

Georgia Legislative API

Currently, the Georgia General Assembly is required to publish information about votes, bills, and membership on their website. For awhile now this information has been published through a WSDL API that allows access to this information, but only if you knew someone who had the URLs, if you can find a SOAP client that can read it successfully (several I tried failed at first), and if you really want to deal with a SOAP API.

This application deals with the hard stuff for you.

I got the WSDL API working inside an Express application. We're still implementing the guts that will allow us to import information from the GGA website, but all the SOAP clients for the various services are being created successfully.

The goal of this project is twofold:

  1. Expose a RESTful API somewhere in the cloud for this information. Using WSDL sucks. It's time consuming to get set up, and not really geared for quick scripts or good language semantics on the client code. So, we're going to open up a REST API into the data we import via WSDL. We deal with the nasty. You use a beautiful REST API to build your website or application. It will make your code nicer, and will save you a lot of time dealing with SOAP and WSDL.
  2. Make it dead easy to use on your server. I plan to enable a mode for this app that runs without exposing the API. If your site becomes epicly popular and you need some serious speed - including all the data hosted locally, you should be able to just spin up a copy of this project on your server hooked up to your database. The one trade-off here is that it's licensed under the AGPL. If you improve it you have to share with the rest of us!

Getting Access

You can get access to this API by either using the hosted API, or by running a copy of this service on your personal computer or server.

Hosted API: There is currently a hosted version of this API living on one of my servers at gga.apis.gaodp.org. You should be able to start making requests against it as you wish without any trouble.

Run on your computer: To get started, you'll need a few things:

If you're using a Mac, just install XCode, homebrew, then run this command from your terminal:

$ brew install node mongodb redis

... and follow any instructions neccicary to get mongo and redis running at boot. If this all sounds like greek to you, please scroll up to the instructions on using the CloudAPI. :)

Using the API

Our project wiki contains the full documentation for how to use the RESTful API. (Or how you will use it when it is finished.) Please page through what's available there for information on how this whole things works.

Who am I?

My name is Matt Farmer. I'm a code bandit currently slinging code on behalf of Elemica, Anchor Tab, the Lift Framework, and a few other small outfits who are out to make the world a better place. I tweet regularly, and blog and little bit less so.

gga-api's People

Contributors

farmdawgnation avatar riveramj avatar

Stargazers

Nate Harris avatar Ben L. avatar Chance avatar  avatar Tyler Henkel avatar Yogesh Bhardwaj avatar  avatar Josh avatar Patrick Van Stee avatar Chris Martin avatar  avatar Maggie Lee avatar Michael Lopez avatar

Watchers

 avatar  avatar James Cloos avatar  avatar Frank Fralick avatar  avatar Chance avatar

Forkers

maggie-lee

gga-api's Issues

Continuous Deployment

We need to implement continuous deployment from the master branch so that new code is pushed in, run by Jenkins, and immediately pushed out to the server if it passes specs.

Tests should bootstrap their own data.

Tests should use a different database than development or production... probably named galegis-api-test or something of the sort, populate that data with some known values (probably sample data from someone's dev database copy/pasted in, tbh), and then load up that data before running tests.

This will allow us to test things like member-specific URIs without having to do full imports for testing.

Current Session Data

First off, thank you for making this!

I just started building an application using this api and it seems like it is only getting data for last years session, not the actual current session. Legislation that are introduced in the previous year that are not passed are still eligible to be taken up and passed this year which is why I think they show two sessions worth of data at a time. The data still includes legislation that has been passed from last year.

If you look at the advanced search here, search for SB 264 (horse racing). This is something that is not returned through your legislation endpoint and is current. I imagine that there is a 2015 endpoint and 2016 endpoint that both need to be included to make up the current sessions legislation. To be clear what I'm saying is that if your intent is to have /legislation return the current session, the desirable thing would be to have last year and this year returned because legislation from the previous year is still eligible to be considered this year. I haven't dug into this at all but will. I'm not a big node guy but if I discover the fix I will make a pr if that is ok.

Periodic Polling of GGA Data

We should be periodically polling the GGA for new data. I'm thinking...

  • Votes: Hourly for current session while in session. Otherwise, monthly for all sessions (though probably staggered).
  • Legislation: Hourly for current session while in session. Otherwise, monthly for all sessions (though probably staggered).
  • Everything else: Daily for current session. Staggered monthly for previous sessions.

Implement Denormalizer

We want to implement a denormalizer such that when you pass denormalize=true as a parameter to a request, we return partially denormalized data back to the client. For example, /api/v1/member/:memberId/votes returns a list of IDs to vote objects in our datastore organized by what the member voted. If you passed the denormalize flag to this request you would expect to get back objects in place of those IDs that tell you the ID and the title of the piece of legislation.

Committees Updating?

I noticed several bills are not updating committees. For example, HB 643 (http://gga.apis.gaodp.org/api/v1/legislation/HB/643/) passed the house and got assigned to Senate Judiciary. Your db is still showing only assigned to House Judiciary.

I saw you referenced nightly imports not up and running yet....I thought we were nightly? Please let me know, I need nightly!

Data Migration Strategy

Before we can enter beta, we need to have the data migration strategy down-pat. Ideally, whenever the new version of the system spins up, we make whatever changes need to be made in the mongo database.

Full Legislation Data

We should implement the import of the full data on each item on legislation, instead of just the summary data. This can happen after the summary data, but should probably be updated periodically to account for changes that may occur to legislation over time.

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.