{
    "version" : "https://jsonfeed.org/version/1",
    "content" : "news",
    "type" : "single",
    "title" : "The API Briefing: Keeping an Eye on Crime with the National Crime Victimization Survey API |Digital.gov",
    "description": "The API Briefing: Keeping an Eye on Crime with the National Crime Victimization Survey API",
    "home_page_url" : "/preview/gsa/digitalgov.gov/bc-archive-content-3/","feed_url" : "/preview/gsa/digitalgov.gov/bc-archive-content-3/2014/11/19/the-api-briefing-keeping-an-eye-on-crime-with-the-national-crime-victimization-survey-api/index.json","item" : [
    {"title" :"The API Briefing: Keeping an Eye on Crime with the National Crime Victimization Survey API","summary" : "Every year, the Bureau of Justice Statistics surveys nearly 80,000 households and over 143,000 individuals about crime victimization. What is unique about this survey is that both reported and unreported crimes data is collected. The survey has a well-documented API which offers data in the CSV, XML, and JSON formats. Let’s examine the documentation to","date" : "2014-11-19T11:05:42-04:00","date_modified" : "2025-01-27T19:42:55-05:00","authors" : {"bbrantley" : "Bill Brantley"},"topics" : {
        
            "application-programming-interface" : "Application programming interface"
            },"branch" : "bc-archive-content-3",
      "filename" :"2014-11-19-the-api-briefing-keeping-an-eye-on-crime-with-the-national-crime-victimization-survey-api.md",
      
      "filepath" :"news/2014/11/2014-11-19-the-api-briefing-keeping-an-eye-on-crime-with-the-national-crime-victimization-survey-api.md",
      "filepathURL" :"https://github.com/GSA/digitalgov.gov/blob/bc-archive-content-3/content/news/2014/11/2014-11-19-the-api-briefing-keeping-an-eye-on-crime-with-the-national-crime-victimization-survey-api.md",
      "editpathURL" :"https://github.com/GSA/digitalgov.gov/edit/bc-archive-content-3/content/news/2014/11/2014-11-19-the-api-briefing-keeping-an-eye-on-crime-with-the-national-crime-victimization-survey-api.md","slug" : "the-api-briefing-keeping-an-eye-on-crime-with-the-national-crime-victimization-survey-api","url" : "/preview/gsa/digitalgov.gov/bc-archive-content-3/2014/11/19/the-api-briefing-keeping-an-eye-on-crime-with-the-national-crime-victimization-survey-api/","content" :"\u003cdiv class=\"image\"\u003e\n  \u003cimg\n    src=\"https://s3.amazonaws.com/digitalgov/_legacy-img/2014/11/600-x-400-Crime-scene-no-fake-blood-splatter-Merydolla-iStock-Thinkstock-503890771.jpg\"\n    alt=\"Crime scene concept art: the word crime in white lettering and red, white, and blue police lights are displayed on asphalt\"/\u003e\u003c/div\u003e\n\n\n\u003cp\u003eEvery year, the \u003ca href=\"http://www.bjs.gov/developer/ncvs/index.cfm\" target=\"_blank\"\u003eBureau of Justice Statistics\u003c/a\u003e surveys nearly 80,000 households and over 143,000 individuals about crime victimization. What is unique about this survey is that both reported and unreported crimes data is collected. The survey has a well-documented API which offers data in the \u003ca href=\"http://en.wikipedia.org/wiki/Comma-separated_values\" target=\"_blank\"\u003eCSV\u003c/a\u003e, \u003ca href=\"http://en.wikipedia.org/wiki/XML\" target=\"_blank\"\u003eXML\u003c/a\u003e, and \u003ca href=\"http://en.wikipedia.org/wiki/JSON\" target=\"_blank\"\u003eJSON\u003c/a\u003e formats. Let’s examine the documentation to determine how a developer could use the data in the app.\u003c/p\u003e\n\u003cp\u003eThe National Crime Victimization Survey (NCVS) API is split into “personal victimization” data and “household victimization” data. The \u003ca href=\"http://www.bjs.gov/developer/ncvs/personalFields.cfm\" target=\"_blank\"\u003epersonal victimization data\u003c/a\u003e has 32 variables that describes the crime and gives the victim’s demographic information. The \u003ca href=\"http://www.bjs.gov/developer/ncvs/householdFields.cfm\" target=\"_blank\"\u003ehousehold victimization data\u003c/a\u003e has similar information in 29 variables.\u003c/p\u003e\n\u003cp\u003eObtaining the information is easy. The documentation provides sample \u003ca href=\"http://www.bjs.gov/developer/ncvs/developers.cfm\" target=\"_blank\"\u003eAPI endpoints\u003c/a\u003e that helps the developer create a URL (uniform resource locator) to return data in a specific format. For example, if a developer would like all personal victimization data for 2010 as a JSON file, he or she would use the following URL: \u003ca href=\"http://www.bjs.gov:8080/bjs/ncvs/v2/personal/2010?format=json\"\u003ehttp://www.bjs.gov:8080/bjs/ncvs/v2/personal/2010?format=json\u003c/a\u003e (Caution: link will download a large file). Other URL calls could return data by population or the count of household incidents by year.\u003c/p\u003e\n\u003cp\u003eThe NCVS API is an excellent data source for beginning developers to learn how to request and parse data for apps. Developers can use the most popular scripting languages to acquire the data and format it in a data table, charts, and interactive displays. The documentation is comprehensive and clearly defines the data fields. The only suggestion I’d have is to make it possible to include location information so that app developers could also experiment with mapping the data.\u003cem\u003e*API – Application Programming Interface. How software programs and databases share data and functions with each other. Check out\u003c/em\u003e \u003ca href=\"/preview/gsa/digitalgov.gov/bc-archive-content-3/2013/04/30/apis-in-government/\"\u003e\u003cem\u003eAPIs in Government\u003c/em\u003e\u003c/a\u003e \u003cem\u003efor more information.\u003c/em\u003e\n\u003cem\u003eEach week in “The API Briefing,” I will showcase government APIs and the latest API news and trends. Visit this blog every week to learn how government APIs are transforming government and improving government services for the American people. If you have ideas for a topic or have questions about APIs, please contact me via\u003c/em\u003e \u003ca href=\"mailto:Bill.Brantley@wdc.usda.gov\"\u003e\u003cem\u003eemail\u003c/em\u003e\u003c/a\u003e\u003cem\u003e.\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cem\u003eDr. William A. Brantley\u003c/em\u003e\u003c/strong\u003e \u003cem\u003eis the HRIS Branch Chief in the USDA’s Rural Development Human Resources Office. You can find out more about his work in this space at\u003c/em\u003e \u003ca href=\"http://billbrantley.com/\"\u003e\u003cem\u003eBillBrantley.com\u003c/em\u003e\u003c/a\u003e\u003cem\u003e. All opinions are his own and do not reflect the opinions of the USDA or GSA.\u003c/em\u003e\u003c/p\u003e\n"}
  ]
}
