bradbeattie / api.iscanadafair.ca Goto Github PK
View Code? Open in Web Editor NEWA relational database and accompanying API of Canadian parliamentary data
Home Page: https://api.iscanadafair.ca
A relational database and accompanying API of Canadian parliamentary data
Home Page: https://api.iscanadafair.ca
Most sittings actually have two videos (the entirety and the debates), and a few split events have been identified and confirmed by [email protected].
I can't currently search like names__contains=prévoyant
, but instead have to search like names__contains=pr\u00e9voyant
. Should be possible to JSON-encode contains, startswith, and endswith queries. Regex queries not so much, I predict.
http://www.parl.gc.ca/Committees/en/Home
Though maybe a touch out of scope.
http://parlvu.parl.gc.ca/XRender/en/View/Year/20170505/-1
Not sure how this would map to existing data. Sittings are the closest "per day" object we have, but I think that ParlVu also has committee meetings and the like. Are those considered part of a sitting? Unclear...
I think this one has to do with some ridings having multiple candidates in older elections. If we're naively summing up ballots per candidate as our total valid ballots sum, those ballots will be erroneously considered multiple times.
Currently just pulled in through chamber votes, but I think this process should be augmented if not replaced by http://www.parl.gc.ca/Committees/en/List?parl=42&session=1
Indeed, we can get a list of all committee meetings through http://www.parl.gc.ca/Committees/en/FilteredMeetings?meetingDate=2017-05-03 instead of indirectly through ParlVu. Err, maybe not: "Meetings from previous sessions are accessible on the Meetings page of a particular committee.".
Birthdays, session sittings, parlvu videos, etc.
It seems the new XML format is missing the vote number. For example, http://www.ourcommons.ca/Parliamentarians/en/HouseVotes/ExportVotes?output=XML has its last entry as the following.
<VoteParticipant><ParliamentNumber>42</ParliamentNumber><SessionNumber>1</SessionNumber><DecisionEventDateTime>2017-05-15T00:00:00</DecisionEventDateTime><DecisionResultName>Agreed To</DecisionResultName><DecisionDivisionNumber>275</DecisionDivisionNumber><DecisionDivisionSubject>Motion respecting Senate amendments to Bill C-37, An Act to amend the Controlled Drugs and Substances Act and to make related amendments to other Acts</DecisionDivisionSubject><DecisionDivisionNumberOfYeas>173</DecisionDivisionNumberOfYeas><DecisionDivisionNumberOfNays>112</DecisionDivisionNumberOfNays><DecisionDivisionNumberOfPaired>0</DecisionDivisionNumberOfPaired><BillNumberCode>C-37</BillNumberCode><Yea>0</Yea><Nay>0</Nay><Paired>0</Paired></VoteParticipant>
Note that it's the 274th entry in the list, despite being named Vote No. 275 (http://www.ourcommons.ca/Parliamentarians/en/votes).
The old version had the vote number. I've contacted [email protected] to see about fixing this. After it's fixed, I'll reintroduce the data.
At the moment, it's built with a "fetch once and never come back" approach. Fortunately, the fetch_url commands should respect the appropriate index vs detail refetches. But we shouldn't have to go back through more than the last two parliaments for each data source, keeping performance acceptable.
Will need to make use of https://github.com/alanjds/drf-nested-routers as some relationships are quite wide (party to sitting-vote-participant, for example).
Doesn't currently have examples on how to search and filter.
https://en.wikipedia.org/wiki/Category:Canadian_federal_electoral_districts
I tried this once already and ran into mapping issues. Might be worth a second shot.
HARVIE, John
General Election 6 (1887-02-22), Ontario: TORONTO CENTRE, HARVIE, John
General Election 41 (2011-05-02), Manitoba: WINNIPEG NORTH, HARVIE, John
Thought that didn't happen, but
and this is messing up the fetch_parliament.py script.
Doesn't display too well on mobile.
Highlight.js
Some fields (e.g. chamber) are positivesmallintergerfields. But when we serialise them, we're showing the verbose display instead of the int. So shouldn't we be able to filter by those display names?
e.g. http://www.elections.ca/Scripts/vis/Profile?L=e&ED=13001&EV=99&EV_TYPE=6&PROV=CA&PROVID=99&QID=-1&PAGEID=29 "Major census subdivisions (municipalities)"
Eaisest solution would be to augment each riding with their shape file weighted centres and then to search on point distance.
http://geogratis.gc.ca/api/en/nrcan-rncan/ess-sst/56124851-71fc-4f94-8df2-40f59cd1dd46.html
34th through 42nd are already done.
http://www.elections.ca/scripts/vis/FindED?L=e&PAGEID=20
http://www.elections.ca/Scripts/vis/Profile?L=e&ED=59039&EV=99&EV_TYPE=6&PROV=BC&PROVID=59&QID=-1&PAGEID=29
http://www.elections.ca/Scripts/vis/Map?L=e&ED=59039&EV=99&EV_TYPE=6&PROV=BC&PROVID=59&QID=-1&PAGEID=27
Has some interesting data like riding area (km^2) and adjacent ridings. Most likely limited to the most recent election or few.
Very likely the same person:
IACONO, Angelo
General Election 42 (2015-10-19), Quebec: ALFRED-PELLAN, IACONO, Angelo
IACONO, Angelo G.
General Election 41 (2011-05-02), Quebec: ALFRED-PELLAN, IACONO, Angelo G.
HALICKI, Stephen
General Election 38 (2004-06-28), Ontario: YORK SOUTH--WESTON, HALICKI, Stephen
HALICKI, Steve
General Election 39 (2006-01-23), Ontario: YORK SOUTH--WESTON, HALICKI, Steve
Same last name, timeframes that match up, but significantly different first names:
HOLTON, Edward
By-Election of 1880-04-17, Quebec: CHÂTEAUGUAY, HOLTON, Edward
General Election 5 (1882-06-20), Quebec: CHÂTEAUGUAY, HOLTON, Edward
General Election 6 (1887-02-22), Quebec: CHÂTEAUGUAY, HOLTON, Edward
HOLTON, Hon. Luther Hamilton
General Election 1 (1867-09-20), Quebec: CHÂTEAUGUAY, HOLTON, Hon. Luther Hamilton
General Election 2 (1872-10-12), Quebec: CHÂTEAUGUAY, HOLTON, Hon. Luther Hamilton
General Election 3 (1874-01-22), Quebec: CHÂTEAUGUAY, HOLTON, Hon. Luther Hamilton
General Election 4 (1878-09-17), Quebec: CHÂTEAUGUAY, HOLTON, Hon. Luther Hamilton
GODIN, Jason
General Election 42 (2015-10-19), New Brunswick: ACADIE--BATHURST, GODIN, Jason
GODIN, Yvon
General Election 36 (1997-06-02), New Brunswick: ACADIE--BATHURST, GODIN, Yvon
General Election 37 (2000-11-27), New Brunswick: ACADIE--BATHURST, GODIN, Yvon
General Election 38 (2004-06-28), New Brunswick: ACADIE--BATHURST, GODIN, Yvon
General Election 39 (2006-01-23), New Brunswick: ACADIE--BATHURST, GODIN, Yvon
General Election 40 (2008-10-14), New Brunswick: ACADIE--BATHURST, GODIN, Yvon
General Election 41 (2011-05-02), New Brunswick: ACADIE--BATHURST, GODIN, Yvon
GILLMOR,
General Election 2 (1872-10-12), New Brunswick: CHARLOTTE, GILLMOR,
General Election 3 (1874-01-22), New Brunswick: CHARLOTTE, GILLMOR,
General Election 4 (1878-09-17), New Brunswick: CHARLOTTE, GILLMOR,
General Election 5 (1882-06-20), New Brunswick: CHARLOTTE, GILLMOR,
General Election 6 (1887-02-22), New Brunswick: CHARLOTTE, GILLMOR,
General Election 7 (1891-03-05), New Brunswick: CHARLOTTE, GILLMOR,
General Election 8 (1896-06-23), New Brunswick: CHARLOTTE, GILLMOR,
GILLMOR, Daniel
General Election 10 (1904-11-03), New Brunswick: CHARLOTTE, GILLMOR, Daniel
So what can realistically be done about this? Unsolved, we have a lot of fragmented person records. But I'd rather not go through each and every one and try to make a judgement call. It's just that without defragging these records, we can't do proper analysis of when candidates come and go.
Bokeh
seaborn
d3js bridge?
C'est totalement en anglais actuellement.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.