Buscar Datos

Prevención de la violencia armada, leyes sobre el control de armas de fuego y el comercio de armas pequeñas:

GunPolicy Datapage API Collection 

 

GET Get Locations

https://www.gunpolicy.org/index.php?option=com_api&app=gpodatapage&clientid=99&key=9d1b7e0191&format=raw&resource=getlocations

Get Locations

Input: none

Params

option com_api
app gpodatapage
clientid 99
key 9d1b7e0191
format raw
resource getlocations
Example RequestGet locations
curl --request GET \
  --url 'https://www.gunpolicy.org/index.php?option=com_api&app=gpodatapage&clientid=99&key=9d1b7e0191&format=raw&resource=getlocations'
							
Example Response200 OK
{
  "locations": [
    {
      "id": "1",
      "location_id": "1",
      "name": "Afghanistan",
      "location": "Afghanistan",
      "type": "country"
    },
    {
      "id": "3",
      "location_id": "3",
      "name": "Albania",
      "location": "Albania",
      "type": "country"
    },
    ...    
{ "id": "206", "location_id": "206", "name": "Zimbabwe", "location": "Zimbabwe", "type": "country" } ] }

GET Get Top Categories

https://www.gunpolicy.org/index.php?option=com_api&app=gpodatapage&clientid=99&key=9d1b7e0191&format=raw&resource=gettopcategories
 

Get Top Level Categories

Input: none

Params

option com_api
app gpodatapage
clientid 99
key 9d1b7e0191
format raw
resource gettopcategories
Example RequestGet Top Categories
curl --request GET \
  --url 'https://www.gunpolicy.org/index.php?option=com_api&app=gpodatapage&clientid=99&key=9d1b7e0191&format=raw&resource=gettopcategories'
							
Example Response200 OK
{
  "result": [
    {
      "id": "1",
      "column_title": "Gun Numbers",
      "column_alias": "gun_numbers"
    },
    {
      "id": "2",
      "column_title": "Death and Injury",
      "column_alias": "gun_death_and_injury"
    },
    ...
    {
      "id": "222",
      "column_title": "Country Profile",
      "column_alias": "country_profile"
    }
  ]
}


GET Get DP Categories

https://www.gunpolicy.org/index.php?option=com_api&app=gpodatapage&clientid=99&key=9d1b7e0191&format=raw&resource=getdpcategories

Get category data

Input: category Alias and location_id

Params

option com_api
app gpodatapage
clientid 99
key 9d1b7e0191
format raw
resource getdpcategories
Example RequestGet dp categories
curl --request GET \
  --url 'https://www.gunpolicy.org/index.php?option=com_api&app=gpodatapage&clientid=99&key=9d1b7e0191&format=raw&resource=getdpcategories'
							
Example Response200 OK
{
  "result": [
    {
      "title": "Gun Numbers",
      "alias": "gun_numbers",
      "subcategories": [
        {
          "title": "Civilian Guns",
          "alias": "civilian_guns",
          "parent_category": "gun_numbers",
          "subcategies": [
            {
              "title": "Number of Privately Owned Firearms",
              "alias": "number_of_privately_owned_firearms",
              "parent_category": "civilian_guns"
            },
            {
              "title": "Rate of Civilian Firearm Possession per 100 Population",
              "alias": "rate_of_civilian_firearm_possession",
              "parent_category": "civilian_guns"
            },
            ...
            {
              "title": "Number of Households with Firearms",
              "alias": "number_of_households_with_firearms",
              "parent_category": "civilian_guns"
            }
          ]
        },
        {
          "title": "Government Guns",
          "alias": "government_guns",
          "parent_category": "gun_numbers",
          "subcategies": [
            {
              "title": "Number of Military Firearms",
              "alias": "military_firearms",
              "parent_category": "government_guns"
            },
            {
              "title": "Routine Arming of Police",
              "alias": "police_use_of_firearms",
              "parent_category": "government_guns"
            },
            {
              "title": "Number of Law Enforcement Firearms",
              "alias": "law_enforcement_firearms",
              "parent_category": "government_guns"
            }
          ]
        }
      ]
    },
... { "title": "Country Profile", "alias": "country_profile", "subcategories": [ { "title": "Conflict Profile", "alias": "conflict_profile", "parent_category": "country_profile", "subcategies": [] }, { "title": "Global Peace Index", "alias": "global_peace_index", "parent_category": "country_profile", "subcategies": [] } ] } ] }

