Thursday, June 15, 2017

Museum Math and Mapping Fun

We recently received the Flower Garden Banks National Marine Sanctuary traveling exhibit.

It should be fun to have this in the museum and it get's me to thinking about things like "Where is the marine sanctuary, relative to my current location?"

That is, what direction and how far from where I am standing or, say, from a specific location such as the City by the Sea Museum.

If we knew the "coordinates" of the two places, we could use a calculator to find the direction and distance.

We can answer that using some simple online tools to find the information we need and to help perform (and explain) the calculations needed. We can use our smartphone (or just a plain compass) to find the direction and we can use the calculator to express the distance in our preferred units (e.g., miles).

So first off, where is the FGBNMS? In other words, what are it's coordinates?

That's easy to find on the Internet. (Hint: search for "flower garden banks location"). The answer is 27.8841° N, 93.8147° W.

OK. Now what's the coordinates for the CBTSM? We can use a tool like Google Maps to find that or, in this special case, look up the coordinates for the R.J. Hill building in Wikipedia! :)

To do this in Google Maps, find your location by typing in your address or by moving the map and clicking to create a pin. Then click on the pin to see your coordinates as in the picture above and to the left.

In our case, Google Maps says that the CBTSM is located near 28.700416, -96.215314. Wikipedia claims that the location is 28°42′01″N 96°12′54″W. Both are close in value, relative to the building and the street block

Note that Wikipedia uses the Degrees-Minutes-Seconds notation for coordinates, while Google Maps uses Degrees in decimals format. Google also assumes that directions are always North and East and uses a minus sign instead of South or West.

So now all we need is to find a calculator that will tell us the distance and directions. How can we find that?  Hint: search for "direction from two coordinates".

Here's the first one I found. It's cool because it provides an easy to use calculator and also gives an explanation of how the calculations are made so we can dive down into the mathematics behind the scenes.

The answer to our question is about 252 km, at a bearing of 110 degrees.  I used my smartphone's compass utility app to point myself in the right direction. A regular compass would do, or just estimate if you know which way is North.

Kilometers are about 3/5 ths of a mile and so this is about 156 miles.

For pirates hanging out around the museum, that makes it about 300,000 paces to the southeast, matey!




Labels: , , , , , , , , , , , ,

Monday, May 08, 2017

Palacios Pirate Festival

The Palacios Pirate Festival is coming June 23rd and 24th, 2017 to Palacios, Texas.

For more information, check out the Palacios Pirate Festival Summer 2017 website.

"The PALACIOS PIRATE FESTIVAL is a unique annual celebration for all in the region to enjoy. We raise funds to support children and families in our community."

I've volunteered to be on First Mate Lynda's Museum Crew and to help with the email and website.

Let's see how the SEO on this little blog post compares with the others.

Just for fun, I'll add a few more nostalgic archive.org links related to pirates.

* Remember those Ourmedia promos? "Pity about the sound".
* Item #179 - How To Talk Like A Pirate



Labels: , , , , , , , , , , , , , , ,

Monday, September 19, 2016

Palacios Historic Home Tour - Part 1

I volunteer as a docent at the local historical museum.  It's a great way to learn about Palacios, Texas and meet interesting people from the area, as well as visitors from other lands.

A few years ago, the museum produced an Historic Homes Tour audio CD and I have been looking at how that might be used on the web and (safely) with mobile devices.

Currently, people come by the museum and "rent" the CD for a small donation ($5), take the tour and then drop the CD back off in the museum's door slot.

The CD consists of 51 audio tracks containing driving directions, home descriptions and a few bonus music tracks.

Ideally, we would like to make it available to more people, raise awareness about the museum and solicit support in the way of donations.  Having the content on the web reduces production costs and makes it easier to make additions (for example, a building was recently restored and could be added to the tour).

I plan to write a series of posts of how we go about breathing new life into this fun museum digital asset.

So how do we best accomplish our goals?

One approach might be to use a service like CD Baby or TuneCore, but I'd prefer to do this using open source tools and with minimal costs.

So our first approach will be to use the Internet Archive and build a playlist or feed that can be easily used by most people. For now, donations will be accomplished by simply linking to the museum's donation page where appropriate.

The next step is to rip the CD into mp3 files.  Use your favorite tool for this. You can even use Windows Media Maker or iTunes if you have those.  I converted the files using the a 192Kbs VBR bit rate setting.

The original CD tracks have very little metadata (just track numbers, no titles, subtitles, album, etc) and so we will want to add that.

As we will see, a whole lot of issues can be addressed using simple shell tools and scripts. Having a comma separate file of the metadata can help automate repetitive tasks for each track and so I created one.

You can use a tool like mid3v2 to set mp3 metadata. The track names on the CD were of the form "01 Track 1" and so I wrote a simple shell script to read the csv, find the mp2 track based on the track number and rewrite the metadata using the track title.

You can see the benefit of having the added metadata in the snapshot of the folder with the audio tracks. Note the titles, album, etc.

Now we can upload everything to the Internet Archive.  We'll do that in the next post using the "ia" command line tool.

In later posts, we will create some slide images from the metadata and use that with historic photos and the audio tracks to generate some MPEG 4 videos suitable for uploading to the Internet Archive or YouTube.

Then we will look at how to turn these into mobile (responsive) players and we'll even generate some of those cool audio signal graphs like this:


Lots of fun stuff and all can be done with a few simple command line tools such as mid3v2, ia, ffmpeg, sox, convert and gnuplot.

More soon ...





Friday, December 04, 2015

I got a message from my old friend Laurie Kurilla via LinkedIn.

