Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDX-9874, HDX-9868, HDX-9869 Documentation updates #129

Merged
merged 5 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

The Humanitarian API (HAPI) is being developed by a team from the [Centre for Humanitarian Data](https://centre.humdata.org/).
The Humanitarian API (HDX HAPI) is being developed by a team from the [Centre for Humanitarian Data](https://centre.humdata.org/).

HDX developers are using [Visual Code](https://code.visualstudio.com/) as a standard IDE for this project with development taking place inside Docker containers.

Expand All @@ -26,15 +26,15 @@ docker-compose exec -T hapi sh -c "pytest --log-level=INFO --cov=. --cov-report

As an integration test the `docs` endpoint is inspected "manually".

A local copy of HAPI can be run by importing a snapshot of the database using the following shell script invocation in the host machine.
A local copy of HDX HAPI can be run by importing a snapshot of the database using the following shell script invocation in the host machine.

```shell
./restore_database.sh https://github.com/OCHA-DAP/hapi-pipelines/raw/db-export/database/hapi_db.pg_restore hapi
```

The HAPI application can then be launched using the `start` launch configuration in Visual Code, this serves the documentation at `http://localhost:8844/docs` and the API at `http://localhost:8844/api` in the host machine.
The HDX HAPI application can then be launched using the `start` launch configuration in Visual Code, this serves the documentation at `http://localhost:8844/docs` and the API at `http://localhost:8844/api` in the host machine.

The HAPI database can be accessed locally with the following connection details:
The HDX HAPI database can be accessed locally with the following connection details:

```
URL: jdbc:postgresql://localhost:45432/hapi
Expand Down
4 changes: 2 additions & 2 deletions docs/contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

We appreciate your interest in our work. Here is how to contact us and get involved:

- [Bug reports and feature requests - TBD](fix/this/link) for HAPI are welcome.
- If you have questions or comments about HAPI or the HDX platform, send an email to [[email protected]](mailto:[email protected]).
- [Bug reports and feature requests - TBD](fix/this/link) for HDX HAPI are welcome.
- If you have questions or comments about HDX HAPI or the HDX platform, send an email to [[email protected]](mailto:[email protected]).
- If you would like to be involved in periodic user research about HDX or related services, fill in [this form](https://docs.google.com/forms/d/e/1FAIpQLSdjN3mcDJ8BX-nu4F1veKEa8dYPlRvVcyahev8QjX7qHtha4g/viewform) and we will be in touch.
- For general comments or project ideas, send an email to [[email protected]](mailto:[email protected]) and we will respond as soon as we can.
- [Sign up](bit.ly/humdatamailing) to receive the Centre’s newsletter for updates on our work. Visit bit.ly/humdatamailing
2 changes: 1 addition & 1 deletion docs/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

---

The initial aim of HAPI is to cover all countries that have a humanitarian response plan and cover the data categories from HDX data grids
The initial aim of HDX HAPI is to cover all countries that have a humanitarian response plan and cover the data categories from HDX data grids

| | Affected People - Humanitarian Needs | Affected People - Refugees | Coordination Context - Conflict Events | Coordination Context Funding | Coordination Context - National-risk | Coordination Context - Operational Presence | Food - Food-price | Food - Food-security | Population Social - Population | Population Social - Poverty Rate |
|:----------------------------------:|:----------------------------------:|:-----------------------------------:|:----------------------------:|:----------------------------------:|:-----------------------------------------:|:---------------:|:------------------:|:----------------------------:|:------------------------------:|:------------------------------:|
Expand Down
2 changes: 1 addition & 1 deletion docs/geo.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

---

Much of the data in HAPI references a geographical area. The complimentary geodata to this is provided by ITOS via ARCGIS service accessible here: [https://apps.itos.uga.edu/CODV2API/api/v1/](https://apps.itos.uga.edu/CODV2API/api/v1/)
Much of the data in HDX HAPI references a geographical area. The complimentary geodata to this is provided by ITOS via ARCGIS service accessible here: [https://apps.itos.uga.edu/CODV2API/api/v1/](https://apps.itos.uga.edu/CODV2API/api/v1/)

This service contains the common operational datasets administration boundaries and it can be accessed in a number formats. Enhanced datasets have been standardised and contain the data formatting. Check the [CODs Dashboard](https://cod.unocha.org/) to see the status of different countries.

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Below, you will find example URLs to help you learn how to construct your API qu

## Generating a key

To access HAPI you need to generate an API key. This can be done via the the [sandbox interface encode_identifier endpoint](https://stage.hapi-humdata-org.ahconu.org/docs#/Utility/get_encoded_identifier_api_v1_encode_identifier_get). Enter your application name and email address and it will return the api key. The key must be included as a query string parameter e.g.
To access HDX HAPI you need to generate an API key. This can be done via the the [sandbox interface encode_identifier endpoint](https://stage.hapi-humdata-org.ahconu.org/docs#/Utility/get_encoded_identifier_api_v1_encode_identifier_get). Enter your application name and email address and it will return the api key. The key must be included as a query string parameter e.g.


```
Expand Down
62 changes: 31 additions & 31 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
---


The HDX Humanitarian API (HAPI) is a way to access standardised indicators from multiple sources to automate workflows and visualisations
The HDX Humanitarian API (HDX HAPI) is a way to access standardised indicators from multiple sources to automate workflows and visualisations

HAPI is in beta phase, and we are seeking feedback. To share your thoughts or join our slack channel, send an email to [[email protected]]([email protected]).
HDX HAPI is in beta phase, and we are seeking feedback. To share your thoughts or join our slack channel, send an email to [[email protected]]([email protected]).

The initial scope of HAPI will be the data included in the [HDX Data Grids](https://data.humdata.org/dashboards/overview-of-data-grids). Work is ongoing to continually add more data
The initial scope of HDX HAPI will be the data included in the [HDX Data Grids](https://data.humdata.org/dashboards/overview-of-data-grids). Work is ongoing to continually add more data

## API Key
To access HAPI you need to generate an API key. This can be done via the the [sandbox interface encode_identifier endpoint](https://stage.hapi-humdata-org.ahconu.org/docs#/Utility/get_encoded_identifier_api_v1_encode_identifier_get). Enter your application name and email address and it will return the api key. The key must be included as a query string parameter e.g.
To access HDX HAPI you need to generate an API key. This can be done via the the [sandbox interface encode_identifier endpoint](https://stage.hapi-humdata-org.ahconu.org/docs#/Utility/get_encoded_identifier_api_v1_encode_identifier_get). Enter your application name and email address and it will return the api key. The key must be included as a query string parameter e.g.

```
https://stage.hapi-humdata-org.ahconu.org/api/v1/themes/3w?app_identifier={your api key}
Expand All @@ -21,11 +21,11 @@ https://stage.hapi-humdata-org.ahconu.org/api/v1/themes/3w?app_identifier={your
[The HDX Terms of Service](https://data.humdata.org/faqs/terms)


## The Structure of HAPI
## The Structure of HDX HAPI
### Data Subcategory Endpoints
HAPI is organised around a set of key humanitarian data subcategories like **Baseline Population** and **3W - Operational Presence**. Each of these indicators can be queried via its endpoint.

### Current list of data subcategory endpoints in HAPI
### Current list of data subcategory endpoints in HDX HAPI
#### Affected People
- [Humanitarian Needs](https://stage.hapi-humdata-org.ahconu.org/docs#/Affected%20people/get_humanitarian_needs_api_v1_affected_people_humanitarian_needs_get)
- [Refugees](https://stage.hapi-humdata-org.ahconu.org/docs#/Affected%20people/get_refugees_api_v1_affected_people_refugees_get)
Expand All @@ -44,50 +44,50 @@ HAPI is organised around a set of key humanitarian data subcategories like **Bas

### Supporting Tables
Additional supporting endpoints provide information about locations, codelists, and metadata.
### Current list of supporting endpoints in HAPI
### Current list of supporting endpoints in HDX HAPI
- [Location](https://stage.hapi-humdata-org.ahconu.org/docs#/Locations%20and%20Administrative%20Divisions/get_locations_api_v1_metadata_location_get): Get the lists of locations (countries and similar), and administrative subdivisions used as location references in HAPI. These are taken from the [Common Operational Datasets](https://data.humdata.org/dashboards/cod)
- [admin1](https://stage.hapi-humdata-org.ahconu.org/docs#/Locations%20and%20Administrative%20Divisions/get_admin1_api_v1_metadata_admin1_get): Retrieve metadata about the source of any data available in HAPI.
- [admin2](https://stage.hapi-humdata-org.ahconu.org/docs#/Locations%20and%20Administrative%20Divisions/get_admin2_api_v1_metadata_admin2_get): Retrieve metadata about the source of any data available in HAPI.
- [hdx-metadata](https://placeholder.url/docs#/hdx-metadata): Retrieve metadata about the source of any data available in HAPI.
- [admin1](https://stage.hapi-humdata-org.ahconu.org/docs#/Locations%20and%20Administrative%20Divisions/get_admin1_api_v1_metadata_admin1_get): Retrieve metadata about the source of any data available in HDX HAPI.
- [admin2](https://stage.hapi-humdata-org.ahconu.org/docs#/Locations%20and%20Administrative%20Divisions/get_admin2_api_v1_metadata_admin2_get): Retrieve metadata about the source of any data available in HDX HAPI.
- [hdx-metadata](https://placeholder.url/docs#/hdx-metadata): Retrieve metadata about the source of any data available in HDX HAPI.


## FAQS
### What is an API ?
An API, or Application Programming Interface, is a set of rules and tools that allows different software programs to communicate with each other. It enables developers to interact with external software components or resources efficiently, facilitating operations such as data retrieval, updates, and complex integrations.

### What is HAPI?
HAPI (the Humanitarian API) is an API designed to streamline access to key datasets related to humanitarian response. The API standardises data from a variety of sources and makes them consistently available.
### What is HDX HAPI?
HDX HAPI (the Humanitarian API) is an API designed to streamline access to key datasets related to humanitarian response. The API standardises data from a variety of sources and makes them consistently available.

### Who is HAPI for?
HAPI is designed for developers, researchers and anyone interested in accessing a centralised source of humanitarian data for analysis and decision-making.
### Who is HDX HAPI for?
HDX HAPI is designed for developers, researchers and anyone interested in accessing a centralised source of humanitarian data for analysis and decision-making.

### How do I access HAPI?
You can access HAPI through the API endpoints. Head to the HAPI documentation to get started.
### How do I access HDX HAPI?
You can access HDX HAPI through the API endpoints. Head to the HDX HAPI documentation to get started.

### Do I need an account to access HAPI?
You do not need an account to access HAPI, but you do need an access token which can be generated via the API.
### Do I need an account to access HDX HAPI?
You do not need an account to access HDX HAPI, but you do need an access token which can be generated via the API.

### What time period does the data in the current version of HAPI cover?
The time period covered by the data in the beta version of HAPI varies depending on the resource. Please see the [detailed documentation] for more details. All data contains a reference period. Our goal is to consistently integrate the most up-to-date data from HDX into HAPI.
### What time period does the data in the current version of HDX HAPI cover?
The time period covered by the data in the beta version of HDX HAPI varies depending on the resource. Please see the [detailed documentation] for more details. All data contains a reference period. Our goal is to consistently integrate the most up-to-date data from HDX into HDX HAPI.

### How have key datasets been selected?
Key datasets in the beta-phase HAPI have been selected based on their usage and relevance to pressing humanitarian needs. HAPI aims to incorporate the data in the HDX Data Grids, covering countries with a Humanitarian Response Plan.
Key datasets in the beta-phase HDX HAPI have been selected based on their usage and relevance to pressing humanitarian needs. HDX HAPI aims to incorporate the data in the HDX Data Grids, covering countries with a Humanitarian Response Plan.

### What is a sub-category?

### How up-to-date is the data in HAPI?
HAPI is updated from source data daily. Each dataset’s update frequency varies from daily, weekly, yearly and as needed. Please check the source dataset for further detail.
### How up-to-date is the data in HDX HAPI?
HDX HAPI is updated from source data daily. Each dataset’s update frequency varies from daily, weekly, yearly and as needed. Please check the source dataset for further detail.

### Is the data in HAPI different from the data I can download from HDX?
The data in HAPI is from selected datasets from HDX. Some of the data will have been standardised, such as aligning sector names.
### Is the data in HDX HAPI different from the data I can download from HDX?
The data in HDX HAPI is from selected datasets from HDX. Some of the data will have been standardised, such as aligning sector names.

In the coming months, the standardised datasets that HAPI produces will be added to the source datasets on HDX as downloadable CSV files for easy use in spreadsheet applications.
In the coming months, the standardised datasets that HDX HAPI produces will be added to the source datasets on HDX as downloadable CSV files for easy use in spreadsheet applications.

### How is HAPI different from the HDX CKAN API?
The HDX CKAN API provides programmatic access to metadata from HDX. HAPI provides queryable access to the data values themselves.
### How is HDX HAPI different from the HDX CKAN API?
The HDX CKAN API provides programmatic access to metadata from HDX. HDX HAPI provides queryable access to the data values themselves.

### Why would I use HAPI instead of other organisations’ APIs?
HAPI brings together a core set of humanitarian data in one place, with standardised references. HAPI integrates APIs of other organisations and pulls through non-API data.
### Why would I use HDX HAPI instead of other organisations’ APIs?
HDX HAPI brings together a core set of humanitarian data in one place, with standardised references. HDX HAPI integrates APIs of other organisations and pulls through non-API data.

### How do I give feedback for HAPI?
### How do I give feedback for HDX HAPI?
Please send all feedback to [email protected].
Loading
Loading