Importing CSV into Google Sheets via Google Script

flickr photo shared by OSU Special Collections & Archives : Commons with no copyright restriction (Flickr Commons) As part of a future project, I’m looking for easy, automated ways to push/pull CSV files around. Initially I thought I’d just do the =importdata(‘http://theurl.com/data.csv”) function but I realized that had some drawbacks that made it less ideal which lead to the script below. Using Google Script triggers this script could be set to retrieve a CSV file every X amount of time and write it to a Google Sheet. The upper portion is adapted from this answer. In any case, it opens up some decent automatic options and would keep data fresh for easy access charts and graphs in Google.

Playing with Words – Google Sheets to jQuery Drag/Drop

flickr photo shared by Internet Archive Book Images with no copyright restriction (Flickr Commons) This is a modification of the old refrigerator poetry concept based on a request from some of our World Languages professors but it’ll likely have some broader applicability. It essentially allows for three major things. You can create draggable elements (words, phrases, any HTML) from a Google spreadsheet You can create destination areas for those elements (also through the Google ss) You can make it so that elements that don’t match those destinations won’t “stick” there (spreadsheet again) It might be easier to see what’s up through the short video below. This was done mostly in jQuery but there are also a few Google Script elements that make life easier. The page below has everything except the CSS. It’s decently commented I think. The only real trouble I had was figuring out where/when to feed in the draggable/droppable elements. It kicked through after a bit of experimentation but I have a long way to go with javascript. Google Script There’s a directions sheet in the spreadsheet where I wrote a custom function. That allows me to write =getId() in the cell and have it generate the right URL for whatever spreadsheet it is in. You can also automatically copy my spreadsheet by going to the following […]

25

Weekly Web Harvest for 2016-09-18

Welcome to the Dark Net, a Wilderness Where Invisible World Wars Are F | Vanity Fair , Look, we’re in the Internet business. We know we’re going to get hacked. We have to assume, always, that our network is already owned. It is important to go slowly and stay calm. We will soon know how and when to lock the door. We will have to decide later if we should do more. To me he said, “Also, relax. In the long run, the chance of survival always drops to zero anyway.” He did not say this to his client. It was not an insight the Company would have valued at the time. Even in the short run, as it turned out, the news would be alarming enough. Anxiety Culture: 8000 years of anti-social behaviour I haven’t tracked down all the quotes but there’s some good looking stuff here. This Is What’s Missing From Journalism Right Now | Mother Jones Conservatively, counting just the biggest chunks of staff time that went into it, the prison story cost roughly $350,000. The banner ads that appeared on the article brought in $5,000, give or take. Nothing To Do With Arbroath: Man acquitted of remote-control arson from 250 miles away now faces deportation The investigator’s theory was that Mr Robinson, while in Hamilton, opened […]

Photography – Week 141 and 142

I wasn’t pleased enough to do a weekly post last week. I’m concentrating a bit more now and trying to get past my urge to rush to work that will be there if I take an extra ten or fifteen minutes.

18

Weekly Web Harvest for 2016-09-11

Teen Sues Parents for Posting Childhood Photos on Facebook | Mental Floss But it led to legal trouble for one Austrian couple when their 18-year-old daughter slapped them with a lawsuit for refusing to remove hundreds of embarrassing baby photos, The Local reports. The teen, whose name has not been released to the public, claims the over 500 childhood pictures posted to the social networking site without her consent violate her privacy. “They knew no shame and no limit—and didn’t care whether it was a picture of me sitting on the toilet or lying naked in my cot—every stage was photographed and then made public” she told The Local. “I’m tired of not being taken seriously by my parents.” dy/dan » Blog Archive » The Desmos Guide to Building Great (Digital) Math Activities Create an intellectual need for new mathematical skills. Ask yourself, “Why did a mathematician invent the skill I’m trying to help students learn? What problem were they trying to solve? How did this skill make their intellectual life easier?” Then ask yourself, “How can I help students experience that need?” We calculate because calculations offer more certainty than estimations. We use variables so we don’t have to run the same calculation over and over again. We prove because we want to settle some doubt. Before we offer […]

Free Speech? Random Scenario Generator

Talking to Dan about his sports law course resulted in this random generator which might be fun for others. It’s still developing but I like the potential for reinforcing some concepts about free speech in a fun way that allows you to repeatedly explore the topic without it getting tedious. I thought this would be a few minutes of work but I believe that Google has shifted the structure of their JSON feeds from the Spreadsheet. It could also be that I am insane. This particular experience did remind, rather unpleasantly, that I don’t fully understand how nested JSON parsing works. I ended up in the right place but only through about 40 minutes of slamming my head into various walls of misunderstanding. I also need to spend a bit of time applying the DRY concept to this bloated mess.

Email Support Data

I thought it might be interesting to look at my last chunk of emails by what hour they were answered. It does seem to show some patterns. Some that may not be healthy for any real separation between on/off work hours. It is good that I’ve got no email in the 1AM to 5AM zone. It is bad (probably) that I answer a large amount of email around 9PM. I probably also need to think harder about creating some defined email response windows so that email is not interrupting work that requires more focus and concentration. It’s easy to let the busy work drag you down while feeling “productive.” flickr photo shared by Tyne & Wear Archives & Museums with no copyright restriction (Flickr Commons)

Re-Scraping Instagram

Back when Instagram’s API rules didn’t completely suck, I wrote a few posts on scraping it so that some of our faculty could use those data in their research. Then all their rules changed and everything broke. That’s their prerogative but it’s also my option to complain about it. But because I posted about it, I got a comment from raiym1 who let me know he wrote a PHP scraper that avoided the API limitations. I’ve now got that up and running and set up a simple GET so that the URL determines the tagged content that is returned. The PHP for that page is below and allows you to replace the API URL in the old Google Scripts with a new url like http://bionicteaching.com/creations/ig/scrape.php?tag=fish You can then make your own custom displays based on that. I made a quick custom page template for the artfulness WP theme (currently showing filler data from the exciting ‘fish’ tag). This example has the tag hardcoded in but could easily use a custom field to pass the value. 1 On this post. And apparently this theme doesn’t support direct links to comments. About time I wrote my own theme . . .

Rampages Stats vs My Own Data

flickr photo shared by NASA on The Commons with no copyright restriction (Flickr Commons) It’s that time of year when you try to prove to your institution that the work you do matters . . . and I am prepared to make it rain datums.1 I’m not sure how valuable this will be to others but who knows and it helps me to write it down. Currently, my former team of 5 is now just me. So this stuff is sole mio23 and compasses everything from manual password resets to full on custom development work with faculty. Can you tell when the semester started? That’s an increase of abut 2,400 sites in about 3 weeks. I’ve got our weekly Twitter/Google Sheet spitting this out and writing it to a spreadsheet so this data was handy. I’ve been playing with logging data for a variety of reasons. For instance I now tag my rampages support emails in GMail and that logs them to a spreadsheet each night. I’m at least mostly consistent doing that because it’s a very light weight action on my part. I can then get an idea how stuff is really playing out rather than simply my perception of things (although that matters too). The chart above represents rampages email support over the last 30 days as of […]

11

Weekly Web Harvest for 2016-09-04

The Myth of the Millennial as Cultural Rebel | New Republic Fusion’s Patrick Hogan counted 47 institutions and industries that millennials have been accused of destroying so far, including credit, car culture, the American Dream, relationships, and golf. Of course, in each of these cases, there is a real story to be told: Yes, young people are buying less on credit; yes, car sales are down; and, not surprisingly, 48 percent of economically squeezed under-30s don’t buy into the uplift of the American Dream, according to one poll. Benefits | NASA GRC WordPress The following are the main benefits we’ve found in using our implementation of WordPress as a content management system for the NASA Glenn Research Center web sites we maintain. THIEF! | People’s History Archive “The Worst Thief Is He Who Steals The Playtime of Children” — W.D. Haywood — Join The I.W.W. And Help Put The Thieves To Work. What If Medicine’s First Principle Were Also Education’s? | Psychology Today • In a study in which 150 college students were asked to described the two most negative experiences in their lives—experiences that negatively affected their development—by far the most common reports (28% of the total) were of traumatic interactions with school teachers.[5]  In a study in which adults were interviewed to find out about positive, peak learning […]