Route: /api/v2/financial_balances/agencies
Method: GET
This route retrieves financial balance information by funding agency and fiscal year
/api/v2/financial_balances/agencies?funding_agency=775&fiscal_year=2017
import django | |
django.VERSION |
#Alternate to the django-admin.py startproject command. | |
#In windows, using 'django-admin.py startproject' is problematic...the .py extension | |
#is associated with the main install of Python, not the install on the current virtualenv, which fouls things up (e.g., import errors). Code below: | |
#1. forces module mode, which will check the path for django-admin (interpreter searches the path for modules but not for scripts) | |
#2. no more .py extension | |
#see http://stackoverflow.com/questions/2542674/no-matter-what-i-do-django-admin-py-is-not-found-even-though-its-in-my-path | |
-m django-admin startproject tutorial |
<script type="text/javascript" src="/media/uploads/publications/presidents_budget_fy2013/swfobject.js"></script> | |
<script type="text/javascript"> | |
// For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. | |
var swfVersionStr = "11.1.0"; | |
// To use express install, set to playerProductInstall.swf, otherwise the empty string. | |
var xiSwfUrlStr = "/media/uploads/publications/presidents_budget_fy2013/playerProductInstall.swf"; | |
var flashvars = {datafile: "/media/uploads/publications/presidents_budget_fy2013/info/budget-category.txt"} | |
var params = {}; | |
params.quality = "high"; | |
params.bgcolor = "#ffffff"; |
# example of using a parameterized function as a converter when reading .csv in pandas | |
import pandas as pd | |
# a function that will be used to pad datafram column values to a specified length | |
# (some incoming values are multiple spaces; those should convert to Noe) | |
padFunction = lambda field, padTo: str(field).strip().zfill(padTo) if len(str(field).strip()) else None | |
# read file w/o using converters and display list of unique alloc_id values | |
pa = pd.read_csv( |
Vagrant::Config.run do |config| | |
config.vm.define :pythondata do |pythondata_config| | |
# Every Vagrant virtual environment requires a box to build off of. | |
pythondata_config.vm.box = "precise64" | |
# The url from where the 'config.vm.box' box will be fetched if it | |
# doesn't already exist on the user's system. | |
pythondata_config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
# Forward a port from the guest to the host, which allows for outside |
{ | |
"Ansi 3 Color" : { | |
"Green Component" : 0.73333334922790527, | |
"Blue Component" : 0, | |
"Red Component" : 0.73333334922790527 | |
}, | |
"Tags" : [ | |
], | |
"Ansi 12 Color" : { |
# Get SETI Institute grants from USAspending API into a pandas dataframe | |
import json | |
import requests | |
import pandas as pd | |
from pandas.io.json import json_normalize | |
uri = 'https://api.usaspending.gov/api/v2/search/spending_by_transaction/' | |
headers = {'content-type': 'application/json'} | |
seti_json = [] | |
next = 1 |
### Keybase proof | |
I hereby claim: | |
* I am bsweger on github. | |
* I am bendystraw (https://keybase.io/bendystraw) on keybase. | |
* I have a public key ASCmomBSZgzxe3w1YQf-eZwTB3KNg7k4VGD29NN8hhmrDAo | |
To claim this, I am signing this object: |