A sneak peek at new products and services being developed by the NPR Digital Media team

Technology Jan. 12, 2009

The Guts of the Station Finder Map

As my previous post mentioned, we recently re-launched our Station Finder Map. This post will discuss in more detail how the map works. Now, to the guts...

The Underlying Data
The system has several underlying database tables, including zip codes, cities and station data. The zip code and city tables, in addition to containing information about the locations, also include the latitude and longitude for the centroid each location. These are pretty simple, flat tables that contain the approximately 41,000 zip codes and 150,000 cities in the United States.

The station tables, on the other hand, are much more complex. They contain all of the nearly 2000 stations that carry NPR programming (as well as their translators) along with a wide array of information about those stations, including licensee data and pertinent URLs associated with the station (e.g. their home page, schedule page, donation page, audio streams, RSS feeds and podcast feeds). These tables also include the latitude, longitude and broadcast power information for each antenna.

The broadcast power information tells us how far that antenna's broadcast signal can reach in each direction. Our data is broken up into 72 directions, starting with due north and shifting five degrees around the circle until we are back at due north. For each direction, our database contains five different ranges, detailing how far the antenna can reach in that given direction. The range itself determines two things. First, it tells us how far away you can be from the antenna and still hear its signal - this takes into account some impediments, such as mountains. The second thing it tells us is what the quality of the signal will be. The closer you are to the antenna, generally, the more clear the signal will be (although this is not always the case).

Finally, most of the data in these tables is publicly available in our recently launched Station Finder API (the coverage data is not available, but everything else is). The functionality of the map is driven off of the API.

How Does the Search Work?
At the core, the system works based on latitudes and longitudes. If you search the system by zip code or city/state, the system will convert the search term into a latitude and longitude before looking for stations. Similarly, when you look for NPR stations along a driving route, the system identifies a series of points along the route and converts those points into latitudes and longitudes. The waypoints for driving routes include any turn, crossing of a border, start and end points, and some artificially inserted points that we create. (Searches based on call letters bypass the geo-searches and hits the station tables directly.)

Once we have the latitude and longitude, we perform a series of calculations based on the Great Circle Calcuation (GCC), which helps us to determine distances on a curved surface (ie. the Earth - and we are assuming that it is not flat). Using the GCC, we look for stations near the latitude and longitude, based on a 100 mile radius from that point. From that list of stations, which is too inclusive, we start our process of narrowing down the results to the actual stations that can be heard.

For each station returned from our initial search, we first determine the direction (one of the 72 described earlier) from the antenna to the requested latitude/longitude. Then we find out the distance between the antenna and the latitude/longitude using the GCC. Once we have the distance and the direction, we simply need to do a lookup in our database to determine if the broadcast distance of the station is greater than the distance between the antenna and the latitude/longitude. If the broadcast distance is greater, then the station can be heard in the latitude/longitude. If it is not, then the station cannot be heard.

Now, when I say "check to see if the broadcast distance is greater", we are really checking five different broadcast distances in the database. We do this to find out what the quality of the broadcast signal will be for that latitude/longitude. The further the distance, assuming it is still within range, the more likely the signal will worsen. There are other variables, but that is the basic idea.

Displaying on the Map
The display of this information on the map is pretty straight-forward. We simply drop an antenna icon at each latitude/longitude where a station's antenna is actually located. For that antenna, we use the polygon feature in Virtual Earth to draw and shade the coverage circles on the map. The contours of the coverage circles are drawn by taking the distance of the broadcast range in each of the 72 directions, drawing a line connecting the points, then shading in the circle. We do this for three of the five broadcast ranges in our database. The overlay of the shading for each of these three circles results in the inner circle being darker than the middle circle, which is darker than the outer circle.

Other Notes
One other thing I should point out about this data is that it is great for the purposes of this type of application - a web-based service to inform our audience as to which NPR stations are available throughout the country. There are other more sophisticated, more precise ways to identify the station coverage maps which are really overkill for this type of service.

To see another representation of this same functionality, go to nprroadtrip.com. This is a map mashup produced by an NPR enthusiast (not affiliated with NPR).
--Daniel Jacobson

comments () | | e-mail

 

NPR Community Reaches 50,000 Users

When we first launched the NPR Community on September 28 of last year, we wondered how long it would take for us to reach 50,000 registered users, and a number of us figured it would take at least six months to reach that goal.

It turns out we were able to do it in four months.

A couple days ago on January 9, we hit the 50,000 mark. And we couldn't have done it with all of you. On behalf of the NPR Social Media Desk, I want to thank all of you who've taken the plunge with us. We're thrilled that we've reached this milestone so quickly.

