1420.0.55.001 - Population Clock Web Service, User Guide  
Latest ISSUE Released at 11:30 AM (CANBERRA TIME) 11/07/2014  First Issue
   Page tools: Print Print Page Print all pages in this productPrint All RSS Feed RSS Bookmark and Share Search this Product

Frequently Asked Questions (FAQs)

What is a web service (or an API)?

    Web services are interfaces for use by programmers to request data from a data provider that they wish to use in their own applications. As they provide an interface to data, they are also known by the term Application Programming Interface (or API).

    As part of the service they provide, APIs include a set of rules or specifications used for software to software communication. This allows programmers to build applications that consume, automatically retrieve, combine and display data.
    Currently ABS provides one API – the ABS Population Clock Web Service / API. More details in the sections below.
      What is the ABS Population Clock API?

      The ABS Population Clock Web Service / API is a RESTful web service providing an alternative method of downloading population figures, as well as a short-term population projection for the specific purpose of producing a “population clock” for Australia. The projection is based on estimated resident population (ERP) figures published on the ABS website in the latest release of Australian Demographic Statistics (ABS Cat. No. 3101.0). The data in the API are sourced from ABS’s free interactive data query tool ABS.Stat.

      The Population Clock Web Service / API makes use of Representational State Transfer (REST) architecture to allow for the simplest set of communication requirements between the data provider web service and consumer software.

      The API provides its data in a JavaScript Object Notation (JSON) format. JSON can be easily and efficiently manipulated as required through class libraries which are provided by most common programming languages.

      Access to the Population Clock Web Service / API is through the following URI: http://www.abs.gov.au/api/demography/populationprojection.

      One unique feature of the Population Clock Web Service / API is its “popNow” figure. This figure is a live projected Australian total population figure that is calculated at the time of request. It uses the same calculation as the population figure displayed on the ABS website population clock.

      The data in the API is licensed for reuse under Creative Commons 2.5, and Terms of Use governing use of the API are also available on the ABS website.

      For more information, see the page For Developers.

      The Population Clock Web Service / API data source

      The population figures provided by Population Clock Web Service / API are sourced from two datasets published on ABS.Stat: The quarterly ERP data included in the API are also published on the ABS website in Australian Demographic Statistics (ABS Cat. No. 3101.0).

      How is the data in the ABS Population Clock Web Service / API calculated?

      The population clock uses linear interpolation between the base population (latest Estimated Resident Population) and the projected population one year ahead, to calculate the population at any time point between the start and end points.
      The following graph highlights the methodology of linear interpolation. In this graph, X0 represents the start time and X1 the end time (in this case one year later); Y0 is the start population and Y1 is the end population. Given a particular time X between X0 and X1, we can find the corresponding Y population for the time point based on where our X intersects with the blue line.

      Image: Linear interpolation graph
      Source: http://en.wikipedia.org/wiki/Linear_interpolation


      Below is a detailed explanation of how the Population Clock Web Service/ API produces its population figures:

          i. To calculate popNow
              Step 1 – Calculate population change over a period of time
                Growth = EndPopulation – StartPopulation
                Example:
                StartPopulation: Australia’s population on 30/09/2013 at 11:59:59pm = 23 235 837 (data sourced from ABS.Stat dataset Quarterly Population Estimates (ERP), by State/Territory, Sex and Age)
                EndPopulation: Australia’s population on 30/09/2014 at 11:59:59pm = 23 644 636 (Data sourced from ABS.Stat dataset Population clock component data)
                Growth = 23 644 636 – 23 235 837
                Growth = 408 799
              Step 2 – Calculate the time difference between now and the start of the period
                timeGone = timeNow – StartTime
                Example:
                timeNow: Current time 06/06/2014 at 11:59:59pm
                StartTime: Date and time of base population (StartPopulation), = 30/09/2013 at 11:59:59pm (data sourced from ABS.Stat dataset Quarterly Population Estimates (ERP), by State/Territory, Sex and Age)
                timeGone = 249 days
                timeGone = 21 513 600 seconds
              Step 3 - Calculate the time difference between the start and end of the period
                timeTotal = EndTime – StartTime
                Example:
                StartTime: Date and time of base population (Start Population) = on 30/09/2013 at 11:59:59pm (data sourced from ABS.Stat dataset Quarterly Population Estimates (ERP), by State/Territory, Sex and Age)
                EndTime: Date and time of EndPopulation (one year ahead of Start Time ) = on 30/09/2014 at 11:59:59pm (data sourced from ABS.Stat dataset Population clock component data)
                timeTotal = 365 days
                timeTotal = 31 536 000 seconds
              Step 4 – Calculate the time percentage of what has already past
                timePercent = (timeGone / timeTotal) x 100
                Example:
                timePercent = (21 513 600 / 31 536 000) x 100
                timePercent = 68.22%
              Step 5 – Calculate the increase amount of the population since the start of the period
                growthPopulation = Growth x timePercent
                Example:
                Growth: As calculated in step 1 = 408 799
                timePercent: As calculated in step 4 = 68.22%
                growthPopulation = 408 799 x 68.22%
                growthPopulation = 278 882 (rounded down as the population clock will only tick over when a whole number is reached)
              Step 6 – Calculate the current population figure
                popNow = StartPopulation + growthPopulation
                Example:
                StartPopulation: Australia’s population on 30/09/2013 at 11:59:59pm = 23 235 837 (data sourced from ABS.Stat dataset Quarterly Population Estimates (ERP), by State/Territory, Sex and Age)
                growthPopulation: as calculated in step 5 = 278 883
                popNow = 23 235 837 + 278 882
                popNow = 23 514 719
          ii. To calculate Growth Rate
              GrowthRate = timeTotal/Growth
              Example:
              timeTotal: as calculated in step 3 = 31 536 000 seconds
              Growth = EndPopulation – StartPopulation
              Growth: as calculated in step 1 = 408 799
              GrowthRate = 31 536 000/408 799
              GrowthRate = 77.14305 seconds
              GrowthRate = 1 minute and 17 seconds
          iii. To calculate Death Rate
              DeathRate = timeTotal/Deaths
              Example:
              timeTotal: as calculated in step = 331 536 000 seconds
              Deaths = 146 169 (number of projected deaths - data sourced from ABS.Stat dataset Population clock component data)
              DeathRate = 31 536 000/146 169
              DeathRate = 215.7503 seconds
              DeathRate = 3 minutes and 36 seconds

          iv. To calculate Birth Rate
              BirthRate = timeTotal/Births
              Example:
              timeTotal: as calculated in step 3 = 31 536 000 seconds
              Births = 310 568 (number of projected births - data sourced from ABS.Stat dataset Population clock component data)
              BirthRate = 31 536 000/310 568
              BirthRate = 101.543 seconds
              BirthRate = 1 minute and 42 seconds
          v. To calculate Net Migration Rate
              NetMigrationRate = timeTotal/NetMigration
              Example:
              timeTotal: as calculated in step 3 = 31 536 000 seconds
              NetMigration =244 400 (number of projected net migrants - data sourced from ABS.Stat dataset Population clock component data)
              NetMigrationRate = 31 536 000/244 400
              NetMigrationRate = 129.0344 seconds
              NetMigrationRate = 2 minutes and 9 seconds
      How does ABS use the Population Clock API?
        The ABS Stats iOS app is one example of an application taking the latest population data from the Population Clock Web Service / API and presenting it on a smart phone platform. The ABS Stats iOS app is designed with a cache to store the population data it retrieves from the Population Clock Web Service / API. In this way, the app is able to perform its own calculations and present the Australian population projection in real time. This eliminates the need for frequent continuous API polling by the app, which in turns removes other technological factors such as network latency and network connectivity. Overall, using a cache provides a more efficient and responsive iOS app for a better user experience.