Changes

Jump to navigation Jump to search
no edit summary
==Data on Political Contributions==
===FollowTheMoney.org=== This project uses data from [http://www.followthemoney.org FollowTheMoney.Org]. Data can be retrieved through an XML based API. The [http://www.followthemoney.org/services/document.phtml Basic documentation on the API] states that requests should be of the form:
http://api.followthemoney.org/api_method.php?key=123456789ABCDEF
where the key is the user assigned key(sign-up to get a key!). Error codes are returned as XML in the format:
A Perl module FollowTheMoney.pm (© Ed Egan, 2009) retrieves data through the XML API and creates tab-delimited text files. This module and other scripts are detailed below. <error code=="101" text="access denied - restricted api" originAPI Methods="National Institute on Money in State Politics" process_timestamp="08-21-2006 17:20:43" update_timestamp="08-17-2006 03:15:00">
A [http://www.followthemoney.org/services/methods.phtml full list of methods that can be called through the API], with links to their documentation, is provided. Of particular interest to this research are (required request fields are in brackets):
*ballot_measures.committees.contributions.php - (key,committee_id) Provides details on contributions to specific ballot measures.
Requests ===Requesting data through the API=== Each account has a limit placed on it that restricts the number of records that can be retrieved through the API per minute. However, requests to the server also become very slow when the page number requested is high. At a restriction rate of 1000 records/minute and 200 records per page, the page requests are slower than the restriction (i.e. no throttling back is required) beyond about page 20. This maybe due to a lack of database caching (particularly, the php scripts may be requesting data from the first page each time). This is particularly problematic when requesting the candidates list, which for most research purposes will be needed as a starting point for subsequent requests.  One work-around this problem is to request candidates (or other data) by state. The <tt>state_postal_code </tt> variable , requested as <tt>state</tt> unless in a sort, (presumably) follows the [http://www.usps.com/ncsc/lookups/usps_abbreviations.html USPS state abbreviation convention]. The codes provided in [http://www.edegan.com/repository/USPS-StateCodes.txt USPS-StateCodes.txt].Sept '09 estimates of number of candidates in the dataset are about 120,000. Given 200 per page, that is about 600 pages. Given 50 states, we expect about 12 pages per state with variation. ===Error codes=== The API's error codes are returned as XML in the format:  <error code="101" text="access denied - restricted api" origin="National Institute on Money in State Politics" process_timestamp="08-21-2006 17:20:43" update_timestamp="08-17-2006 03:15:00"> There following error codes may be returned (the perl module action is in brackets):*100 - invalid key (abort)*101 - access denied - restricted api (abort)*102 - total API call limit has been reached (abort)*103 - total API bytes limit has been reached (abort)*104 - total API records limit has been reached (abort)*105 - call limit for this API method has been reached (wait and retry)*106 - bytes limit for this API method has been reached (wait and retry)*107 - records limit for this API method has been reached (wait and retry)*200 - no records found (record stub)*201 - id# not found - invalid imsp_committee_id number (record stub)*202 - id# not found - invalid imsp_candidate_id number (record stub)*203 - can not use both imsp_sector_code and imsp_industry_code at the same time, please limit your use to just one of them (abort)*300 - missing required input - input_argument is required (abort) ==Paper(s)== See:*PHDBA279 (Berkeley): Non-Market Strategy in Venture Capital [[Media:Egan_(2009)_-_NonMarket_Strategy_in_Venture_Capital_--_Submitted_for_PHDBA279.pdf |(Download PDF)]]
Anonymous user

Navigation menu