So here's to reaching 100,000 users! Anyone want to take a guess at when we'll get there?

-- Andy Carvin

comments () | | e-mail

 
Jan. 9, 2009

Moving Forward With Inauguration Report



draft of Inauguration Report logo

A draft of one of the logos we're considering for the Inauguration Report project.


Source: Ben Kutil

As I mentioned last week, we've been brainstorming ways of using a variety of social media tools to collect stories from people related to President-elect Obama's inauguration. We're starting to make some good progress, so I wanted to post a quick update.

Dave Troy and Sze Wong have been working hard on an iPhone app. We're hoping it will be in the App Store before the end of next week so people can start using it the weekend prior to the inauguration. I'll let you know once it's live. Meanwhile, you can still start getting involved now by using our official tags whenever you post something online. If you're on Twitter, please use #dctrip09 if you plan to document your road-trip to DC. For inauguration day itself and any other inaugural-related activities, please use #inaug09. If you take a look at Twitter, there are already a number of people using the tag, which undoubtedly has also been boosted by the fact that Current.tv is promoting the same tag. So I'm keeping my fingers crossed that #inaug09 will be seen by many as the semi-official tag for the inauguration on Twitter - or at least as semi-official as tags ever get, of course.

Similarly, you can use the tags dctrip09 and inaug09 on lots of other sites, like Flickr, YouTube, Utterli, or in your blog posts. In these cases, there's no need to use the pound sign (#) before the tags, as the pound side is generally unique to twitter and other text messaging tools. By using these tags when you upload content, we'll be able to find it easily and display it on our site. I also hope to make the widgets we use available to everyone in case you want to embed a copy of them as well. There are also plenty of free widgets out there that would let you create your own widgets. Widgetbox.com, for example, has a large collection of them. We're still planning to build some widgets of our own, and could use a few more coders, so if you're good with Rails or Javascript, please let us know by posting a comment below or tweeting me at acarvin and we'll put you to work.

For those of you who aren't in to uploading photos, video, etc, you can still let us know about your travel plans to DC. We might even send over a reporter to talk to you about it. Please tell us about your plans either by posting a comment below or sending an email to homework@npr.org. (I'm not sure about the name for that email address, but that's the one we're using.) :-)

I'll definitely have lot more information to offer next week. Until then, let's get tagging!

-- Andy Carvin

comments () | | e-mail

 
API Jan. 7, 2009

Tips and Tricks for Mix Your Own Podcast

We've had a positive reception to the Mix Your Own Podcast tool launched December 18. Here are a few tips to help you get more out of this new feature.

Every Story is an Episode

Our traditional podcasts, launched in August 2005, often combine multiple stories in a single podcast episode. For example, the Economy podcast has episodes that typically contain 4 stories, delivered on Tuesday and Friday. With Mix Your Own Podcast, each story appears as its own episode. Here is a Mix Your Own version of the Economy podcast. This allows you to download the stories as soon as the audio is available on NPR.org, and it gives you more control over what you want to listen to.

However, if you set up a podcast on a popular topic, you may get several episodes per day, so you may want to adjust your podcast software to keep more episodes available. In iTunes, this is done by selecting the Podcast Tab and then clicking the Settings button on the lower left. You may also want to set your software to download episodes more frequently so that you get timely news as soon as it is available. Here are some suggested settings.

Click to enlarge

 

Refined Search

Mix Your Own Podcast finds stories relevant to your interests in one of two ways. First, NPR categorizes stories in many different ways: the program on which the story was aired/published, topics associated with the story, the reporters of the story, musical artists featured in the story, and so on. You can use any of these pre-existing categories to build your podcast. In the Mix Your Own Podcast tool, pre-existing categories will appear as you type in the keyword field. You can select these categories by clicking on them.

Mix Your Own Podcast drop down

 

Second, your podcast can be based on free text searches of the content of stories. Originally, this search was done on any text content found on the web page for the story as well as the audio transcripts for the stories (if available). While comprehensive, this can find stories that are only tangentially related to your keywords. For example, if you entered "Cat" as your keyword, your podcast could include stories where a reporter used the phrase "Let the cat out of the bag." So, we have changed the way text search is used in Mix Your Own Podcast; now, we will only search the title and the summary of the story. This should provide more relevant stories for your podcast. This change took place automatically, so you don't have to make any changes to your podcast to take advantage of it. However, if you liked the full text search, see the next tip.

Mix Tool for Power Users

