Skip to content

Commit

Permalink
Update READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
David Breuer committed May 27, 2020
1 parent 988002e commit 5fcd568
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ A python module for returning data about countries, ISO info and states/province
* [.borders()](#borders)
* [.calling_codes()](#calling_codes)
* [.capital()](#capital)
* [.capital_latlng()](#capital_latlng)
* [.currencies()](#currencies)
* [.demonym()](#demonym)
* [.geojson()`](#geo_json)
Expand Down Expand Up @@ -83,6 +84,10 @@ country.info()
'borders': [],
'callingCodes': ['65'],
'capital': 'Singapore',
'capital_latlng': [
1.357107,
103.819499
],
'currencies': ['SGD'],
'demonym': 'Singaporean',
'flag': '',
Expand Down Expand Up @@ -210,6 +215,21 @@ country.capital()
'Singapore'
```

### .capital_latlng()

Returns capital city latitude and longitude for a specified country

```python
# coding=utf-8
from countryinfo import CountryInfo


country = CountryInfo('Singapore')
country.capital_latlng()
# returns array, approx latitude and longitude for country capital
[1.357107, 103.819499]
```

### .currencies()

Returns official currencies for a specified country
Expand Down Expand Up @@ -502,6 +522,7 @@ country.all()
'borders': ['BWA', 'MOZ', 'ZAF', 'ZMB'],
'callingCodes': ['263'],
'capital': 'Harare',
'capital_latlng': [-17.831773, 31.045686],
'currencies': ['USD'],
'demonym': 'Zimbabwean',
'flag': '',
Expand Down Expand Up @@ -647,7 +668,7 @@ If like to contribute in a good way, then follow the following guidelines.
## Disclaimer

This is being maintained in the contributor's free time, and as such, may contain minor errors in regards to some countries.
Most of the information included in this library is what is listed on Wikipedia. If there is an error,
Most of the information included in this library is what is listed on Wikipedia. If there is an error,
please let me know and I will do my best to correct it.

## License
Expand Down
18 changes: 18 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ APIs
- `.borders() <#borders>`__
- `.calling\_codes() <#calling_codes>`__
- `.capital() <#capital>`__
- `.capital_latlng() <#capital_latlng>`__
- `.currencies() <#currencies>`__
- `.demonym() <#demonym>`__
- `.geojson()\` <#geo_json>`__
Expand Down Expand Up @@ -224,6 +225,22 @@ Returns capital city for a specified country
# returns string
'Singapore'
.capital_latlng()
~~~~~~~~~~~~~~~~~

Returns capital city latitude and longitude for a specified country

.. code:: python
# coding=utf-8
from countryinfo import CountryInfo
country = CountryInfo('Singapore')
country.capital_latlng()
# returns array, approx latitude and longitude for country capital
[1.357107, 103.819499]
.currencies()
~~~~~~~~~~~~~

Expand Down Expand Up @@ -536,6 +553,7 @@ countries. This will be super big. Not recommended.
'borders': ['BWA', 'MOZ', 'ZAF', 'ZMB'],
'callingCodes': ['263'],
'capital': 'Harare',
'capital_latlng': [-17.831773, 31.045686],
'currencies': ['USD'],
'demonym': 'Zimbabwean',
'flag': '',
Expand Down

0 comments on commit 5fcd568

Please sign in to comment.