##infochimpy
Infochimpy is a Python client library for the Infochimps API based on tweepy. You might also want to look at python-infochimps.
Infochimpy is intended to be used from within an application, an example is django-infochimps.
It may also be used through an interactive shell:
$ ./chimpshell.py
Launching the shell creates an api instance that allows you to execute requests against the Infochimps API.
First you'll need to provide an api_key.
>> INFOCHIMPS_API_KEY = 'api_test-W1cipwpcdu9Cbd9pmm8D4Cjc469'
>> api.trstrank('infochimps', INFOCHIMPS_API_KEY)
{u'screen_name': u'infochimps', u'tq': u'94', u'trstrank': u'3.21', u'user_id': u'15748351'}
>> api.influence('infochimps', INFOCHIMPS_API_KEY)
[result]
>> api.wordbag('infochimps', INFOCHIMPS_API_KEY)
[result]
- trstrank - gets the trstrank and trstquotient for a given Twitter user
- stronglinks - finds all of the Strong Links of a given Twitter user
- influence - finds the level of influence for a given Twitter use
- wordbag - finds the words most associated with a given Twitter use
- word_stats - gets basic statistics associated with a given word on Twitter
- conversations - create data frame of recent conversations between two Twitter user
Digital Element calls (see here)
- demographics - gather demographic data for a given IP address from the U.S. Census
- ip_geo - IP address geo-location
- census - gathers U.S. Census data for a given IP address
See the Infochimps API for more info.
If you haven't yet we suggest you use pip. Following is an example virtual environment for infochimpy.
Install pip:
$ sudo easy_install -U pip
Install virtualenv:
$ sudo pip install -U virtualenv
Create a virtualenv.
$ mkdir -p ~/Envs
$ cd ~/Envs
$ virtualenv --no-site-packages infochimps
Git the library.
$ git clone [email protected]:gerlad/infochimpy.git
$ cd infochimpy
Activate the env.
$ source ~/Envs/bin/activate
Install
(infochimps) python setup.py install
Alternatively you can use pip.
(infochimps) pip install infochimpy
Try it!
(infochimps) ./chimpshell.py