All LinkedIn goes to spam, but I happened to notice this one before it got deleted. I never login to LinkedIn anymore. I don't care about that site or that kind of networking. It has never been useful to me.

I tried to send an email to Laurie, but all the email addresses in my contacts are out of date, from old jobs.

I know she's on Facebook, but I gave that up over a year ago now.

I don't think she's on Twitter or, more importantly, Github.

So I guess I'll just post here and let her find my reply in it's own good time. What's the hurry anyway?

We're doing fine. In Texas at the moment. What's 'retired' mean? I work until I drop. Hope you are doing well too. Best to all.

Friday, October 23, 2015

Boring Data Can Be Fun

I was helping out with a site redesign and found a document in the assets that was a poorly formatted table of times to help a bicyclist calculate their speed on a known course.  It looked like it had been hit with the 'ugly stick'.

I thought, "this could be used to make something interactive and fun" and so I put together a little demonstration of what I mean: an interactive calculator with a sense of humor.

In a nutshell, it is simply an HTML 'range' element or slider that triggers the display of the corresponding speed. The widget displays the same information as the table, but some styling makes it look nice.

Normally, the slider is restricted to a reasonable range of values (who can typically bicycle comfortably at speeds greater than 30 mph?). But allowing people to make silly choices gives an opportunity for education and fun and so we display various 'speed' facts from Wikipedia as the speed gets higher.

The widget also offers links to rides of the indicated speed if you have a back-end that supports it (e.g., Drupal).

You can find the code on GitHub and test drive it/play with it on JSFiddle as well. Now I have to figure out how to tie those two together :)


Labels: , , , , , , ,

Tuesday, October 20, 2015

Hacking the Internet Archive - Managing Contributions

When it comes to online content management, we've come a long way since the early days of videoblogging. In particular, there are now quite a few tools to manage your Internet Archive contributions and many old ones have changed.

Here's a list of ways I am aware of to create, upload, edit, update and remove archive.org items and their metadata:

  • FTP - use tools like filezilla or cyberduck to manage your content. No longer used for downloading and it appears that uploading may no longer be supported. I have yet to find an official announcement of that yet.

  • www.archive.org - web forms to manage your content and your metadata. These forms have gotten easier to use over time and allow you to do lots of cool things. On the other hand, I hate forms.

  • s3.archive.org - a powerful interface similar to the Amazon web service. For the truly geeky at heart.  Mainly useful to programmers.  Not so much code as a standard to make calls against using tools and libraries like 'curl'.
    Python interface - built on s3.archive.org, used with curl and programming languages, powerful but very geeky. Mainly for programmers, but can be used at a higher level to make cool scripts or use within other applications. Also a great way to learn about the internal working of the Internet Archive and the Python programming language.

  • ia command line interface - based on the python interface, great for managing lots of items and their metadata, powerful, easy to install and use, geeky, but not too geeky. Works on mac, pc and gnu/linux. I really like this tool. Open source.

  • other libraries and interfaces, such as @diffalot's gem at https://github.com/diffalot/archive

  • various desktop clients - can be easy to use, there have been many, they come, they go, commercial and open source projects

Recently, I've been using and studying the ia command line interface and it is a great tool.

We'll take a look at using the Python-based command line interface in the next several posts to learn more about Internet Archive features and capabilities that we can use to do cool things with our content.

Labels: ,

Hacking the Internet Archive - Python

Python is a popular programming language, used in many situations these days.

Some wonderful folks have created a powerful command line interface to the Internet Archive that is built using Python.

We will talk about installing the 'ia' tool in the next post.

But first, we need to have a compatible version of Python on our computer in order to install and use the 'ia' command line interface. So that't the purpose of this post: just make sure python is installed.

This was easy on my Ubuntu servers. I already had Python 2.7.6 installed and that works fine for now. I may upgrade this, but I was able then to proceed with the 'ia' installation after that and, as they say, "if it's not broke ...".

My older MacBook with OSX 10.6 already had python 2.5 installed and in use. This would not install ia when I tried it and so I thought it would be best to upgrade python. The current version of Python is 3.5. You can install 3.5 alongside 2.5 (do not remove the older one! your mac needs it). Just visit python.org and download their Mac installer version. Once it is installed, you must type 'python3' in all instructions where you see 'python'. I was able then to proceed with the 'ia' installation after that.

On my Windows 7 box, I installed python via the python.org windows installer, which I downloaded and ran. On windows, you need to add the python install folder to your Path environmental variable (right click on your 'Computer' icon, select 'Properties', then click 'Advanced System Settings', then 'Environmental Variables', scroll to and select 'Path' in lower 'System Variables', double click to edit. Add a semi-colon (;) and then the new path to your python install directory binaries.

On windows, type 'py' to run python. On 'mac', type python3. Just type 'python' on Ubuntu. In all cases, you should see something like this:

Once you verify that python is running, you can either play around and type things like 'print(1+1)' if that gets you exicted. Type a 'Ctrl-D' ('Ctrl-Z' on windows) to exit or type 'exit()'. I guess everything is a function in python. :)

Learning the 'ia' tool will give us an opportunity to learn more about python as we continue out explorations.

If you want to learn more about python, check out this cool learning guide that is also on GitHub.

Labels: ,

Monday, October 19, 2015

Hacking the Internet Archive - Icons

The Internet Archive has some cool new glyphs like this:


iconochive-logo

iconochive-audio

iconochive-movies

iconochive-software

iconochive-texts

iconochive-etree

See their post Customized font with Glyphs!.

You can use them too! Like I did here. I just inserted a link to the Internet Archive's style sheet into my blogger template. :)

Labels: ,