You can still use the full text version of search to build your podcast via the API Query Generator. Mix Your Own Podcast is built on top of the NPR API. Using the Query Generator, you can fine tune the criteria used to pick stories for your podcast. To use the Query Generator, you will need to sign up for a free API Key. Then, in the Query Generator, go to the "Fields" tab and select "Podcast" as your "Output Format". You can then use the other tabs to customize your podcast to your heart's content.

Click to enlarge

For example, if you preferred the full text search option for building your podcast, go to the "Control" tab, type in your search terms, and select "Full Content of Story" as the "Search Type".

Another example of what you can do with the Query Generator is controlling how your selection criteria are combined. In the Mix Your Own Podcast tool, we return stories that match any of your specified criteria. If you enter several categories, the podcast will contain stories that match at least one of the criteria. In technical terms, we call this a "Boolean Or" API query. Perhaps, though, you want to combine your criteria to get a more focused podcast that contains only the stories that match all of the category selections you have made. For example, if I wanted a podcast that contained only stories that were about both Technology and Politics, I would go to the Query Generator "Topics" tab, check both the "Technology" and "Politics" options, and then go to the "Control" tab and select the "And" option for "Boolean for IDs" option.

Click to enlarge

The end result is my Techlogy and Politics custom podcast.

We would like to hear how you are using the Mix Your Own Podcast tool. If you have created an interesting custom podcast, please post the URL in the comments section of this post.

--Harold Neal

comments () | | e-mail

 
Technology Jan. 5, 2009

The Station Finder Map with Driving Directions is Live on NPR.org

I am happy to announce the re-release of our Station Finder Map, including our Road Trip functionality. This version includes several features worth noting, as follows:

- It allows you to identify local NPR station based on zip code, city/state, station call letters or by broadcasting network.

- It allows you to identify local NPR stations along a driving route.

- It allows you to identify local NPR stations that can be heard at a specific address.

- For stations returned by the finder, you can view the station's coverage map, view more information about the station, and click through to the stations' group page within the NPR Community.

- It is fully supported by our recently released Station Finder API.

We are very excited to have this feature back on the site and hope that it will help our listeners find NPR wherever they may go. In a later post, I will be providing a detailed technical explanation of how the Station Finder Map works.
--Daniel Jacobson

comments () | | e-mail

 
Editorial, Mobile, Social Media Dec. 31, 2008

Help NPR Plan Our Social Media Activities for the Inauguration

The presidential inauguration is less than a month away and the NPR social media desk is kicking it into high-gear to figure out how we can get all of you involved in our inauguration coverage. We're also looking for some techies who can help make it happen.

After our successful VoteReport experiment last month, in which we work with bloggers around the country and invited the public to submit reports on their voting experiences, we're hoping to do something similar for the inauguration. Some of our partners in the VoteReport project, including Dave Troy of Twittervision and mapping guru Andrew Turner, are volunteering again to help re-purpose the VoteReport tools for the inauguration. We've also got some new folks involved, including American University journalism professor David Johnson, and I'm sure others will come on board in the coming days and weeks.

Among the things we've got in mind:

Inauguration '09 citizen journalism iPhone app. Dave and his colleagues created an awesome iPhone app for VoteReport that allowed users to post audio and text reports online and have them plotted on maps, using the iPhone's GPS capability. We're thinking of adding on to this app so that it could also allow users to attach inauguration-related photos or perhaps even short video clips. One idea that was also suggested was to allow an iPhone user to save their reports on their phone and post them later, in case AT&T's data networks are jammed on January 20th. We're also thinking of giving users the ability to submit their email and phone number so NPR reporters can contact them in case we want to use their audio in one of our stories.

Mobcasting. During VoteReport, Dave set up a bank of telephone lines that allowed users to call in and record a voicemail about their voting experiences and have it posted for all to hear online. Given that not everyone participating in inauguration festivities will have iPhones, we want to do what we can to make sure that any phone line could be used by you to file a report from the field.

Twitter and tags. Many of our VoteReport participants used Twitter as their primary method of sending in reports, and we expect that to be the case for the inauguration. We're planning to track all Tweets that are tagged either #dctrip09 (for people road-tripping to DC) or #inaug09 (for Inauguration Day itself). We'll then be able to display all the tweets as they come in. People can also use these tags when they upload to sites like Flickr, YouTube, etc, so we can aggregate that content as well. (Though you shouldn't use the # sign when tagging on Flickr or YouTube - that's just a quirk of tagging on Twitter.) Of course, we'll have to encourage people to use those tags in order for them to work, so we'll need your help getting the word out.

Texting. For people who want to send a text message but don't have Twitter, we hope to have an SMS shortcode available. Fingers crossed.

