This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Results by county: | |
| https://www.google.com/fusiontables/api/query?sql=SELECT+'DistrictName-en'%2C+NumVoters%2C+NumBallotBoxes%2C+NumCountedBallotBoxes%2C+'VoteCount-Paul'%2C+'VoteCount-Bachmann'%2C+'VoteCount-Johnson'%2C+'VoteCount-Gingrich'%2C+'VoteCount-Santorum'%2C+'VoteCount-Huntsman'%2C+'VoteCount-Other'%2C+'VoteCount-Roemer'%2C+'VoteCount-Romney'%2C+'VoteCount-Perry'%2C+'VoteCount-Cain'+FROM+2475414+ORDER+BY+'DistrictName-en' | |
| # Candidate totals for the entire state: | |
| https://www.google.com/fusiontables/api/query?sql=SELECT+SUM('NumVoters')%2C+SUM('NumBallotBoxes')%2C+SUM('NumCountedBallotBoxes')%2C+SUM('VoteCount-Paul')%2C+SUM('VoteCount-Bachmann')%2C+SUM('VoteCount-Johnson')%2C+SUM('VoteCount-Gingrich')%2C+SUM('VoteCount-Santorum')%2C+SUM('VoteCount-Huntsman')%2C+SUM('VoteCount-Other')%2C+SUM('VoteCount-Roemer')%2C+SUM('VoteCount-Romney')%2C+SUM('VoteCount-Perry')%2C+SUM('VoteCount-Cain')+FROM+2475414 | |
| # Sorted by Patchwork Nation Community type (from a merged table I made with the Iowa results): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Note: Table number goes in place of TTTTTTT: | |
| https://www.google.com/fusiontables/api/query?sql=SELECT+'PN-Community-Type'%2C+'PN-Community-Type'%2C+'Precincts_Total'%2C+'Precincts_Reporting'%2C+'VoteCount-Bachmann'%2C+'VoteCount-Cain'%2C+'VoteCount-Gingrich'%2C+'VoteCount-Huntsman'%2C+'VoteCount-Johnson'%2C+'VoteCount-Paul'%2C+'VoteCount-Perry'%2C+'VoteCount-Romney'%2C+'VoteCount-Santorum'%2C+'UnitName'%2C+'FIPSCode'+FROM+TTTTTTT+WHERE+'FIPSCode'+>+0+ORDER+BY+FIPSCode+ASC&jsonCallback=? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var overview; | |
| var overview_query_url = "https://www.google.com/fusiontables/api/query?sql=SELECT+PNCommunityType%2C+SUM('NumVoters')%2C+SUM('NumBallotBoxes')%2C+SUM('NumCountedBallotBoxes')%2C+SUM('VoteCount-Paul')%2C+SUM('VoteCount-Bachmann')%2C+SUM('VoteCount-Johnson')%2C+SUM('VoteCount-Gingrich')%2C+SUM('VoteCount-Santorum')%2C+SUM('VoteCount-Huntsman')%2C+SUM('VoteCount-Other')%2C+SUM('VoteCount-Roemer')%2C+SUM('VoteCount-Romney')%2C+SUM('VoteCount-Perry')%2C+SUM('VoteCount-Cain')+FROM+2486515&jsonCallback=?"; | |
| function refreshData() { | |
| // Hit the Google Fusion Table | |
| $.getJSON(overview_query_url, function(data) { | |
| overview = data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://www.google.com/fusiontables/api/query?sql=SELECT+PNCommunityType%2C+SUM('NumVoters')%2C+SUM('NumBallotBoxes')%2C+SUM('NumCountedBallotBoxes')%2C+SUM('VoteCount-Paul')%2C+SUM('VoteCount-Bachmann')%2C+SUM('VoteCount-Johnson')%2C+SUM('VoteCount-Gingrich')%2C+SUM('VoteCount-Santorum')%2C+SUM('VoteCount-Huntsman')%2C+SUM('VoteCount-Other')%2C+SUM('VoteCount-Roemer')%2C+SUM('VoteCount-Romney')%2C+SUM('VoteCount-Perry')%2C+SUM('VoteCount-Cain')+FROM+2486515&jsonCallback=foo | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <iframe frameborder="0" height="500" scrolling="no" src="http://dl.dropbox.com/u/466610/nevada_map/index.html" width="460"></iframe> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="DV-viewer-392162-national-federation-of-independent-business-et" class="DV-container"></div> | |
| <script src="http://s3.documentcloud.org/viewer/loader.js"></script> | |
| <script> | |
| DV.load("http://www.documentcloud.org/documents/392162-national-federation-of-independent-business-et.js", { | |
| width: 600, | |
| height: 800, | |
| sidebar: false, | |
| container: "#DV-viewer-392162-national-federation-of-independent-business-et" | |
| }); | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From Google: | |
| <iframe width="640" height="480" src="http://www.youtube.com/embed/Z4Nkw4nqigU" frameborder="0" allowfullscreen></iframe> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <iframe src="http://project.wnyc.org/news-maps/hurricane-zones/hurricane-zones-mini.html" height="700" width="560" scrolling="no" frameborder="0"></iframe> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 'jkeefe.nyc-district-revised' is the mapbox.js name for the data I made in TileMill which | |
| // resides here: https://tiles.mapbox.com/jkeefe/map/nyc-district-revised#12.00/40.7223/-73.9112 | |
| // 'jkeefe.map-bz4e2who' is the mapbox.js name for a map I made at mapbox.com. It's just a | |
| // Mapbox Streets layer I tinkered with to make the streets have opacity (alpha) of 53. | |
| // It lives here: https://tiles.mapbox.com/jkeefe/map/map-bz4e2who#14.00/40.7227/-73.9904 | |
| // The rest of this code I learned from the mapbox.js documentation: http://mapbox.com/mapbox.js/api/v0.6.7/ | |
| // Code: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # load foreign package | |
| library("foreign", lib.loc="/Library/Frameworks/R.framework/Versions/2.15/Resources/library") | |
| # set working directory | |
| setwd("/Volumes/JK-Spinner/Dropbox/Coding/r/stop-frisk-delta") | |
| ## To get the .por file into R, I turned on the "foreign" package | |
| data2011<-read.spss("2011.por") | |
| #check to see field names |