Using the U.S. Digital Registry API to Pull Government Social Media Accounts
I've cached the results of the U.S. Digital Registry API, providing me with a list of agencies and their social media accounts.
Join the DZone community and get the full member experience.Join For Free
Over the holidays, I pulled the data.gov index of federal government data. The next item on my list was to cache the results of the U.S. Digital Registry API, providing me with a list of agencies and their social media accounts. I pulled the JSON from the API and then published to the GitHub repository for this site so that I could use for several different applications.
Drive Listings of Federal Agency Social Media
I wanted a quick way to get at the Twitter and GitHub accounts for the federal government and have in a single location (GitHub). I've published YAML data to GitHub, and using Jekyll, I've created listings for the Twitter, Github, Facebook, Pinterest, Instagram, and LinkedIn accounts, making them easier to browse when I need them.
Accessible in Machine-Readable Format for Others
I have several uses for the listing of government agencies and their social media accounts. I needed the data in a machine-readable format on GitHub so that I could pull remotely, and even check out the Github repository if I need to. This approach also makes the data available for anyone else to fork and put to use in their own way using Github.
Profile the Agencies Using Each of the Social APIs
Now that I have the social media account for these federal agencies pulled using the U.S. Digital Registry API, I'm going to take each of the accounts and pull their profile details and any other relevant information using the APIs for each of the social media services. APIs for the win — providing me with a way to quickly profile the U.S. Federal Government at scale and stay in tune either real-time or when I think a checkup is required.
I'm not sure what I'll do next on this project. I'd like to take a look at how active each account is and maybe check in each week to see if any accounts have gone dormant, picked up in activity, or possibly publishing anything interesting. At this point, I just wanted to have the social media landscape for these federal agencies mapped out. I have other social media data beyond what I have displayed on the project site. I just wanted to get going pulling the landscape. Then, I'll evaluate using the index as an engine for monitoring and tuning into what the government is up to (or not). Once that is done, I'll consider expanding to other social media channels.
Published at DZone with permission of Kin Lane, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.