Maps, maps, maps. Thanks to the hard work of Andrew, Dave and others during VoteReport, we managed to pull together some pretty snazzy maps of all of this user-generated content as it came in. We plan to do the same for the inauguration, particularly in the week leading up to it, so we can track content submissions from people all over the country as they make their way to DC. One thing I'm hoping we can pull off is tapping into all those users with iPhones, since the GPS capability will make it possible to plot each person's route, see how far they've traveled and explore what they've uploaded. For January 20th itself, we're thinking about setting up a hyperlocal map of DC itself, so you can observe everyone's submissions over the course of the day, no matter where they happen to be around the National Mall. This might be the toughest thing to do in the project, particularly for content that's not submitted with GPS metadata. (Using zip codes as geolocators, for example, won't work to well when zoomed in at the street level.) So we may put together a series of DC-specific tags (#ellipse, #washmonument, #lincolnmemorial, #airandspace, etc) to make it easier to identify who's doing what where. Journalism students from American University will also be volunteering to cover the inauguration throughout the city, so we'll be highlighting their activities on the map as well.

Of course, all of this is going to be one big, messy experiment, particularly given the fact that many mobile network providers are forecasting serious congestion and possible outages due to the huge numbers of people using their phones simultaneously. Nonetheless, we think it's worth the effort, given how many people are planning to be involved in the inauguration. There are going to be lots of stories to tell that week, and we want to give you the tools to help share those stories.

Lastly, we'd love your help building this project. We don't have many resources to pull this off, and everyone is volunteering their time to do this. Dave and Andrew are tech geniuses, for sure, but they can't do it alone given the limited time between now and January 20th. So we're looking for some techies who can back them up. Our biggest need is for iPhone app developers who can help them repurpose the VoteReport app and get it in the App Store as soon as possible, so people will be able to install it prior to their roadtrips to DC. We'll also need some Rails, Google Maps and Javascript gurus. If you're interested in helping, please post a comment below and describe what skills you can bring to the table, and we'll be in touch with you soon. If you're on Twitter, you can also send me a note at @acarvin.

As for everyone else reading this post, we'd love your feedback. Does this seem like a worthwhile effort? Is there anything you liked or disliked about VoteReport that we should take into consideration? Are there any specific features or requirements we should try to work into the project? Please let us know what you think.

-- Andy Carvin

comments () | | e-mail

 
Editorial, Social Media Dec. 31, 2008

An Unruly Comment Thread? It's Probably The Trolls

I had a long conversation with a colleague of mine about how easily comment threads can go sour. She said every community manager begins with a pleasant view of their online preserve, a view that values democracy, free speech and an open market place of ideas.

Then, after countless episodes of rants, name calling and non sequiturs (it's people like you who will soon have us living in a Nazi wonderland ruled over by a leader who makes Hitler look like a caring social worker), your ideals are dashed.

Where do these meandering, senseless rants come from? Trolls, people who say just about anything to get a rise out of others. Don't get me wrong, I think for the most part, we have a very strong let-the-community-sort-itself-out ethos. We welcome pointed comments from all points of view. We just ask that they also be constructive and substantive.

Trolls, however, are community members without convictions, arguing a point just to see the other person go red. They turn perfectly interesting threads into festering cesspools of resentment.

We've talked about what to do with them. We've stepped in and asked posters to stop breaking the discussion rules. We've blocked scads of comments, and even a few community accounts. Eventually, we came to the obvious conclusion that the only thing that will move this conversation forward is to ask the community to ignore them.

So, here's a new community rule: Do not "feed" the trolls. We encourage community members to report abuse by trolls. But we also ask that you not engage with trolls in the comment threads. Reacting to their provocations is exactly what they want.

If we see you feeding a troll, we will remove both the troll's comments and your responses.

I messaged with a few community members about implementing this new rule and the reaction was mostly positive. But everyone had one question: How do you define a troll?

I think I've already given some definition to the concept of a troll. But community member Peter Wilbur added a bit more: "I think of it," he wrote in an e-mail, "as someone who doesn't engage others in a discussion, who posts irrelevant comments, or who goes off on the same rant no matter the topic."

In some ways, a troll is like the person at the party who's a little too drunk and picks a fight with everyone. He (or she) is the one who makes things so hostile that everyone avoids a gathering as soon as they see him on the guest list.

Our oft-stated principle is that we want the NPR.org community to be home to a civil conversation that avoids insults, vulgarities and unsubstantiated conspiracy theories. We ask for first and last names during the registration process because we want users to remember that behind our funny avatars and strong views are real human beings.

Trolls tend to hide behind the anonymity of the Internet to make community interactions less human. So, from now on, let's ignore them.

-- Eyder Peralta

comments () | | e-mail

 
Editorial Dec. 30, 2008

Going To D.C. For Inauguration Day? Tell Us About It!

If you're planning to make the trip to the nation's capital to watch President-elect Obama take the oath, we'd like to hear about your plans. No matter if you're coming by car, by foot, by boat or plane -- we want your story. If your inauguration trip has particularly special meaning for you or your community, tell us that, too.

Tell us your plans in the comment area below, or e-mail us at homework@npr.org. We may even contact you to find out more!

Note: This post was originally published on Dec. 19 and then republished on Nov. 3 so that comments could remain open beyond the normal seven-day limit.

comments () | | e-mail

 
API Dec. 18, 2008

API Upgrade : Mix Your Own Podcast and Other New Features/Content

Today we have some exciting new API enhancements to share with you, including Mix Your Own Podcast, a new extension that offers users an infinite number of ways to customize NPR podcasts. Here are more details about Mix Your Own Podcast as well as some of the other features and content that we launched:

Mix Your Own Podcast
Prior to this release, the API offered only streaming formats of our audio content, including Windows Media, Real Audio, and progressive download MP3. These formats were supported by a Terms of Use that required API users to stream the audio from our servers, preventing them from downloading the audio. With today's launch, however, the API now allows users to slice through the NPR.org archive to create custom podcast feeds based on virtually any aggregation (or combination of aggregations) in the API. To learn more about this, go to the NPR Podcast Directory.
Due to various current constraints, the only real exception here is that users will not be allowed to create full-show podcasts of Morning Edition, All Things Considered, Weekend Edition Saturday or Weekend Edition Sunday. However, all stories from these and other programs will be available to create any other podcast mashup in the system.

Station Finder API. With this release, we are also offering access to our Station Finder API. This API will allow users to pass in zip codes, city/state, station call letters or latitude/longitude information, and we will return a list of stations that can be heard in that location. The station results also include key information about the stations, including links to their home page, schedule page, audio streams, RSS feeds, podcasts, station logo and more. Because the system also has station stories from some of these stations (and more of this content will become available in the coming months), you will be able to, for example, search for a zip code, identify the stations in that zip code, then find all of the stories from all of the stations returned. Over the coming months, more station content will be made available through the API.

New Content: Fresh Air and StoryCorps. With this release, we are also making available the full archive of Fresh Air and StoryCorps. For Fresh Air, we will be explosing over 10,000 stories (and counting) dating back to 1993. The StoryCorps offering will include about 200 stories (and counting) dating back to 2005.

Query By Asset Type
Now you can query the API to get stories that contain a particular type of asset. For example, you can filter your query to only get stories that contain images (useful if you are building a slideshow application, for example), or stories with audio, or stories with long-form text. To use this new feature, append &requiredAssets=image to your query string and you will get only stories with images. The other allowed values for this parameter are audio and text. You can combine these filters with a comma-delimited string (&requiredAssets=image,text,audio). This new feature will be added to the documentation and the Query Generator in the next week or so. This feature does not work yet with API queries based on free-text search.

We are excited about this new release and view it as the next step in our continued effort to open up our content to the world.
--Daniel Jacobson

comments () | | e-mail

 
API Dec. 8, 2008

API Usage

As mentioned in my previous post about metrics, we have identified quite a few different usages of the API. These implementations range from incorporating NPR stories on member stations' web sites to widgets created by developers in the public. Below are some of the more interesting or comprehensive uses that we have found.

NPR Member Station Implementations

Minnesota Public Radio Program Archives

North Country Public Radio

Oregon Public Broadcasting

KGOU

SouthEast Public Radio

WAMC

Hearing Voices Widget

KJZZ - NPR Simile Timeline


Public User Websites, Widgets, and Applications

Reverbiage Widget

Axiom Stack iPhone Site

KDE Desktop NPR Audio Player

NPR Backstory Twitter Mashup

RubyNPR - A code wrapper in Ruby

All Tweets Considered

NPR Song of the Day Widget for Mac OSX Dashboard

NPR Audio Search Box FireFox Plug-In

If you have created something using the API and it is not included in this list, please let us know about it by adding it in the comments of this post.
--Daniel Jacobson

comments () | | e-mail

 


   
   
   
null


 

About Us

Ever wanted to peer under the hood and learn about the inner workings of the NPR website? Have we got a blog for you, then. Here at Inside NPR.org, the NPR Digital Media team will keep you up-to-date on digital products and services we're developing, including social networking tools and our media player. For more info, please see our FAQ and our discussion rules.

 
 

Search Inside NPR.org

 
 

Contact us

Got a question or comment you want to send to us privately? Use our contact form.

 
 
 

Browse Topics

Services

Programs