Categories
Issues

All the times Regan voted with Harper and against Leslie in the last Parliament

This is a draft from Sep. 5, 2015. Links may be broken.

csv voting records are available at http://www.parl.gc.ca/Parliamentarians/en/members by clicking on the member and then on “Work” and then “All votes by this Member.” You can see the link I used for Megan Leslie at http://www.parl.gc.ca/Parliamentarians/en/members/Megan-Anissa-Leslie(58550)/Votes, in the Export: CSV link. That file was renamed Leslie41parl2session.csv.

regan41parl2session <- read.csv("Regan41parl2session.csv", header = TRUE)
leslie41parl2session <- read.csv("Leslie41parl2session.csv", header = TRUE)
harper41parl2session <- read.csv("Harper41parl2session.csv", header = TRUE)

leslieSmall <- data.frame(leslie41parl2session$Vote.Number, leslie41parl2session$Member.s.Vote)
reganSmall <- data.frame(regan41parl2session$Vote.Number, regan41parl2session$Member.s.Vote)
harperSmall <- data.frame(harper41parl2session$Vote.Number, harper41parl2session$Member.s.Vote)

names(leslieSmall)[1] <- "Vote.Number"
names(reganSmall)[1] <- "Vote.Number"
names(harperSmall)[1] <- "Vote.Number"

smallMerge <- merge(leslieSmall, reganSmall, by="Vote.Number")
smallMerge <- merge(smallMerge, harperSmall, by="Vote.Number")

smallMerge now contains all of Leslie, Regan, and Harper’s votes for the most recent Parliament – that is, all the ones in which all three voted. Let’s take a look at the ones in which Leslie and Regan voted differently, but Regan voted with Harper.

L_Diff_R_H_Same <- smallMerge$Vote.Number[smallMerge$leslie41parl2session.Member.s.Vote !=     
                         smallMerge$regan41parl2session.Member.s.Vote
                       & smallMerge$harper41parl2session.Member.s.Vote == 
                         smallMerge$regan41parl2session.Member.s.Vote]

L_Diff_R_H_Same
##  [1]  11  71  93 146 147 170 173 174 180 185 190 201 203 240 242 277 279
## [18] 281 282 291 313 314 319 367 456 461 464

It’s a bit more readable to get the subject headings for those votes; note that the indices reported below are local to the vector. The subjects correspond, in order, to the vote numbers above.

leslie41parl2session[leslie41parl2session$Vote.Number %in% L_Diff_R_H_Same, 
                     6]
##  [1] Opposition Motion (Keystone XL pipeline)                                                                                                                                                                                                                                                                   
##  [2] 2nd reading of Bill C-504, An Act to amend the Canada Labour Code (volunteer firefighters)                                                                                                                                                                                                                 
##  [3] 2nd reading of Bill C-20, An Act to implement the Free Trade Agreement between Canada and the Republic of Honduras, the Agreement on Environmental Cooperation between Canada and the Republic of Honduras and the Agreement on Labour Cooperation between Canada and the Republic of Honduras             
##  [4] Government Business No. 10 (Extension of sitting hours and conduct of extended proceedings) (amendment)                                                                                                                                                                                                    
##  [5] Government Business No. 10 (Extension of sitting hours and conduct of extended proceedings)                                                                                                                                                                                                                
##  [6] Bill C-31, An Act to implement certain provisions of the budget tabled in Parliament on February 11, 2014 and other measures (report stage amendment)                                                                                                                                                      
##  [7] Bill C-31, An Act to implement certain provisions of the budget tabled in Parliament on February 11, 2014 and other measures (report stage amendment)                                                                                                                                                      
##  [8] Bill C-31, An Act to implement certain provisions of the budget tabled in Parliament on February 11, 2014 and other measures (report stage amendment)                                                                                                                                                      
##  [9] Bill C-31, An Act to implement certain provisions of the budget tabled in Parliament on February 11, 2014 and other measures (report stage amendment)                                                                                                                                                      
## [10] Bill C-31, An Act to implement certain provisions of the budget tabled in Parliament on February 11, 2014 and other measures (report stage amendment)                                                                                                                                                      
## [11] Concurrence in an opposed item                                                                                                                                                                                                                                                                             
## [12] 3rd reading and adoption of Bill C-20, An Act to implement the Free Trade Agreement between Canada and the Republic of Honduras, the Agreement on Environmental Cooperation between Canada and the Republic of Honduras and the Agreement on Labour Cooperation between Canada and the Republic of Honduras
## [13] Motion to adjourn the House                                                                                                                                                                                                                                                                                
## [14] Bill C-13, An Act to amend the Criminal Code, the Canada Evidence Act, the Competition Act and the Mutual Legal Assistance in Criminal Matters Act (report stage amendment)                                                                                                                                
## [15] Concurrence at report stage of Bill C-13, An Act to amend the Criminal Code, the Canada Evidence Act, the Competition Act and the Mutual Legal Assistance in Criminal Matters Act                                                                                                                          
## [16] Bill C-18, An Act to amend certain Acts relating to agriculture and agri-food (report stage amendment)                                                                                                                                                                                                     
## [17] Concurrence at report stage of Bill C-18, An Act to amend certain Acts relating to agriculture and agri-food                                                                                                                                                                                               
## [18] First Report of the Standing Committee on Agriculture and Agri-Food (amendment)                                                                                                                                                                                                                            
## [19] First Report of the Standing Committee on Agriculture and Agri-Food                                                                                                                                                                                                                                        
## [20] Opposition Motion (Proportional representation)                                                                                                                                                                                                                                                            
## [21] Bill C-44, An Act to amend the Canadian Security Intelligence Service Act and other Acts (report stage amendment)                                                                                                                                                                                          
## [22] Concurrence at report stage of Bill C-44, An Act to amend the Canadian Security Intelligence Service Act and other Acts                                                                                                                                                                                    
## [23] 3rd reading and adoption of Bill C-44, An Act to amend the Canadian Security Intelligence Service Act and other Acts                                                                                                                                                                                       
## [24] Government Business No. 17 (Military contribution against ISIL) (amendment)                                                                                                                                                                                                                                
## [25] 3rd reading and adoption of Bill S-7, An Act to amend the Immigration and Refugee Protection Act, the Civil Marriage Act and the Criminal Code and to make consequential amendments to other Acts                                                                                                          
## [26] Ways and Means motion No. 25                                                                                                                                                                                                                                                                               
## [27] Motion to concur in the 21st Report of the Standing Committee on Procedure and House Affairs (motion M-489, Election of the Speaker)                                                                                                                                                                       
## 322 Levels: [number \x96 one to ten in letters, others in numbers with st,rd,th] Report of the [Committee Name] ...
Categories
Issues

