Skip to content

Commit

Permalink
improved readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fccoelho committed May 11, 2021
1 parent d090a6b commit 5206a30
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ Features
* List region and country codes
* get the data as pandas Dataframes

Example usage
-------------
For example, to search for health data ona certain topic, like smoking

.. code-block:: Python
import ghoclient
ghoclient.index.search('smoking')
The above lines will fetch a Dataframe with all indicators containing the word smoking in their description.

Credits
-------

Expand Down
6 changes: 5 additions & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ To use GHOclient in a project::
import ghoclient
GC = ghoclient.GHOSession()

from this object a simple API is available to fetch data from the WHO's Global Health Observatory::
Upon being imported for the first time, ghoclient creates a fulltext index of the description of all the indicators available. So you can search the observatory by keyword::

ghoclient.index.search('smoking')

from the session object a simple API is available to fetch data from the WHO's Global Health Observatory::

df = GC.fetch_data_from_codes(like='MALARIA')
df.head()
Expand Down

0 comments on commit 5206a30

Please sign in to comment.