diff --git a/.env.example b/.env.example deleted file mode 100644 index 511a1a6..0000000 --- a/.env.example +++ /dev/null @@ -1 +0,0 @@ -NASA_API_KEY = diff --git a/docs/bibliography.bib b/docs/bibliography.bib deleted file mode 100644 index 07103db..0000000 --- a/docs/bibliography.bib +++ /dev/null @@ -1,39 +0,0 @@ -@book{WorldBank2021WorldDevelopmentReport, - author = {{World Bank}}, - publisher = {World Bank}, - url = {http://hdl.handle.net/10986/35218}, - date = {2021}, - note = {License: CC BY 3.0 IGO}, - title = {{W}orld {D}evelopment {R}eport 2021 : {D}ata for {B}etter {L}ives}, - type = {World Development Report}, - year = {2021}, -} -@book{WorldBank2022WorldDevelopmentReport, - author = {{World Bank}}, - publisher = {World Bank}, - url = {http://hdl.handle.net/10986/36883}, - date = {2022}, - note = {License: CC BY 3.0 IGO}, - title = {{W}orld {D}evelopment {R}eport 2022 : {F}inance for an {E}quitable {R}ecovery}, - type = {World Development Report}, - year = {2022}, -}, -@book{WorldBank2023WorldDevelopmentReport, - author = {{World Bank}}, - publisher = {World Bank}, - url = {https://openknowledge.worldbank.org/handle/10986/39696}, - date = {2023}, - note = {License: CC BY 3.0 IGO}, - title = {{W}orld {D}evelopment {R}eport 2021 : {M}igrants, {R}efugees, and {S}ocieties}, - type = {World Development Report}, - year = {2023}, -} -@misc{sdgatlas2020, - author = {Pirlea, A. F. and U. Serajuddin and D. Wadhwa and M. Welch and A. Whitby}, - publisher = {World Bank}, - url = {https://datatopics.worldbank.org/sdgatlas.}, - date = {2020}, - note = {License: CC BY 3.0 IGO}, - title = {{A}tlas of the {S}ustainable {D}evelopment {G}oals 2020: {F}rom {W}orld {D}evelopment {I}ndicators}, - year = {2020}, -} diff --git a/docs/gallery.md b/docs/gallery.md deleted file mode 100644 index 3b3eb74..0000000 --- a/docs/gallery.md +++ /dev/null @@ -1,114 +0,0 @@ -# Projects using the template - -> A curated list of projects/repositories using the template. - -::::{grid} -:gutter: 2 - -:::{grid-item-card} [Syria Economic Monitor](https://datapartnership.github.io/syria-economic-monitor) -Using Alternative Data to Understand Changing Trends in Trade and Economic Activity in Syria -::: - -:::{grid-item-card} [Türkiye Earthquake Impact](https://datapartnership.github.io/turkiye-earthquake-impact) -Using Alternative Data to Understand Economic Impacts of the 2023 Turkey–Syria Earthquake -::: -:::: - -::::{grid} -:gutter: 2 - -:::{grid-item-card} [Lebanon Economic Monitor](https://datapartnership.github.io/lebanon-economic-monitor) -Understanding Lebanon’s Economy through Alternative Data -::: - -:::{grid-item-card} [Mocorro Earthquake Impact](https://datapartnership.github.io/morocco-earthquake-impact) -Using Alternative Data to Understand Economic Impacts of the 2023 Morocco earthquake. -::: -:::: - -::::{grid} -:gutter: 2 - -:::{grid-item-card} [Myanmar Economic Monitor](https://datapartnership.github.io/myanmar-economic-monitor) -Understanding Myanmar's Economy through Alternative Data -::: - -:::{grid-item-card} [Pacific Observatory](https://worldbank.github.io/pacific-observatory) -The Pacific Observatory is the World Bank analytical program to explore and develop new information sources to mitigate the impact of data gaps in official statistics for Papua New Guinea (PNG) and the Pacific Island Countries (PICs). - -::: -:::: - -::::{grid} -:gutter: 2 - -:::{grid-item-card} [REaLTabFormer](https://worldbank.github.io/REaLTabFormer) -A suite of auto-regressive and Seq2Seq (sequence-to-sequence) transformer models for tabular and relational synthetic data generation. -::: -:::{grid-item-card} [iQual](https://worldbank.github.io/iQmual) -iQual is a package that leverages natural language processing to scale up interpretative qualitative analysis. It also provides methods to assess the bias, interpretability and efficiency of the machine-enhanced codes. iQual has been applied to analyse interviews on parents' aspirations for their children in Cox's Bazaar, Bangladesh. -:::: - -::::{grid} -:gutter: 2 - -:::{grid-item-card} [GEE Zonal](https://worldbank.github.io/GEE_Zonal/) -This python package provides a wrapper function to request temporal and zonal statistics from Google Earth Engine (GEE) datasets. -::: - -:::{grid-item-card} [Geospatial Operations Support Team (GOST)](https://worldbank.github.io/GOST) -We document important resources, methods, and sources in real time via this live wiki. This repository is the evolving, growing workspace where GOST stores libraries and scripts for operationalizing the many initiatives currently going on in the geospatial realm within the World Bank Group. -::: -:::: - -::::{grid} -:gutter: 2 - -:::{grid-item-card} [DECAT_Space2Stats](https://worldbank.github.io/DECAT_Space2Stats) -Consistent, comparable, authoritative data describing sub-national variation is a constant point of complication for World Bank teams, our development partners, and client countries when assessing and investigating economic issues and national policy. This project will focus on creating and disseminating such data through aggregation of geospatial information at standard administrative divisions, and through the attribution of household survey data with foundational geospatial variables. -::: - -:::{grid-item-card} [ZAF_Econ_Diversification](https://worldbank.github.io/ZAF_Econ_Diversification) -Mapping and quantifying opportunities for economic diversification in Mpumalanga in South Africa -::: -:::: - -::::{grid} -:gutter: 2 - -:::{grid-item-card} [GFF Health Equity](https://worldbank.github.io/health-equity-diagnostics) -This repository contains scripts developed by GOST to map health facilities and understand differences in population access in support of the GFF Country Equity Diagnostic and other projects. -::: - -:::{grid-item-card} [Heatwaves Data Collaborative](https://datapartnership.org/heatwaves/PH) -The Heatwaves Data Collaborative enables teams across sectors and -organizations to simultaneously focus on their areas of expertise, while -collaborating through use of common frameworks and datasets, standards for -production and review of reusable methods, and through regular check-ins to -ensure the different work streams are aligned and build upon each other. -::: -:::: - -::::{grid} -:gutter: 2 - -:::{grid-item-card} [Geospatial Analysis - MENA Poverty and Equity Group](https://worldbank.github.io/mena-pov) -The Geospatial Analysis repository aims to centrally maintain cleaning and analysis of data that leverage geospatial data conducted by the Poverty and Equity Group in the MENA region. -::: - -:::{grid-item-card} [Health Planning in the Philippines](https://datapartnership.org/health-planning-in-philippines) -The team conducted geospatial analysis to advise on key questions that could inform a more integrated health care system, starting with three LGUs (Bohol, Baguio City, and Maguindanao). -::: -:::: - -::::{grid} -:gutter: 2 - -:::{grid-item-card} [Understanding societal responses to policies undertaken during emergencies: Lessons from COVID-19’s Second Wave in Maharashtra](https://datapartnership.github.io/covid-19-maharashtra) -Understanding societal responses to policies undertaken during emergencies: Lessons from COVID-19's Second Wave in Maharashtra -::: - -:::{grid-item-card} [Understanding the vulnerability of New Delhi to Heatwaves](https://datapartnership.org/vulnerability-to-heatwaves-in-india) -Part of Understanding the vulnerability of New Delhi to Heatwaves, this repository holds a collection of (experimental) Jupyter notebooks exploring data available through the Development Data Partnership. -::: -:::: diff --git a/docs/images/github-template-action-enable.png b/docs/images/github-template-action-enable.png deleted file mode 100644 index 8951744..0000000 Binary files a/docs/images/github-template-action-enable.png and /dev/null differ diff --git a/docs/images/github-template-action.png b/docs/images/github-template-action.png deleted file mode 100644 index 2738d51..0000000 Binary files a/docs/images/github-template-action.png and /dev/null differ diff --git a/docs/images/github-template-create.png b/docs/images/github-template-create.png deleted file mode 100644 index a2782ed..0000000 Binary files a/docs/images/github-template-create.png and /dev/null differ diff --git a/docs/images/github-template-pages.png b/docs/images/github-template-pages.png deleted file mode 100644 index 619f8ab..0000000 Binary files a/docs/images/github-template-pages.png and /dev/null differ diff --git a/docs/images/github-template.png b/docs/images/github-template.png deleted file mode 100644 index 9503f66..0000000 Binary files a/docs/images/github-template.png and /dev/null differ diff --git a/notebooks/.gitkeep b/notebooks/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/src/template/__init__.py b/src/template/__init__.py deleted file mode 100644 index a535a10..0000000 --- a/src/template/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from importlib.metadata import version, PackageNotFoundError - -try: - __version__ = version("datalab") -except PackageNotFoundError: - # package is not installed - pass diff --git a/src/template/indicators.py b/src/template/indicators.py deleted file mode 100644 index b98824f..0000000 --- a/src/template/indicators.py +++ /dev/null @@ -1,83 +0,0 @@ -import pandas -import pycountry -import requests - - -class WorldBankIndicatorsAPI: - URL = "https://api.worldbank.org/v2/country" - - def _get_country_code(self, country): - """ - Using `pycountry`, return the ISO 3166-1 alpha-3 country code for corresponding query term. - - See also: - https://github.com/flyingcircusio/pycountry - - Parameters - ---------- - country : str - - Returns - ------- - str - ISO 3166-1 alpha-3 country code for corresponding query term. - - Raises - ------ - LookupError - If the query term is not a valid country. - """ - return pycountry.countries.search_fuzzy(country)[0].alpha_3 - - def _get(self, indicator, country: str = "all", params: dict = {}): - """ - Retrieve a response, valid JSON response or error, from the World Bank Indicators API. - - See also: - https://datahelpdesk.worldbank.org/knowledgebase/articles/889392-about-the-indicators-api-documentation - - Parameters - ---------- - indicator : str - country : str, optional - params : dict, optional - - Returns - ------- - requests.models.Response - Return JSON response from the World Bank Indicators API. - """ - url = f"{self.URL}/{country}/indicator/{indicator}" - - return requests.get(url, params) - - def query(self, indicator, country: list = "all", params: dict = {}): - """ - Retrieve a response, valid JSON response or error, from the World Bank Indicators API. - - See also: - https://datahelpdesk.worldbank.org/knowledgebase/articles/889392-about-the-indicators-api-documentation - - Parameters - ---------- - indicator : str - World Bank API Indicator. - country : list, optional - List of countries. The country name is converted to ISO 3166-1 alpha-3 country code. - params : dict, optional - World Bank API Indicator Query Strings. - - Returns - ------- - pandas.core.frame.DataFrame - Return a Pandas DataFrame obtained with response data from World Bank Indicators API. - """ - if isinstance(country, list): - country = ";".join([self._get_country_code(c) for c in country]) - - params.update({"format": "json", "per_page": 1000}) - - response = self._get(indicator, country, params) - data = response.json()[-1] - - return pandas.json_normalize(data)