These commands are all run within the psql
command line tool.
Create table for tax year 2013 data
CREATE TABLE tx_2013 (
Acct_Num varchar(9),
Address text,
Unit text,
Homestd_Ex text,
Prop_Cat text,
#parcelswtax { | |
polygon-opacity: 0.8; | |
[tax_change > 4] { polygon-fill: #7F0000 } | |
[tax_change > 2][tax_change <= 4] { polygon-fill: #B2182B } | |
[tax_change > 1][tax_change <= 2] { polygon-fill: #D6604D } | |
[tax_change > .5][tax_change <= 1] { polygon-fill: #F4A582 } | |
[tax_change > .1] [tax_change <= .5] { polygon-fill: #FDDBC7 } | |
[tax_change >= -.1][tax_change <= .1] { polygon-fill: #777 } | |
[tax_change < -.1] [tax_change > -.5] { polygon-fill: #bedef0 } |
These commands are all run within the psql
command line tool.
Create table for tax year 2013 data
CREATE TABLE tx_2013 (
Acct_Num varchar(9),
Address text,
Unit text,
Homestd_Ex text,
Prop_Cat text,
axis.Views.ArticleContainer = Backbone.View.extend({ | |
tagName: 'div', | |
className: 'row article-container view', | |
initialize: function() { | |
this.template = _.template($('#single-article-container-template').html()); | |
this.article = new axis.Views.Article({model: this.model}); | |
this.sidebar = new axis.Views.ArticleSidebar({model: this.model}); | |
}, |
[ { title: 'General Requirements', | |
url: 'https://secure.phila.gov/ECONTRACT/Documents/frmPDFWindow.aspx?docid=211210011552020211210011621271N&ext=xlsx' }, | |
{ title: 'IT Requirements', | |
url: 'https://secure.phila.gov/ECONTRACT/Documents/frmPDFWindow.aspx?docid=211210011552020211210011622021N&ext=xlsx' }, | |
{ title: 'Open ended Questions', | |
url: 'https://secure.phila.gov/ECONTRACT/Documents/frmPDFWindow.aspx?docid=211210011552020211210011622401N&ext=docx' }, | |
{ title: 'Shared IT Infrastructure', | |
url: 'https://secure.phila.gov/ECONTRACT/Documents/frmPDFWindow.aspx?docid=211210011552020211210011623391N&ext=docx' }, | |
{ title: 'RFP Proposal', | |
url: 'https://secure.phila.gov/ECONTRACT/Documents/frmPDFWindow.aspx?docid=211210011552020211210011624271N&ext=pdf' }, |
[ { title: 'OEO Solicitation for Participation Form', | |
url: 'https://secure.phila.gov/ECONTRACT/Documents/frmPDFWindow.aspx?docid=211209241237530211209241318291N&ext=xlsx' }, | |
{ title: 'Appendix I', | |
url: 'https://secure.phila.gov/ECONTRACT/Documents/frmPDFWindow.aspx?docid=211209241237530211209241631401N&ext=pdf' }, | |
{ title: 'Appendix J', | |
url: 'https://secure.phila.gov/ECONTRACT/Documents/frmPDFWindow.aspx?docid=211209241237530211209241632401N&ext=pdf' }, | |
{ title: 'Lobbying Software RFP Proposal', | |
url: 'https://secure.phila.gov/ECONTRACT/Documents/frmPDFWindow.aspx?docid=211209241237530211209251056121N&ext=pdf' }, | |
{ title: 'Appendix D', | |
url: 'https://secure.phila.gov/ECONTRACT/Documents/frmPDFWindow.aspx?docid=211209241237530211209261052471N&ext=xlsx' } ] |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.css" /> | |
<!--[if lte IE 8]> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.ie.css" /> | |
<![endif]--> | |
<title>USA Leaflet Demo</title> | |
<style type="text/css"> |
app.get('/home/:foo', function(req, res){ | |
res.redirect('/state/' + req.params.foo); | |
}); | |
app.get('/state/:name', function(req, res){ | |
res.send(req.params.name); | |
}); |
2012-06-15T15:55:32+00:00 app[web.1]: | |
2012-06-15T15:55:32+00:00 app[web.1]: /app/server.js:34 | |
2012-06-15T15:55:32+00:00 app[web.1]: connect.router(function(app) { | |
2012-06-15T15:55:32+00:00 app[web.1]: ^ | |
2012-06-15T15:55:32+00:00 app[web.1]: TypeError: Object function createServer() { | |
2012-06-15T15:55:32+00:00 app[web.1]: function app(req, res){ app.handle(req, res); } | |
2012-06-15T15:55:32+00:00 app[web.1]: app.route = '/'; | |
2012-06-15T15:55:32+00:00 app[web.1]: utils.merge(app, proto); | |
2012-06-15T15:55:32+00:00 app[web.1]: utils.merge(app, EventEmitter.prototype); | |
2012-06-15T15:55:32+00:00 app[web.1]: app.use(arguments[i]); |
https.get({ | |
host: 'api.cloudmine.me', | |
headers: {'X-CloudMine-ApiKey': CM_KEY}, | |
path: '/v1/app/' + CM_APP + '/text?keys=' + req.params.email | |
}, function(cmres) { | |
res.attachment('test.csv'); | |
cmres.on('data', function(chunk) { | |
data += chunk; | |
// do some stuff to data | |
}).on('end', function() { |
Run the code below here: https://scraperwiki.com/scrapers/new/python?template=advanced-scraping-pdfs# | |
import scraperwiki | |
import urllib2 | |
import lxml.etree | |
url = "http://www.phila.gov/ethicsboard/pdfs/lobbying%20registrations%20through%201.27.12_lobbyists.pdf" | |
pdfdata = urllib2.urlopen(url).read() | |
print "The pdf file has %d bytes" % len(pdfdata) |