GET Get Category Data

https://www.gunpolicy.org/index.php?option=com_api&app=gpodatapage&clientid=99&key=9d1b7e0191&format=raw&resource=getcategorydata&category=number_of_homicides_any_method&location_id=10

Get category data

Input: category Alias and location_id

Params

option com_api
app gpodatapage
clientid 99
key 9d1b7e0191
format raw
resource getcategorydata
category number_of_homicides_any_method
location_id 10
Example RequestGet Category by data
curl --request GET \
  --url 'https://www.gunpolicy.org/index.php?option=com_api&app=gpodatapage&clientid=99&key=9d1b7e0191&format=raw&resource=getcategorydata&category=number_of_homicides_any_method&location_id=10'
							
Example Response200 OK
{
  "result": {
    "id": "15",
    "location_id": "10",
    "location": "Australia",
    "columnValue": "2016: 244{q9177}; 2015: 265; 2014: 235; 2013: 227; 2012: 285{q9177} {q12091} {q8901}; 2011: 243{q9177} {q7379} {q12091} {q8901} {q6225} {q9635}; 2010: 258{q9177} {q7379} {q6476} {q8365} {q8901} {q6225}; 2009: 272; 2008: 251{q9177} {q7379} {q6476} {q8365} {q8901} {q6225}; 2007: 216; 2006: 256; 2005: 199; 2004: 164; 2003: 278{q7379} {q6476} {q8365} {q8901} {q6225}; 2002: 291; 2001: 300{q6476} {q8365} {q8901} {q6225}; 2000: 340{q8365} {q8901} {q6225}; 1999: 341{q8365} {q6225}; 1998: 312; 1997: 319; 1996: 358; 1995: 342; 1994: 342{q8365}; 1993: 360; 1992: 331; 1991: 351; 1990: 331;",
    "columnPreamble": "In #, annual homicides by any means total ~"
  }
}

GET get citation by location_id and category_alias

https://www.gunpolicy.org/index.php?option=com_api&app=gpodatapage&clientid=99&key=9d1b7e0191&format=raw&resource=getcitationabycategory&category=number_of_homicides_any_method&location_id=10

Get category data

Input: Category Alias and location_id

Params

option com_api
app gpodatapage
clientid 99
key 9d1b7e0191
format raw
resource getcitationabycategory
category number_of_homicides_any_method
location_id 10
Example Requestget citation by location id and category_name
curl --request GET \
  --url 'https://www.gunpolicy.org/index.php?option=com_api&app=gpodatapage&clientid=99&key=9d1b7e0191&format=raw&resource=getcitationabycategory&category=number_of_homicides_any_method&location_id=10%20'
							
Example Response200 OK
{
  "result": {
    "categoryValue": "2016: 244{q9177}; 2015: 265; 2014: 235; 2013: 227; 2012: 285{q9177} {q12091} {q8901}; 2011: 243{q9177} {q7379} {q12091} {q8901} {q6225} {q9635}; 2010: 258{q9177} {q7379} {q6476} {q8365} {q8901} {q6225}; 2009: 272; 2008: 251{q9177} {q7379} {q6476} {q8365} {q8901} {q6225}; 2007: 216; 2006: 256; 2005: 199; 2004: 164; 2003: 278{q7379} {q6476} {q8365} {q8901} {q6225}; 2002: 291; 2001: 300{q6476} {q8365} {q8901} {q6225}; 2000: 340{q8365} {q8901} {q6225}; 1999: 341{q8365} {q6225}; 1998: 312; 1997: 319; 1996: 358; 1995: 342; 1994: 342{q8365}; 1993: 360; 1992: 331; 1991: 351; 1990: 331;",
    "locaton_id": "10 Copy",
    "category_alias": "number_of_homicides_any_method",
    "citations": [
      [
        {
          "id": "9177",
          "title": "Underlying Cause of Death, All Causes, Year of Occurrence, Australia, 2007-2016 - Assault",
          "source": "Causes of Death, Australia, 2016",
          "content": "Chapter XX External causes of morbidity and mortality\n\nAssault (X85-Y09){q6107}\n\nYear: Number of Deaths\n\n2016: 244\n2015: 265\n2014: 235\n2013: 227\n2012: 285\n2011: 243\n2010: 258\n2009: 272\n2008: 251\n2007: 216\n2006: 256\n2005: 199\n2004: 164\n\nAssault by handgun discharge (X93){q6107}\n\nYear: Number of Deaths\n\n2016: 5\n2015: 1\n2014: 4\n2013: 3\n2012: 4\n2011: 6\n2010: 6\n2009: 9\n2008: 7\n2007: 1\n2006: 14\n2005: 4\n2004: 2\n\nAssault by rifle, shotgun and larger firearm discharge (X94){q6107}\n\nYear: Number of Deaths\n\n2016: 21\n2015: 13\n2014: 19\n2013: 11\n2012: 14\n2011: 17\n2010: 22\n2009: 18\n2008: 11\n2007: 14\n2006: 15\n2005: 10\n2004: 5\n\nAssault by other and unspecified firearm discharge (X95){q6107}\n\nYear: Number of Deaths\n\n2016: 16\n2015: 13\n2014: 8\n2013: 21\n2012: 24\n2011: 9\n2010: 11\n2009: 10\n2008: 9\n2007: 11\n2006: 12\n2005: 5\n2004: 10\n\nAll causes of death data from 2006 onward are subject to a revisions process - once data for a reference year are 'final', they are no longer revised. Affected data in this table are:  2006-2012 (final), 2013 (revised), 2014-2015 (preliminary).  See Explanatory Notes 52-55 and A More Timely Annual Collection: Changes to ABS Processes (Technical Note) in this publication.  See also Causes of Death Revisions, 2012 and 2013 (Technical Note) in Causes of Death, Australia, 2014 (cat. no. 3303.0). \n\nTotal, firearm discharge, assault (X93-X95){q6107}\n\nYear: Number of Deaths\n\n2016: 42\n2015: 27\n2014: 31\n2013: 35\n2012: 42\n2011: 32\n2010: 39\n2009: 37\n2008: 27\n2007: 26\n2006: 41\n2005: 19\n2004: 17\n\n[Editor's Note: Total of gun deaths from assault calculated by GunPolicy.org]",
          "page": "",
          "city": "Canberra",
          "publisher": "Australian Bureau of Statistics",
          "full_url": "/firearms/citation/quotes/9177"
        }
      ],
      [
        {
          "id": "9177",
          "title": "Underlying Cause of Death, All Causes, Year of Occurrence, Australia, 2007-2016 - Assault",
          "source": "Causes of Death, Australia, 2016",
          "content": "Chapter XX External causes of morbidity and mortality\n\nAssault (X85-Y09){q6107}\n\nYear: Number of Deaths\n\n2016: 244\n2015: 265\n2014: 235\n2013: 227\n2012: 285\n2011: 243\n2010: 258\n2009: 272\n2008: 251\n2007: 216\n2006: 256\n2005: 199\n2004: 164\n\nAssault by handgun discharge (X93){q6107}\n\nYear: Number of Deaths\n\n2016: 5\n2015: 1\n2014: 4\n2013: 3\n2012: 4\n2011: 6\n2010: 6\n2009: 9\n2008: 7\n2007: 1\n2006: 14\n2005: 4\n2004: 2\n\nAssault by rifle, shotgun and larger firearm discharge (X94){q6107}\n\nYear: Number of Deaths\n\n2016: 21\n2015: 13\n2014: 19\n2013: 11\n2012: 14\n2011: 17\n2010: 22\n2009: 18\n2008: 11\n2007: 14\n2006: 15\n2005: 10\n2004: 5\n\nAssault by other and unspecified firearm discharge (X95){q6107}\n\nYear: Number of Deaths\n\n2016: 16\n2015: 13\n2014: 8\n2013: 21\n2012: 24\n2011: 9\n2010: 11\n2009: 10\n2008: 9\n2007: 11\n2006: 12\n2005: 5\n2004: 10\n\nAll causes of death data from 2006 onward are subject to a revisions process - once data for a reference year are 'final', they are no longer revised. Affected data in this table are:  2006-2012 (final), 2013 (revised), 2014-2015 (preliminary).  See Explanatory Notes 52-55 and A More Timely Annual Collection: Changes to ABS Processes (Technical Note) in this publication.  See also Causes of Death Revisions, 2012 and 2013 (Technical Note) in Causes of Death, Australia, 2014 (cat. no. 3303.0). \n\nTotal, firearm discharge, assault (X93-X95){q6107}\n\nYear: Number of Deaths\n\n2016: 42\n2015: 27\n2014: 31\n2013: 35\n2012: 42\n2011: 32\n2010: 39\n2009: 37\n2008: 27\n2007: 26\n2006: 41\n2005: 19\n2004: 17\n\n[Editor's Note: Total of gun deaths from assault calculated by GunPolicy.org]",
          "page": "",
          "city": "Canberra",
          "publisher": "Australian Bureau of Statistics",
          "full_url": "/firearms/citation/quotes/9177"
        }
      ],
... ] } }

GET Get Glossary data

https://www.gunpolicy.org/index.php?option=com_api&app=gpodatapage&clientid=99&key=9d1b7e0191&format=raw&resource=getglosarydata&category=number_of_homicides_any_method&location_id=10

Get category data

Input: Category Alias and location_id

Params

option com_api
app gpodatapage
clientid 99
key 9d1b7e0191
format raw
resource getglosarydata
category number_of_homicides_any_method
location_id 17
Example RequestGet glosary data
curl --request GET \
  --url 'https://www.gunpolicy.org/index.php?option=com_api&app=gpodatapage&clientid=99&key=9d1b7e0191&format=raw&resource=getglosarydata&category=number_of_homicides_any_method&location_id=17'
							
Example Response200 OK
{
  "result": {
    "id": "17",
    "column_alias": "number_of_homicides_any_method",
    "column_title": "Homicides (any method)",
    "title": "Number of Homicides (any method)",
    "subtitle": "Definition and Selection Criteria",
    "content": "The reported, or estimated annual total of completed, intentional homicides committed by any means, in years descending.\r\n\r\nWhere a jurisdiction's published count of 'annual homicide' includes cases of attempted (uncompleted) homicide, these figures have been disaggregated wherever possible.\r\n\r\nIn the United States, this category is confused by inaccurate and conflicting data published, suppressed or labelled as unreliable by the Centers for Disease Control and Prevention (CDC) and the Federal Bureau of Investigation (FBI). Suppression can result in zero values where in fact homicides did occur.\r\n\r\nIncomplete classification by local agencies can also result in a significant proportion of events being categorised as 'unknown cause' or similar.\r\n\r\nBefore quoting these datasets, please follow the citation links for a description of the considerable differences between them and the reasons for data suppression.",
    "modified": "2016-05-10 22:35:29",
    "published": "1",
    "region_aggregation_type": "summation"
  }
}

  

To access all these API and Data you need to have a unique client_id and secret key.

   

In order to get your unique client_id and secret key or if you've any questions regarding this, please mail us at Esta dirección de correo electrónico está siendo protegida contra los robots de spam. Necesita tener JavaScript habilitado para poder verlo.. Or send your queries through our Contact Us page. Thanks!