Top of my to-do list has been to build something using data from the City of Seattle data portal (data.seattle.gov), powered by Socrata. This one is not particularly useful, but I’ll share with you anyway!
One of the things I like least about homeownership is the need to keep up a yard. Thankfully I’ve never received nastygrams about yard care, but I’ve heard some horror stories. One couple in Texas was in the process of removing a dead tree from their yard — they had just cut it down and into transportable sized pieces, and piled and covered the logs up with a tarp, and THE NEXT DAY they got a note demanding they remove “tree debris” from their yard within three days or pay a penalty.
Anyway, in that frame of mind I giggled through the “weed and vegetation code citations” available via public record. Since Washington legalized marijuana last year, I had an idea in my mind to track code citations like these:
- Large overgrown blackberries and vegetation encroaching sidewalk
- Hazardous vegetation encroaching on sidewalk forcing pedestrians into street
- OBSERVED LARGE TREE ON PROPERTY NO SIGNS OF RODENTS AND NO BEES WERE PRESENT DURING A SUNNY DAY
…and present them as our city’s most pressing weed violations.
Clever? Maybe. Half-baked? Definitely. My first idea was to tweet out the description of the citation, with a google maps street-view image of the address in question. That might be visually interesting but seemed like a huge invasion of privacy, so I quickly shelved it. I have no interest in actually shaming the property owners.
So instead I started with the easiest path, tweet the generic descriptions, to see where that led me. Here are the “get-started” steps:
- Register for a developer key with Socrata
- Identify the data set you want at data.seattle.gov (for me: code violations)
- Use developer key to access the API (I used a Ruby gem from Socrata) to fetch that data set
- Filter (for code group: “weed and vegetation”) and collect results in an array
- Set up a Twitter API client to talk to twitter, via a new twitter account if needed (I recycled an existing bot!)
I finished the first part of my #NaNoGenMo project, a “Where I’m From” poem generator.
It’s nothing fancy, but I’m really pleased with how it turned out.
Some technical notes:
This is a process post. Or, how I think through possible courses of action when I hit a roadblock.
I’ve been making my way through Ruby the Hard Way bit by bit and I had a lot of fun this weekend with exercise 45, “you make a game.” This book and the Python version are both great learning tools for the language, and now that I’m getting to the end I see it’s a great tool for learning the basics of web deployment as well. *More than once* I have gone off on a side tangent and scoured the internet for a solution to my problem, only to be redirected back to the book and find that it addresses my question several exercises later.
I like my game, a simple text adventure based on Adrienne Rich’s poem ‘Diving into the Wreck,’ so much that I want to share it on the web with you, and that kicked off the latest rabbit hole. I still haven’t found a solution to this, so if any of you out there know enough to help me out, I would greatly appreciate it!
Here’s where I’m at:
It started with Peter and the Wolf.
I’ve been wanting to play with Markoved text for some time, using books available in the public domain, easily accessible via Gutenberg. The idea in my head was to create a Twitter bot that would mash Peter Pan together with Call of the Wild (although later I realized that Beowulf would be the better option) and tweet lines from the merged books. As I dug into this project, I realized that the mash-up text wasn’t really interesting enough to hold its own as a bot, but I did like combining different texts to see the results. After while I realized that the *more interesting* challenge would be to build an app where any two (or more) Gutenberg texts can be combined. Behold, the #notbot!
(And yes, I got my Peter and the Wolf in there.) Go play, and then come back and I will show you how I built it:
Look, I made a thing!
I took a giant leap this week in my knowledge base, learning and launching my first Rails application. It tracks robots that you would like to build. If you don’t build robots, it has no real practical purpose other than meeting the objectives of the assignment.
For those who don’t know, Rails is… how to describe this. It’s frequently paired with Ruby and it’s a thing you stick your Ruby code into to make it a lot more complicated. Kinda. I still don’t really see the point. It connects your code to a database so you and other people can store things. In theory you could design and run a weblog from a Ruby on Rails app instead of using, say, WordPress (hey that’s not a bad idea). (Except that any entry would probably take 50 hours and like 17 file updates.)
Suffice it to say, I have a lot to learn still about Rails.
But my app works! Go add a robot! This completes the three application assignments, so I’ll tinker this weekend and submit on Monday. I am hoping to gain official acceptance before August 10th, which is the scholarship application deadline.
Some thoughts on Rails:
View from the plane over Greenland.
Now I remember.
Right, so, that didn’t happen, and consequentially I spent a lot of time this weekend re-learning (googling) how to do stuff with jquery. But readers, *I MADE A THING.*
I made two things for you, actually.
First, my very favorite thing: books! I made you a library in Ruby. It needs a bunch of work still, but if you know what you’re doing, you can add books to your library and put them on shelves by genre (or whatever). Given more time and resources I would go ALL OUT with this assignment (alphabetizing is my favorite meditation technique), but I am trying to keep it simple. If I have more time before it needs to get submitted, I’ll add authors and ID #s to the books to increase sorting abilities and functionality. I’ll also add a “librarian” function to walk you through all the stuff you can do in the library. What’s holding me back from the latter is figuring out how to generate and keep track of new Class instances within a function when I need it to be able to do stuff before knowing what the instance variables are going to be. Clear as mud?
The last mini-project I’m working on is a Rails application. I’ve yet to tackle the Rails part of Ruby on Rails, so this will be an adventure. Last week I got everything installed, so I’ll probably re-start my Treehouse subscription for a tutorial this week, and focus on getting that done and tweaking everything else.
Stuff is starting to come together in exciting ways.
Some links! Not code related, sorry!
- #blacklivesmatter protestors go to Chicago and film the Mike Brown gallery exhibit. Must watch. Curious what my legit artsy friends think about this (what you will probably say is there are bad galleries and bad artists and this is both, and then some).
- “F*ck that,” a guided meditation for our times. <–you need this. I need this. The world needs this.
- I’m generally wary of “I did TFA and it sucked so TFA sucks” stories, so I wasn’t putting much stock in “Teach For America: Counter-Narratives” until the organization went and published a “response” to the alumni authors of the book before the dang thing has even been published. So now of course I want to buy 10 copies. Their response, which I will not link to, says “In particular, a small group of former corps members involved in the book have chosen to focus on past experiences that are not in line with how we operate. … It’s not productive to address in this space every critique in this book, but here’s what we have to say about some of the contributors’ bigger misconceptions.” I repeat: the book. is not. out. yet. They have not been provided an advance copy. (UPDATE: on July 27 TFA clarified that they received a copy from the publisher on July 8. Why they couldn’t just say that when first questioned…) The editor of the book doesn’t even have his copy yet. Just more PR spin and refusal to listen (read) from an org whose #1 critical feedback from alumni is that they are too focused on PR and they don’t listen.
- Uhhh… I am probably hella guilty of this, but I’m trying (from xkcd).
OK, you want to talk bots? Let’s talk bots! First, let’s go back…
WAAAAAY back. A few weeks ago, I got a nice mention on Twitter from a procrastinating grad student who found my tutorial and used it to set up Ecce , a Publilius Syrus twitterbot (I had to wikipedia that).
While the rest of the internet was tuning into Netflix on Saturday, I was sitting in a basement classroom learning about Unix and git. SO FUN I know. I was actually looking forward to it because I still don’t really understand about branches and forking and merging and pull requests and ahhhhh all that version control stuff. And, the 1-day course came with a substantial but manageable list of pre-work, which is something this org does well and I appreciate.
Unfortunately, we used a LOT of class time going over that pre-work and other very introductory material, such that I found myself multi-tasking (like Unix!) and finished my final project for class. Appropriately: a game of cards.
HEAR YE, HEAR YE: I made a thing in which I practice using jQuery and mix my literary metaphors: Rabbit, Run!
If anyone knows how to make the toggle button actually, you know, toggle… please share. Until then it *says* “toggle bunnicula” but what it actually does is “click here for bunnicula forever.”
Related, this exchange with Josh (my partner, a professional game designer):