Get-stats-time-series-all-years

From UNHCR
Jump to: navigation, search


Returns statistics for time series for all years by specifying population type code, country of residence or country of origin.

Resource URL


http://data.unhcr.org/api/stats/time_series_all_years.json


Parameters


population_type_code

required

Two letter population type code

Example Values: AS

country_of_residence

optional

Three letter acronym of country of residence

Example Values: CHE

country_of_origin

optional

Three letter acronym of country of origin

Example Values: AFG

Example Request


GET http://data.unhcr.org/api/stats/time_series_all_years.json?population_type_code=AS&country_of_origin=AFG&country_of_residence=CHE
[
    {
        "year": "2000",
        "country_of_residence": "CHE",
        "country_of_residence_en": "Switzerland",
        "country_of_origin": "AFG",
        "country_of_origin_en": "Afghanistan",
        "value": "621"
    },
    {
        "year": "2001",
        "country_of_residence": "CHE",
        "country_of_residence_en": "Switzerland",
        "country_of_origin": "AFG",
        "country_of_origin_en": "Afghanistan",
        "value": "729"
    },
    {
        "year": "2002",
        "country_of_residence": "CHE",
        "country_of_residence_en": "Switzerland",
        "country_of_origin": "AFG",
        "country_of_origin_en": "Afghanistan",
        "value": "699"
    },
    {
        "year": "2003",
        "country_of_residence": "CHE",
        "country_of_residence_en": "Switzerland",
        "country_of_origin": "AFG",
        "country_of_origin_en": "Afghanistan",
        "value": "190"
    },
    {
        "year": "2004",
        "country_of_residence": "CHE",
        "country_of_residence_en": "Switzerland",
        "country_of_origin": "AFG",
        "country_of_origin_en": "Afghanistan",
        "value": "195"
    },
    {
        "year": "2005",
        "country_of_residence": "CHE",
        "country_of_residence_en": "Switzerland",
        "country_of_origin": "AFG",
        "country_of_origin_en": "Afghanistan",
        "value": "188"
    },
    {
        "year": "2006",
        "country_of_residence": "CHE",
        "country_of_residence_en": "Switzerland",
        "country_of_origin": "AFG",
        "country_of_origin_en": "Afghanistan",
        "value": "189"
    },
    {
        "year": "2007",
        "country_of_residence": "CHE",
        "country_of_residence_en": "Switzerland",
        "country_of_origin": "AFG",
        "country_of_origin_en": "Afghanistan",
        "value": "251"
    },
    {
        "year": "2008",
        "country_of_residence": "CHE",
        "country_of_residence_en": "Switzerland",
        "country_of_origin": "AFG",
        "country_of_origin_en": "Afghanistan",
        "value": "582"
    },
    {
        "year": "2009",
        "country_of_residence": "CHE",
        "country_of_residence_en": "Switzerland",
        "country_of_origin": "AFG",
        "country_of_origin_en": "Afghanistan",
        "value": "869"
    },
    {
        "year": "2010",
        "country_of_residence": "CHE",
        "country_of_residence_en": "Switzerland",
        "country_of_origin": "AFG",
        "country_of_origin_en": "Afghanistan",
        "value": "923"
    },
    {
        "year": "2011",
        "country_of_residence": "CHE",
        "country_of_residence_en": "Switzerland",
        "country_of_origin": "AFG",
        "country_of_origin_en": "Afghanistan",
        "value": "1369"
    },
    {
        "year": "2012",
        "country_of_residence": "CHE",
        "country_of_residence_en": "Switzerland",
        "country_of_origin": "AFG",
        "country_of_origin_en": "Afghanistan",
        "value": "2228"
    },
    {
        "year": "2013",
        "country_of_residence": "CHE",
        "country_of_residence_en": "Switzerland",
        "country_of_origin": "AFG",
        "country_of_origin_en": "Afghanistan",
        "value": "2190"
    }
]