Skip to content

area information

robert-valueguard edited this page Aug 15, 2022 · 24 revisions

The code below gives an example of how to use the client to get area information data

import valueguard
import requests
import pandas

api_host="<api_host>"

vgClient = valueguard.Client()
vgClient.server_url = api_host
vgClient.authenticate("<username>", "<password>")

vgClient.access_token

url = api_host + "/v1/area/information?access_token=" + vgClient.access_token + "&area_ids=5&key_ids=1"
response = requests.request("GET", url, headers={}, data={})
pandas.DataFrame(response.json()['area_information'])[:10]

Search criteria fields

Field name Description Example
area_id ID of area 5
field_id ID of field 1
field_name Name of the information field Befolkningsmängd
value Value of the chosen field 1407
unit Unit of the chosen field Antal människor
information_source_id ID of the information source 1
information_source_name Name of the information source Befolkningsstatistik

Raw request

Get

curl https://api.valueguard.se/v1/area/information?access_token={access_token}&id={id}
Clone this wiki locally