Skip to content

Instantly share code, notes, and snippets.

View derekeder's full-sized avatar

Derek Eder derekeder

View GitHub Profile
@derekeder
derekeder / chicago-council-divided-votes.md
Last active September 4, 2019 20:44
Chicago City Council - Divided Roll Call votes from Legistar

Open Civic Data API documentation: https://ocd-api-documentation.readthedocs.io/en/latest/

All API responses are in JSON format.

Getting the bills with split votes

Using the Open Civic Data API, you can do a query to find all bill votes for Chicago City Council that have both yes and no votes present for a particular legislative session:

https://ocd.datamade.us/votes/?votes__option=yes&votes__option=no&organization__id=ocd-organization/ef168607-9135-4177-ad8e-c1f7a4806c3a&bill__legislative_session__identifier=2019

Parameters:

Keybase proof

I hereby claim:

  • I am derekeder on github.
  • I am derekeder (https://keybase.io/derekeder) on keybase.
  • I have a public key ASAUWHUB5go_eQ6s4wgRHynwA5LWv1rDedMNZg2mzdtq9Ao

To claim this, I am signing this object:

<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
*/
/*
var disqus_config = function () {
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
@derekeder
derekeder / gist:f14e642325d339ed2205
Created February 24, 2015 17:00
jquery slider init
$("#PercentDTaP-slider").slider({
orientation: "horizontal",
range: true,
min: 0,
max: 1,
values: [0, 1],
step: 0.1,
slide: function (event, ui) {
$("#age-selected-start").html(ui.values[0]);
$("#age-selected-end").html(ui.values[1]);
@derekeder
derekeder / gist:4fd8661eeff747d97d21
Created January 8, 2015 17:29
Hiding search box in searchable map template
<div style="display:none;">
<h4>
Address <small>(<a id='find_me' href='#'>find me</a>)</small>
</h4>
<p>
<input class='form-control' id='search_address' placeholder='Enter an address or an intersection' type='text' />
</p>
<p>
<label>
within
@derekeder
derekeder / gist:7438001
Created November 12, 2013 20:23
Zija Events date format
displayList: function(json) {
MapsLib.handleError(json);
var data = json["rows"];
var template = "";
var results = $("#results_list");
results.hide().empty(); //hide the existing list and empty it out first
if (data == null) {
//clear results list
@derekeder
derekeder / maps_lib_distance_matrix.js
Created June 19, 2013 21:31
Using Fusion Tables API with Google Distance Matrix API. This code is meant to be added to maps_lib.js
queryPointDistances: function(whereClause) {
MapsLib.query("'latitude', 'longitude'", whereClause,"MapsLib.getPointDistances");
},
getPointDistances: function(json) {
MapsLib.handleError(json);
var data = json["rows"];
var destinations = [];
var service = new google.maps.DistanceMatrixService();
@derekeder
derekeder / gist:5346183
Created April 9, 2013 14:37
If you'd like to disable the address search functionality from the Searchable Map Template (https://github.com/derekeder/FusionTable-Map-Template), wrap the address and radius fields in a div with display:none.
<div style='display:none;'>
<h4>
Address <small>(<a id='find_me' href='#'>find me</a>)</small>
</h4>
<input class='input-block-level' id='search_address' placeholder='Enter an address or an intersection' type='text' />
<label>
within
<select class='input-small' id='search_radius'>
<option value='400'>2 blocks</option>
<option value='805'>1/2 mile</option>
@derekeder
derekeder / gist:4601208
Created January 23, 2013 02:07
my .gitconfig file
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold