Dice Binning Calculator

elections, reform, hacks, open source, berkeley, friends, research, policy, usability

This is probably most interesting to the election officials out there. (although I point out a few points of academic interest at the end)

n a quick calculator based on the Cordero, Wagner and Dill paper (the 10-sided dice paper) that election officials can use to produce "bins" of random numbers for manual tally spreadsheets. That is, say you have to choose one of 13 precincts, but if you use 2 dice and just read the numbers off as corresponding to the precinct number, you might be rolling for a while. This calculator will produce ranges (or "bins") to help you optimize your dice rolling. To use it, you enter the number of dice you'll be using and the number of precincts (or units, whatever) that you have to select. The program will output bins so that you don't have to roll the dice as much. It also has a mode that allows for easy copying and pasting into a column of a spreadsheet.

Comments, patches, etc. welcome.

Why did I do this? Can't you just roll dice without binning? Well, to give you some perspective, it took us 30-45 minutes in November of last year to select 20 precincts for San Mateo County's manual tally. We did a lot of re-rolling. In fact, we got so frustrated at having to reroll so much that we started to make up rules (one die would be even-odd, one would be divide-by-3, etc.). I realized that this frustration was actually dangerous for the random selection as it injects a good deal of ad-hockery into a security-relevant process. I can imagine that it might also be useful as we start to do larger selections in more rigorous manual tallies.

A few interesting comments:

  • The tool defaults to 2 dice and 13 precincts. This is an interesting case because 1) you would normally have to reroll 87% of the time and 2) with a number of precincts that is a prime, it's difficult to calculate these bins in one's head (it is for me).

  • If you input 3 dice and 501 precincts, you see that you'll have to reroll roughly 50% of the time:

    you add one more die (for 4 die total), it drops the number of rerolls by a factor of 10 to roughly 5%. To do this in practice, you'd want a forth die along with the recommended red-white-blue set of three... I suggest a clear die.

  • Here's what LA would have to do with 4 die and 4766 precincts and it gets them a ~5% reroll rate (with no bins, 4 dice would have a ~52% reroll rate for LA):

Quick one-liner to export from a DB to CSV

hacks

We recently received some data in an sqldump that we wanted in CSV format.

Here's how you can use sed to tranform it into CSV (from here). This should all be one line...

mysql -u user -p dbname -B -e "SELECT * from table;" | 
sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > filename.csv

Henry Jenkins: "Combating the Participation Gap: Why New Media Literacy Matters"

open source, berkeley, friends, research, policy, podcasts, education, iSchool

Link: http://groups.sims.berkeley.edu/podcast/audio/Henry_Jenkins_UCiSchool_06Feb2008.mp3

Henry Jenkins speaking Henry Jenkins is the Co-Director of the MIT Comparative Media Studies Program and the Peter de Flores Professor of Humanities. On Wednesday, February 6th, 2008, Professor Jenkins spoke at the UC Berkeley School of Information as part of the Distinguished Lecture Series.

The audio for this lecture, titled ?Combating the Participation Gap: Why New Media Literacy Matters,? is available here.

The abstract for his talk was:

According to recent studies by the Pew Center on the Internet And American Life, more than half of American teens online have produced media content and about a third have circulated media that they have produced beyond their immediate friends and family. These statistics reflect the growing importance of participatory culture in the everyday lives of American young people. Work across a range of disciplines suggest that these emerging forms of participatory culture are important sites for informal learning and may be the crucible out of which new conceptions of civic engagement are emerging. Drawing on insights from a recent white paper produced for the MacArthur Foundation, this talk will discuss the need to develop new forms of media literacy pedagogy which reflects this context of a participatory culture, materials which both respond to the ethical challenges confronted by those teens who are already producing and circulating their own media as well as the challenges confronting those youth who are excluded from participation in these on-line worlds as a consequence of lack of access to technologies, skills, competencies, and cultural experiences taken for granted by their contemporaries. These issues can not be understood through a simple opposition between digital natives and digital immigrants, but rather require us to dig deeper into the diverse range of experiences young people have online and the range of different interactions between adults and teens in these new participatory culture. In the course of the presentation, I will be sharing a range of curricular materials and activities being developed by MIT?s Project nml to support the teaching of these new social skills and cultural competencies.

His bio:

Henry Jenkins is the Co-Director of the MIT Comparative Media Studies Program and the Peter de Flores Professor of Humanities. He is also the author and/or editor of twelve books on various aspects of media and popular culture, including Convergence Culture: Where Old and New Media Collide, Fans, Bloggers and Gamers: Exploring Participatory Culture, The Wow Climax: Tracing the Emotional Impact of Popular Culture, Textual Poachers: Television Fans and Participatory Culture, Hop on Pop: The Politics and Pleasures of Popular Culture, and From Barbie to Mortal Kombat: Gender and Computer Games. Jenkins writes regularly about media and cultural change at his blog, henryjenkins.org. He is one of the principal investigators for The Education Arcade, a consortium of educators and business leaders working to promote the educational use of computer and video games and of the Knight Center for Future Civic Media, a joint effort with the MIT Media Lab to use new media to enhance how people live in local communities. He is one of the principle investigators for GAMBIT, a lab focused on promoting experimentation through game design, and of Project nml, a MacArthur Foundation funded project that develops curricular materials focused on promoting the social skills and cultural competencies needed to become a full participant in the new media era. Jenkins has a MA in Communication Studies from the University of Iowa and a PhD in Communication Arts from the University of Wisconsin-Madison.

Random Thoughts 20080210

wtf?
  • The NAU Department of Physics and Astronomy is looking for a replacement telescope for their department (from which I graduated in 2000). If you have $50,000 and want your name on a sweet Ritchey-Chretien Telescope (or, for $500, in it!), call the department of physics and astronomy there and ask for David Cornelison.

  • I upgraded to Mac OS X Leopard...

    • ... pretty damn painless.
    • I used the "Erase and Install" method with the Migration Assistant.
    • I'll still need to look through my old /usr/local/ for good stuff that I might need that wasn't copied by Migration Assistant.
    • I decided to fork out $20 for SteerMouse in order to consolidate my 2-3 dorky mouse drivers into one slick preference pane.
  • Check out Perian... an open-source QuickTime plugin that plays things QuickTime doesn't... like FLV. (FLV is "flash video", what YouTube and many other online video sites use.) They have a video that shows how to download a movie from YouTube and play it in QuickTime with Perian. Cool.

  • When Anonymous is done with Scientology, maybe they can take on a global campaign against the Fauxhawk? People, it's not cool. (I should talk with my Ulysses S. Grant facial hair.)

  • Went down to LA for the ABA panel at the Beverly Wilshire hotel. Nice place... felt a bit strange riding up in a cab next to a new Ferarri, Bentley and a Maserati. Good event, though. Dean Logan and Freddie Oakley are wonderful election administrators with lots of wisdom and plenty of funny stories.

    Incidentally, the panel was over at 5p and I had three hours until my 7p flight. I figured I might as well make my way to the airport anyway. I happened to get one of the coolest LA cab drivers, ever. He knew a "shortcut" that would take more miles but would get us to LAX much faster than the freeways... so we agreed on a price and he turned the meter off. What ensued was the wildest ride through the alleys of Los Angeles that I had ever been on. He even ran over a nail at one point. He felt the nail in his tire and made sure to not knock it out so we could make my plane without a flat. Very interesting character... and, I'm not about to tell you who he is (apparently, he doesn't take calls; he has a regular clientèle that keeps him occupied from 5a-5p everyday).

Feb. 5, 2008 Presidential Primary at Precinct 225400

elections, accessibility, news, privacy, photos, friends, research, policy

Feb. 5 2008 election pin for Alameda Co. On Tuesday I was a poll inspector at Alameda County precinct 225400. Since I am moving after I get my degree, this will likely be the last time I'll able to serve. This was the second time that I've served as the poll inspector this precinct in Oakland, CA. (The first was in November 2006.)

In the previous write-up, I explained a lot about the general working of our polling place. I won't repeat that kind of material here. I will describe the differences between the 2006 experience and this one and comment on parts of this election that stood out.

First, as I mentioned in a previous post, I was sick. In fact, I think I had the flu. This made running the polling place much, much more difficult as my mind wasn't entirely functional.

Another difference was that I brought my digital camera. I wanted to be able to take pictures of things I thought were interesting without, of course, taking images of any voters or ballots or any situations which might intimidate voters. I have a gallery up on Flickr of images I took that you are welcome to peruse:

is was, of course, the primary election after the California Top-to-Bottom Review. This meant increased security all around, a few specific new rules and a post-election audit, which will be conducted in the next few weeks. On the security side, there were a slew of new types of seals. Here are a few images of security seals:

Image of the seal around the AVC Edge DRE case The DRE had a cable around it, sealed with a numbered pull-tight security seal.
Both DRE and Optical scanner had adhesive seals on strapping The Optical scanner had a cable around it too, secured with and adhesive seal like this and...
adhesive seal on rear scanner door with a pull-tight seal on the crimp point for the cable. In this image, you can also see the adhesive seal on the rear access panel.
Voided adhesive seal The adhesive seals seemed to be very good to me; here's what a removed seal looks like.
A security seal protecting the DRE case latch The latches on the case of the DRE were protected as well with adhesive security seals. (good practice!)

Official Ballots for Precinct 225400 Primary elections require a much more complicated process. I guess I hadn't realized how complicated primary elections can be. Keeping track of all the ballot styles was a challenge. Each party has it's own ballot in a primary (presidential or not) which quickly can multiply the number of ballot styles depending on if that party allows cross-over voting from "nonpartisan" or "decline-to-state" voters (interestingly, it's difficult to explain to a voter registered with the "American Independent" party that (s)he is, in fact, affiliated with a party instead of being "independent" of all political parties). This election had 6 partisan ballots, 3 non-partisan ballots, 3 languages for each ballot and a separate type of ballot stock for provisional ballots. That means 54 types of ballot styles that we might have to provide for a given voter.

My Team

My team was essentially the same team as in Nov. 2006. Our high school poll worker called in sick with the flu, so we had a replacement for her. Having 5 people man a polling place makes a big difference. When things are busy, 5 pollworkers means that all bases can be covered and that we can keep errors and delays to a minimum. Despite the heavy turnout, our line was only 10 people long at the busiest point in time.

Voting Technology Issues

wide view of Optech Insight We had one Sequoia AVC Edge II DRE voting machine and one Sequoia Optech Insight optical scanning machine. We set them up without difficulty before the polls opened at 7am. However, when I went to plug in the optical scanner, the unit did not power on. Despite moving the plug between outlets and checking the outlets with a lamp we had, it still would not power on. I called the Alameda RoV hotline and they said they'd have to call me back. Unfortunately, the building in which our precinct was located is impervious to cellphone signals, so that wasn't going to help. Fortunately, our poll coordinator, Carol, who oversaw a handful of nearby precincts, was able to contact the RoV again. The RoV authorized us to crack the security seal on the back of the scanner and make sure that the power cable was plugged in to the back of the scanner. Just as predicted, the cable had jiggled loose. Once we plugged it in, it was working great.

Sequoia AVC Edge One of the consequences of the CA SoS's Top-To-Bottom Review was a new requirement that any DRE used for disability access must have a minimum of 5 votes cast on it if any one voter votes on it. This requirement was instated to ensure that a voter's votes remain private: if only one voter votes on a DRE, than the totals report will tell exactly how that voter voted. In November 2006, we had one blind voter and one voter with manual dexterity disabilities that had to use the DRE. These same voters returned to vote this year, which meant I was going to have to find a few other voters to vote on the DRE in order to meet the 5 voter requirement. I figured a bit of productive social engineering might work wonders here. So, as ballot officer--which means I distribute ballots to voters and activate the voter card for the DRE--I began to ask, "Would you like to vote on the machine or paper? Paper or plastic?" Most voters chose paper, but occasionally, a few voters would say, "Machine, of course."

That got me 4/5 of the needed DRE voters (one of the second disabled voters had not yet arrived and I couldn't be sure that he would arrive). I decided to surrender my own vote-by-mail ballot and vote on the DRE, a sacrifice of sorts, in order to get the last voter needed to meet the 5-voter requirement.

Voters with Disabilities

We had the same three voters with disabilities vote this year. In addition, we had two new voters that had challenges voting due to physical disabilities. We had one blind voter, one voter with manual dexterity disabilities and one voter in a wheelchair with full use of his hands. The two new voters were one voter in a Rascal (a three-wheeled mobility scooter) and a voter on crutches.

Each of these voters had few problems voting, save the blind voter, which I'll go into more detail in a second. Our precinct is accessible, technically, but the path to the door has a bunch of large flagstones with deep gaps between them, about 4 inches wide and about that deep. This made it difficult, but not impossible, for the Rascal and the wheelchair to enter the precinct.

The one "incident" of the day happened with the blind voter, who had few problems in November 2006. The blind voter signed our poll book with a signature stamp as usual. Our poll book listed his party affiliation as something that he disagreed with. He insisted that he had re-registered to be affiliated with a specific party. If this were a voter that could vote on paper, I would have issued a provisional ballot; more than likely, in that case, his votes for the partisan contest would not have counted unless his recollection of his registration status was correct. However, since this voter needed an audio ballot on the DRE, I wasn't sure if I could do a provisional audio ballot on the DRE for the party he claimed to be affiliated with. This sincerely incensed this voter. The voter questioned my competence, training and knowledge of voting technology. I told him that I was fully trained and that I knew more about these machines than perhaps any other poll inspector in our County. Plus, I said, it's our job to find a way for him to cast a vote, and we would make sure we found a way. Finally, I decided to authorize a voter card for an audio ballot for the party with which he claimed to be affiliated. I made a note that this should be considered a provisional ballot. Incidentally, while it took the DRE 30 minutes to load the audio files in 2006, it only seemed to take a few minutes this time.

Difficult Voters

We did have a few cases of difficult voters. An older woman, probably in her 80s, insisted that we had given her the wrong ballot. At first, this didn't seem so strange because many of the non-partisan voters who we gave non-partisan ballots to would return and say, "This ballot has no presidential race." Well, um, yeah... you're supposed to ask for the Democratic or American Independent ballot. Anyway, with this older voter, it quickly became clear that she had some other type of confusion. She had thought that she was supposed to get a ballot without any presidential race, despite that she was registered with a specific party. She argued with me for a bit until a helpful voter was able to pull out the book of sample ballots and she convinced herself she was mistaken. She then apologized profusely. One of the obvious challenges of being a poll worker is that there are very strict rules in certain cases and you can only be diplomatic up to a point, then the rules you've been taught have to be honored.

The same voter, when she was leaving, insisted on ranting to me about proposition 93--which would amend the CA constitution to change term limits in our state legislature. She said things like, "This is all dirty politics. I saw Don Perata walking down the street recently... he's such a crook." To a pollworker, this is electioneering. That is, advertisements, statements, etc. said or made within 100ft. of a polling place that could be considered as voter intimidation or persuasion. I told her that we are not permitted to allow substantive talk inside the polling place about issues on the ballot and that she would have to leave. She gave up on me at that point and said something about free speech and left. Little did she know that electioneering is one case where speech can be limited by the government.

Another voter came with her 18-year-old son who she wanted to cast a vote. I told them that, unless he's been registered in Alameda County before, he can't cast a vote. She said, "Man, you guys do this just to discourage us from voting!" I said, "Those are the rules, Ma'am". Then she pulled out an Obama political mailing--electioneering inside of a polling place--to claim that she's registered to vote. We didn't have her on the rolls. Luckily, I only had to ask one question: "Have you ever been registered to vote in Alameda County?" She said she had. So, I set her up with a provisional ballot and her vote will count.

Running Out of Materials

I didn't realize until later on that Alameda County was having difficulties involving running out of materials at other polling places. We ran out of provisional ballot envelopes and were very very close to running out of "non-partisan Democratic" ballots--the ballots non-partisan voters would request to cast a vote in the Democratic primary. Apparently, a court ordered that 14 precincts stay open 2 hours because of their having ran out of the non-partisan Democratic ballot style. I don't think we could have handled staying open any later.

As for the provisional ballot envelope issue, the RoV told us to have people sign and print their name and provide their address and that we would write a roman numeral on the ballot and next to their name on the provisional ballot log. This system seemed to work out well and had the added feature that we didn't hold up the line having to explain the provisional ballot envelope and process.

Ballot Accounting

Closing took much longer than in November 2006. The rate-limiter was counting the unused ballots. We had 1365 ballots in 54 styles delivered and we had to count the number left in each style before we could take our supplies to the drop-off location. This added about 1.5 hours onto normal closing procedures. Even after counting, it was clear we were way off on our ballot accounting. However, we were uncertain if it was our mistake or the RoV's mistake in accounting for how many ballots we were delivered.

Anyway, after packing everything up in various zip-lock bags and sealing each of them, we returned supplies to the drop-off location and I was home by about 11:30p.

Miscellaneous Observations

a camera looking out the door of our polling place

There was a surveillance camera in the polling place that was presumably recording people entering our polling place. I have no idea if it was turned off for election day.

Provisional Ballots for Precinct 225400

We had separate ballot stock specifically for provisional ballots. This multiplied our number of available ballot styles by 2. It also meant, in certain cases, we were more likely to run out of ballots for a certain party (for example, we used a lot of provisional "non-partisan democratic" ballots).

Image of ballot officer station, with HAAT, tons of different ballot styles

This gives you a view from the ballot officer position--the person that gives out the ballots and activates the voter cards for the DRE. You can see a stack of ballot pads to the right.

Close-up of interesting protection on the memory card

I'm not sure what this thing is on the memory card (taken during closing). My best guess is that it's an inventory control RFID, a ground strap or a physical security mechanism. Cool!

Bag of absentee ballots and provisional ballots

We had a ton of provisional ballots cast and vote-by-mail (absentee) ballots dropped off.

Contact / Help. (cc) 2020 by Joseph Hall. blog software / hosting.
Design & icons by N.Design Studio. Skin by Tender Feelings / Evo Factory.
And a few words about the structure of the eye . Everyone " retina ". Especially often we hear it buy clomid online in the phrase " retinal detachment ." So what is the retina ? This - the front edge of the brain, the most distant from the brain part of the visual analyzer. The retina receives light first , processes and transforms light energy into irritation - a signal that encodes all the information about what the eye sees . The retina is very complex and in their structure and function . Its structure resembles the structure of the cerebral cortex. The shell of the retina is very thin - about 0.14 mm.