Ask your Ward 13 candidate

Before you vote on Monday, please find out what your preferred candidate for Ward 13 will do about affordable housing. I believe it can’t be solved any time soon if we don’t take strong action against reseller websites.

A vote for Darren Abramson means a vote for Toronto city action that goes at least as far as Vancouver’s actions.

What will you do about Airbnb taking units from residents and driving up rent?

  • contact@kristynwongtam.ca
  • info@aftabkhuram.com
  • contact@joncallegher.com
  • jrforget@live.ca
  • team@timfortoronto.com
  • ward13@john-jeffery.com
  • walied@votewalied.ca
  • team@gladyslarbie.ca
  • votebarbaralavoieward13@gmail.com
  • hello@ryanlester.ca
  • voteforperez@hotmail.com
  • smithermantoronto@gmail.com
  • votejordanstone@gmail.com
  • Lucy@NeighbourhoodsFirst.ca
  • info@megannwillson.ca
  • rob.wolvin@gmail.com
Categories
Issues

Violent crime is decreasing,
but is way worse than the early 60s

Rplot

Source

Consider the following terrible visualization:

Screen Shot 2016-07-23 at 8.21.49 PM

Source

Here are some serious problems with the presentation of data here:

  1. Having a statistic hovering around at around 10 times the differences of the important numbers makes them look small and insignificant.
  2. One scale applies to percentage of the population and another to year over year change.
Categories
Computer Issues

Exploring myweb.dal.ca

I received this from my University admin two days ago  — the “reply” address for this email is not monitored.

adminEmail

I’ve written a short bit of python and given instructions for archiving myweb.dal.ca content — it’s up to you to supply URL(s) to the script.

Categories
Data Science Issues

New York Primary: Google Trends

Categories
Computer Issues

Google Instant Upload’s Nag:
“Make That Photo Public”

Apparently, this has been loudly complained about from at least Aug. 27, 2011 through as late as Sep. 15, 2013:

http://productforums.google.com/forum/#!topic/google-plus-discuss/JolYBcJmzWs

The successor function.
g + 1 = S(g)

Edit:

In Canada, it turns out that we even own photos we took for someone else.

Why you want to mess with my photos, Google?

Categories
Computer Issues

Get Rich, Quick! A Guide For The Watchers

It's OK, I only recognized Martha Stewart, also.
Quick — name these
famous insider traders!

There’s all kinds of things that bother me about the recent coverage of the NSA surveillance issues. For example, us Canadians have known about it forever — that’s why our Universities have had policies against allowing student data to be transmitted to servers in the States since the Patriot Act was first passed.

Now, as my man PK reminded us recently, knowing something that will be public a tiny bit before other people find out can be extremely valuable.

So why hasn’t anyone pointed out that those in the know could be making money hand over fist, with almost no chance of getting caught, in a socially destructive way? Isn’t this at least as worrisome as the potential blackmail/panopticon effect on democracy/selective harassment issues?

Categories
Computer Issues

How To Autopost From WordPress to Google+

Short answer:

you don’t.

“At present Google+ API (released in September 2011) provides read-only access to public data, hence posts only go one way.”

If you read the reviews for the hacky WP extension mentioned there, you discover that it’s totally broken. In the words of a reviewer as of April 2013,

“This worked one time, several months ago, and since then has failed every time. This may not be the fault of the developer, but of Google, who closed the option to post that was exploited by this plugin (not positive that’s the case, but it DID work one time for me).”

Wuh?

There are tons of elegant plugins, with full API support for pushing WP content to your Facebook profile. Isn’t this a barrier to Google+ adoption, or at least a drag on its traction? Or is the Google juggernaut powerful enough to get people to post there natively/manually?