diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dd84ea78..eab0fd0c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,38 +1,43 @@ --- -name: Bug report -about: Create a report to help us improve +name: Bug Report +about: Use to report a bug title: '' -labels: '' +labels: bug assignees: '' - --- -**Describe the bug** -A clear and concise description of what the bug is. +## Bug Report + +### Description + +Provide a brief overview of the bug encountered. Describe the behavior observed when the bug occurs and explain the behavior expected when the bug is not present. + +### Reproducibility + +- [ ] The bug is reproducible. +- [ ] The bug is intermittent. +- [ ] The bug occurs only under specific conditions. + +#### Steps to Reproduce + +1. List the steps to reproduce the bug. +2. Be as detailed as possible to help with replication. + +#### Screenshots / Error Messages (if applicable) + +Insert any relevant screenshots or error messages related to the bug. -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error +#### Environment -**Expected behavior** -A clear and concise description of what you expected to happen. +- **Operating System**: [e.g., Windows 10, macOS, Linux] +- **Browser (if applicable)**: [e.g., Google Chrome, Firefox, Safari] +- **Application Version/Commit**: [e.g., v1.2.3, Git commit hash] +- **Additional Environment Details**: [e.g., hardware specifications, network conditions] -**Screenshots** -If applicable, add screenshots to help explain your problem. +### Additional Context -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] +Provide any additional context or information about the bug. -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] +### Possible Fix -**Additional context** -Add any other context about the problem here. +If you have suggestions for a fix, please describe them here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7d..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/peer_review.md b/.github/ISSUE_TEMPLATE/peer_review.md new file mode 100644 index 00000000..251d8a19 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/peer_review.md @@ -0,0 +1,42 @@ +--- +name: Peer Review +about: Use to submit a peer review +title: '' +labels: review +assignees: '' +--- + +## Peer Review for Reproducibility Checks + +### Review Checklist + +Please review the following aspects related to reproducibility checks: + +- [ ] **Environment Setup**: + - [ ] Were detailed instructions provided for setting up the development environment? + - [ ] Are all necessary dependencies and libraries clearly documented? +- [ ] **Data Preparation**: + - [ ] Are source data files and preprocessing steps clearly documented? + - [ ] Are scripts or commands for data transformation included and well-documented? +- [ ] **Code Execution**: + - [ ] Were clear instructions provided for running the code? + - [ ] Does the code execute without errors and produce expected outputs? +- [ ] **Configuration Management**: + - [ ] Is version control information (e.g., Git commit hash) included for reproducibility? + - [ ] Are any configuration files or parameters used properly documented? +- [ ] **Results Verification**: + - [ ] Are output results (e.g., metrics, visualizations) included and matched with expected outcomes? + - [ ] Have any discrepancies between expected and actual results been identified and explained? +- [ ] **Documentation**: + - [ ] Is there a detailed README or documentation explaining the experiment setup and execution process? + - [ ] Are code comments and documentation clear and informative? +- [ ] **External Dependencies**: + - [ ] Are any external data sources or APIs used accessible and well-documented? + - [ ] Are external libraries or packages properly cited and versioned for reproducibility? +- [ ] **Validation**: + - [ ] Can an independent reviewer replicate the experiment using the provided instructions? + - [ ] Are the results consistent across different environments or platforms? + +### Additional Comments + +Include any additional comments, concerns, or suggestions related to reproducibility. diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index d6db8db2..c2f36f64 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,4 +1,4 @@ -name: Publish to GitHub Pages +name: gh-pages on: push: @@ -9,15 +9,16 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" cache: "pip" - name: Dependencies run: | if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi + if [ -f pyproject.toml ]; then pip install ".[docs]"; fi - name: Build Jupyter Book run: | jupyter-book build . --config docs/_config.yml --toc docs/_toc.yml diff --git a/.gitignore b/.gitignore index ab2bfaf2..90d1bb03 100644 --- a/.gitignore +++ b/.gitignore @@ -88,6 +88,9 @@ target/ # Jupyter Book _build/ -/data - -/notebooks/hsos-survey/Figures \ No newline at end of file +# Project-specific files +.jupyter/ +.ruff_cache +.python_version +data/ +notebooks/hsos-survey/Figures diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..0f77dd22 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,39 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - id: check-ast + - id: check-json + - id: detect-aws-credentials + args: [--allow-missing-credentials] + - id: detect-private-key + - repo: https://github.com/igorshubovych/markdownlint-cli + rev: v0.39.0 + hooks: + - id: markdownlint + name: Markdownlint + files: \.(md|mdown|markdown)$ + args: [ + "--disable=MD013", # line-length + "--disable=MD033", # no-inline-html + ] + - repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + name: codespell + description: Checks for common misspellings in text files + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.2.1 + hooks: + - id: ruff + types_or: [python, pyi, jupyter] + args: [--fix] + - id: ruff-format + types_or: [python, pyi, jupyter] diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 00000000..f52bfbe9 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,37 @@ +cff-version: 1.2.0 +message: The results do not reflect the final estimations by the World Bank. Country borders or names do not necessarily reflect the World Bank Group’s official position. This map is for illustrative purposes and does not imply the expression of any opinion on the part of the World Bank, concerning the legal status of any country or territory or concerning the delimitation of frontiers or boundaries." +title: "Support for the World Bank Syria Economic Monitor" +authors: + - affiliation: World Bank + family-names: Sarva + given-names: Sahiti + - affiliation: World Bank + family-names: Stefanini Vicente + given-names: Gabriel + orcid: 0000-0001-6530-3780 + - affiliation: World Bank + family-names: Marty + given-names: Robert + orcid: 0000-0002-3164-3813 + - affiliation: World Bank + family-names: Chamorro + given-names: Andres + - affiliation: World Bank + family-names: Ruth Jones + given-names: Maria + - affiliation: World Bank + family-names: Istanto + given-names: Benny + - affiliation: World Bank + family-names: Krambeck + given-names: Holly +keywords: + - Syria + - ACLED + - AIS + - Global Forest Watch + - NASA Black Marble + - Nighttime Lights +repository-code: https://github.com/datapartnership/blackmarblepy/tree/v2024.1.0 +type: report +version: v2024.1.0 diff --git a/README.md b/README.md index 86c6f8df..7fa5e059 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The conflict in Syria has inflicted a devastating impact on the inhabitants and The Syria Economic Monitor team requested the WB Data Lab to explore use of alternative data to better understand changing trends in trade and economic activity, focusing on: port activity, surface cross-border transport routes, changes in observed agricultural production, observed nighttime lights, and reported conflict. The team, comprised of colleagues from the Global Operations Support Team (GOST), the Development Impact Monitoring and Evaluation team (DIME), the Development Data Partnership, and the WB Data Lab, worked with the Syria Economic Monitor team to explore use of alternative open and proprietary data sources to generate new data products that can be sustainably updated. With the datasets and methods provided, over time, the Syria team should be able to create a clearer picture of the state of the Syrian economy. -### Data Goods +### Results Datasets and methods used to generate insights for this project have been prepared as **Data Goods**. Data Goods are comprised of data, reproducible methods (code), documentation, and sample insights. Unlike a traditional data analysis, which results in a single-use report or visualization, Data Goods are designed to be re-used for future updates and projects, thereby building the capacity of the World Bank and partner organizations to quickly and effectively deliver complex data science solutions to pressing global challenges. @@ -20,17 +20,23 @@ Datasets and methods used to generate insights for this project have been prepar In February 2022, the *Syria Economic Monitor* team received a [Data Corps Strategic Brief](https://worldbankgroup-my.sharepoint.com/:b:/r/personal/hkrambeck_worldbank_org/Documents/00%20-%20Labs/%200%20SD%20Data%20Lab%20-%20Shared/Data%20Corps/Data%20Corps%20-%20Projects/2022-02%20DC%20Syria%20Economic%20Brief/Data%20Corps%20Strategic%20Brief%20-%20Syria%20Economic%20Report.pdf?csf=1&web=1&e=5kiAIp), of which the following working methodologies are a result and waiting peer-review. ``` -## Contents +The following reports featured insights from our project’s data and analyses. + +- [Syria Economic Monitor, Spring 2022 : Lost Generation of Syrians](https://documents.worldbank.org/en/publication/documents-reports/documentdetail/099335506102250271/idu06190a00a0d128048450a4660ae3b937ae4bd) +- [Syria Economic Monitor, Winter 2022/23: Syria’s Economy in Ruins after a Decade-long War](https://openknowledge.worldbank.org/entities/publication/74944b29-bdf4-47a6-9a8e-b1e8c83a5ff2) +- [Syria Economic Monitor, Summer 2023 : The Economic Aftershocks of Large Earthquakes](hhttps://openknowledge.worldbank.org/entities/publication/45cbbf41-e0dc-4009-83ae-3c01162d7385) + +### Contents ```{tableofcontents} ``` -## Data +### Data -### Data Availability Statement +#### Data Availability Statement Restrictions may apply to the data that support the findings of this study. Data received from the private sector through the Development Data Partnership are subject to the terms and conditions of the data license agreement and the "Official Use Only" data classification. These data are available upon request through the [Development Data Partnership](https://datapartnership.org). Licensing and access information for all other datasets are included in the documentation. ## License -The repository is licensed under the [Mozilla Public License](https://www.mozilla.org/en-US/MPL). +This project is licensed under the [**Mozilla Public License**](https://opensource.org/license/mpl-2-0/) - see the [LICENSE](LICENSE) file for details. diff --git a/_static/custom.css b/_static/custom.css index 7cf89365..4d2d7f38 100644 --- a/_static/custom.css +++ b/_static/custom.css @@ -45,4 +45,4 @@ a.current.reference.internal { #pst-back-to-top { background-color: #3eacad; -} \ No newline at end of file +} diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md index 746991ff..bb312edc 100644 --- a/docs/CODE_OF_CONDUCT.md +++ b/docs/CODE_OF_CONDUCT.md @@ -60,7 +60,7 @@ representative at an online or offline event. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at -[github@worldbank.org](mailto:github@worldbank.org) +. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the @@ -116,7 +116,7 @@ the community. This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. +. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). @@ -124,5 +124,5 @@ enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. +. Translations are available at +. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index c6b9e95b..88ff556b 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -1 +1,93 @@ # CONTRIBUTING + +Thank you for considering contributing to this project! Your involvement helps improve the overall quality and functionality of the project and its codebase. Please take a moment to review the following guidelines to ensure a collaborative contribution process. + +## Code of Conduct + +Please note that we have a [Code of Conduct](CODE_OF_CONDUCT.md) in place. We expect all contributors to adhere to it, both in interactions within this project and in interactions with other project members to promote a welcoming and inclusive environment for everyone. + +## How Can I Contribute? + +There are several ways you can contribute to this project: + +- **🐞 Bug Reports:** If you encounter a bug or unexpected behavior, please open an issue on GitHub. Be sure to include as much detail as possible to help us identify and fix the problem. + +- **✨ Feature Requests**: If you have an idea for a new feature or enhancement, please open an issue on GitHub. Describe the feature and its use case in detail. + +- **📣 Community Engagement:** Ask questions, help other contributors and engage with the community on our [Discussions](https://github.com/orgs/worldbank/discussions). + +- **📖 Documentation Feedback:** If you find any errors or have suggestions for improving our documentation, you can report the issue on GitHub. + +- **🏗️ Pull Requests (PR):** If you'd like to contribute code or documentation changes, we encourage you to submit a [pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests). + +## Contributing to the Code and Documentation + +Whether you are novice and expert, your contribution is valuable. If you're contributing code, we recommend getting started with [GitHub Guides](https://github.com/git-guides), [GitHub Skills](https://skills.github.com/), [GitHub Desktop](https://desktop.github.com) and/or [GitHub Docs](https://docs.github.com/en/get-started). In special, see also [collaborating with pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests). When ready, you may follow these guidelines: + +1. **[Fork the Repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)**: Click the "Fork" button on the top-right corner of this repository on GitHub. This will create a copy of the project in your GitHub account. Then, clone or download this repository to your local machine. Then, navigate to the root directory of the repository. + +2. **[Create a Branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository):** Create a new branch for your feature or bug fix. Use a clear and descriptive name for your branch, like `feature/new-feature`. + +3. **Code Review and Changes:** Make your code changes and ensure they adhere to our coding standards. + +4. **Test:** Ensure that your changes do not break existing functionality. + +5. **[Commit and Push](https://github.com/git-guides/git-commit):** Commit your changes with a clear and concise commit message. Reference any related issues or pull requests in your commit message. Push your branch to your forked repository on GitHub. + +6. **[Create a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request):** Open a pull request against the main branch of this repository. Provide a clear description of your changes and reference any relevant issues. Your PR will be reviewed by maintainers. + +7. **[Review and Iterate](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review):** Expect feedback and be prepared to make additional changes if necessary. We may request changes, and once everything looks good, your PR will be merged. + +### Cloning the Repository Locally + +[Cloning](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository), in the context of version control systems like [Git](https://git-scm.com), refers to the process of creating a copy of a repository from a remote location (such as a [GitHub](https://github.com) repository) onto your local machine. When you clone a repository, you replicate all of its files, folders, commit history, and branches onto your local system. This allows you to work on the project's codebase locally, make changes, create new branches, and contribute to the project without affecting the original repository. + +To clone a repository, you'll need the repository's URL and a Git client installed on your computer. First, open your [Git](https://git-scm.com) client of choice, such as [GitHub Desktop](https://desktop.github.com) or [GitKraken](https://www.gitkraken.com). Then, locate the option to clone a repository. In most [Git](https://git-scm.com) clients, this option is typically found under the "File" or "Repository" menu. Next, paste the URL of the repository you want to clone into the designated field. This URL can usually be found on the repository's [GitHub](https://github.com) page by clicking the green "Code" button and copying the URL provided. Once you've pasted the URL, choose the local directory where you want to save the cloned repository on your computer. Finally, initiate the cloning process by clicking the "Clone" button. The [Git](https://git-scm.com) client will then download a copy of the repository to your local machine, allowing you to work on the files locally and collaborate with others on the project. + +Alternatively, with you're using [Git CLI](https://git-scm.com/downloads), please follow the step below: + + ```shell + git clone https://github.com/PATH-TO/REPOSITORY + ``` + +### Running Notebooks Locally + +This repository provides a Conda/Mamba environment configuration to ensure consistent dependencies across different environments. [Conda](https://docs.conda.io)/[Mamba](https://mamba.readthedocs.io) are prevalent (interoperable) package managers. If haven't installed either, you may follow the installation instructions on the respective documentation. + +To run the notebooks locally, after (1) and (2) above, please follow these steps: + +- Create (or update) the environment: + + ```shell + mamba env create -f notebooks/environment.yml + ``` + + This command will create a new environment based on the specifications provided in the `environment.yml` file. + +- [Activate the environment](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment), run [JupyterLab](https://jupyterlab.readthedocs.io) and execute `notebooks`: + + ```shell + jupyterlab + ``` + +### Building Documentation Locally + +To build the documentation locally, after (1) and (2) above, please follow these steps: + +- Install the documentation dependencies: + + ```shell + pip install -r docs/requirements.txt + ``` + +- Build the documentation: + + ```shell + jupyter-book build . --config docs/_config.yml --toc docs/_toc.yml + ``` + +The generated documentation will be available in the `_build/html` directory. Open the `index.html` file in a web browser to view it. + +## Licensing + +By contributing to this project, you agree that your contributions will be licensed under the project's [LICENSE](LICENSE). diff --git a/docs/_toc.yml b/docs/_toc.yml index 05f9a7ce..b544d101 100644 --- a/docs/_toc.yml +++ b/docs/_toc.yml @@ -9,10 +9,17 @@ parts: - caption: Data Products chapters: - file: notebooks/earthquake-intensity/earthquake_intensity.ipynb - - file: notebooks/ntl-analysis/README + - file: notebooks/conflict/acled.ipynb + - file: notebooks/hsos-survey/README.md + + - file: notebooks/ais-analysis/README sections: - - file: notebooks/ntl-analysis/ntl-update-6-2023.md - - file: notebooks/ntl-analysis/ntl-update-12-2023.md + - file: notebooks/ais-analysis/ais-update-6-2023.md + - file: notebooks/ais-analysis/01-descriptive-stats.ipynb + - file: notebooks/ais-analysis/02-trade-estimation.ipynb + - file: notebooks/internet-connectivity/README + sections: + - file: notebooks/internet-connectivity/ookla-speedtest-analysis.ipynb - file: notebooks/mobility/README sections: - file: notebooks/mobility/stops/README @@ -26,24 +33,18 @@ parts: title: Estimating Activity through on Mobility Data - url: https://datapartnership.org/turkiye-earthquake-impact/notebooks/mobility/visits.html title: Estimating Activity based on Visits to Points of Interest through Mobility Data - - file: notebooks/hsos-survey/README.md - - file: notebooks/ais-analysis/README + - file: notebooks/ntl-analysis/README sections: - - file: notebooks/ais-analysis/ais-update-6-2023.md - - file: notebooks/ais-analysis/01-descriptive-stats.ipynb - - file: notebooks/ais-analysis/02-trade-estimation.ipynb - - file: notebooks/traffic/README + - file: notebooks/ntl-analysis/ntl-update-6-2023.md + - file: notebooks/ntl-analysis/ntl-update-12-2023.md + - file: notebooks/traffic/README + - file: notebooks/vegetation-conditions/README + sections: + - file: notebooks/vegetation-conditions/Seasonality_Parameters_Data_Extraction.md - file: notebooks/syria-forest-cover/2023-summer-tree-cover-loss.md sections: - file: notebooks/syria-forest-cover/syria_forest.ipynb - - file: notebooks/internet-connectivity/README - sections: - - file: notebooks/internet-connectivity/ookla-speedtest-analysis.ipynb - - file: notebooks/conflict/acled.ipynb - file: notebooks/google-earth-engine/air-pollution.ipynb - - file: notebooks/vegetation-conditions/README - sections: - - file: notebooks/vegetation-conditions/Seasonality_Parameters_Data_Extraction.md - caption: Insights and Indicators chapters: - file: docs/insights-and-indicators diff --git a/docs/data.md b/docs/data.md index 5f50b10d..f24c0e09 100644 --- a/docs/data.md +++ b/docs/data.md @@ -7,13 +7,11 @@ The following is the list of all Datasets used in this Data Good: ```{note} -**Project Sharepoint** links are only accessible to the project team. For permissions to access these data, please write to the contact provided. - -The **Development Data Hub** is the World Bank's central data catalogue and includes meta-data and license information.Where feasible, all datasets that can be obtained through the Development Data Hub have been placed in a special collection: [Syria Economic Monitor Data Collection](https://datacatalog.worldbank.org/int/search/collections/sem). +**Project Sharepoint** links are only accessible to the project team. For permissions to access these data, please write to the contact provided. The **Development Data Hub** is the World Bank's central data catalogue and includes meta-data and license information.Where feasible, all datasets that can be obtained through the Development Data Hub have been placed in a special collection: [Syria Economic Monitor Data Collection](https://datacatalog.worldbank.org/int/search/collections/sem). ``` ```{table} -:name: foundational_datasets +:name: datasets | **ID** | **Name** | **License** | **Description** | **Update Frequency** | **Access** | **Contact** | |--------|-----------------------------------------------|------------------------|-----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|---------------------------------------------------------------------------------------|----------------------------------------------| @@ -34,7 +32,7 @@ The **Development Data Hub** is the World Bank's central data catalogue and incl ## Data Products Summary -**Data Products** are produced using the **Foundational Datasets** and can be further used to generate indicators and insights. All Data Products include documentation, references to original data sources (and/or information on how to access them), and a description of their limitations. +**Data Products** are produced using the **Datasets** and can be further used to generate indicators and insights. All Data Products include documentation, references to original data sources (and/or information on how to access them), and a description of their limitations. Following is a summary of Data Products used in this Data Good: @@ -53,14 +51,14 @@ Following is a summary of Data Products used in this Data Good: ## Sample Indicators -**Indicators** can be derived from a combination of **Foundational Datasets** and **Data Products**. By combining Foundational Datasets and Data Products, teams can, on-demand, develop a large array of indicators to meet their project needs. Indicators can presented side-by-side in an Excel workbook -- a format that is generally accessible to the widest audiences. Because all indicators are based on the same underlying data, they are comparable with each other, across geographies and across time. +**Indicators** can be derived from a combination of **Datasets** and **Data Products**. By combining Datasets and Data Products, teams can, on-demand, develop a large array of indicators to meet their project needs. Indicators can presented side-by-side in an Excel workbook -- a format that is generally accessible to the widest audiences. Because all indicators are based on the same underlying data, they are comparable with each other, across geographies and across time. For this project, sample indicators have been derived and aggregated at the governorate level and by year, to show changing trends in each governorate over time. Here is a link to the **Indicators Excel workbook** (accessible to team members via SharePoint): [Excel workbook](https://worldbankgroup.sharepoint.com/:x:/t/DevelopmentDataPartnershipCommunity-WBGroup/EXZkY4Z6vMVMjRVcIBCHqlkBVI4z1b9rP1fyyLQ6aluvWA?e=pFazxV), and following is a summary of sample indicators. ```{table} :name: indicators -| **ID** | **Name** | **Indicator (units)** | **Potential Update Frequency** | **Foundational Datasets and Data Products Used (ID#)** | +| **ID** | **Name** | **Indicator (units)** | **Potential Update Frequency** | **Datasets and Data Products Used (ID#)** | |---------------|-----------------------------------------------------------|--------------------------------------|---------------------------------------|--------------------------------| | i | Population | Number of people | Annual | 1,9 | | ii | Agriculture Indicators | Sum of Z-Scores | Annually | 1,E | diff --git a/docs/insights-and-indicators.md b/docs/insights-and-indicators.md index a061a7df..abe4cbfb 100644 --- a/docs/insights-and-indicators.md +++ b/docs/insights-and-indicators.md @@ -1,3 +1,3 @@ # Sampe Insights and Indicators -Some data products have been formatted as comparable indicatos in an [Excel workbook](https://worldbankgroup.sharepoint.com/:x:/t/DevelopmentDataPartnershipCommunity-WBGroup/EXZkY4Z6vMVMjRVcIBCHqlkBVI4z1b9rP1fyyLQ6aluvWA?e=pFazxV), accessible via the [Project Sharepoint](https://worldbankgroup.sharepoint.com/:f:/r/teams/DevelopmentDataPartnershipCommunity-WBGroup/Shared%20Documents/Projects/Data%20Lab/Syria%20Economic%20Monitor?csf=1&web=1&e=vn3ybj). This section includes space for additional analytics, where indicators have been combined to generate new insights. \ No newline at end of file +Some data products have been formatted as comparable indicatos in an [Excel workbook](https://worldbankgroup.sharepoint.com/:x:/t/DevelopmentDataPartnershipCommunity-WBGroup/EXZkY4Z6vMVMjRVcIBCHqlkBVI4z1b9rP1fyyLQ6aluvWA?e=pFazxV), accessible via the [Project Sharepoint](https://worldbankgroup.sharepoint.com/:f:/r/teams/DevelopmentDataPartnershipCommunity-WBGroup/Shared%20Documents/Projects/Data%20Lab/Syria%20Economic%20Monitor?csf=1&web=1&e=vn3ybj). This section includes space for additional analytics, where indicators have been combined to generate new insights. diff --git a/docs/introduction_to_data_goods.md b/docs/introduction-to-data-goods.md similarity index 64% rename from docs/introduction_to_data_goods.md rename to docs/introduction-to-data-goods.md index a806582f..49b6f343 100644 --- a/docs/introduction_to_data_goods.md +++ b/docs/introduction-to-data-goods.md @@ -1,14 +1,14 @@ -# Introduction to Data Goods +# What's a Data Good? **Data Goods** are comprised of data, reproducible methods (code), documentation, and sample insights. Unlike a traditional data analysis, which results in a single-use report or visualization, Data Goods are designed to be re-used for future updates and projects, thereby building the capacity of the World Bank and partner organizations to quickly and effectively deliver complex data science solutions to pressing global challenges. Data Goods packages include: -1. **Foundational Datasets**. Foundational Datasets comprise *all* datasets used to prepare the Data Goods. To support replication and re-use of the Data Goods, the documetation includes a description of each datasource, including data type, update frequency, access links (including to the World Bank's data catalogue, the [Development Data Hub](https://datacatalog.worldbank.org/home)) and contact information. +1. **Datasets**. Datasets comprise *all* datasets used to prepare the Data Goods. To support replication and reuse of the Data Goods, the documentation includes a description of each datasource, including data type, update frequency, access links (including to the World Bank's data catalogue, the [Development Data Hub](https://datacatalog.worldbank.org/home)) and contact information.

-2. **Data Products**. These are analytical products derived from the Foundational Datasets, which can be further used to generate indicators and insights. All data products include documentation, links to original data sources (and/or information on how to access them), and a description of their limitations. Reference resources are also cited, where relevant. In the documentation, each Data Product has it's own "chapter", generated through use of a Jupyter notebook. +2. **Data Products**. These are analytical products derived from the Datasets, which can be further used to generate indicators and insights. All data products include documentation, links to original data sources (and/or information on how to access them), and a description of their limitations. Reference resources are also cited, where relevant. In the documentation, each Data Product has it's own "chapter", generated through use of a Jupyter notebook.

-3. **Insights and Indicators**. Each Data Goods package may also include additional analytical work, such as dynamic maps, data visualizaations, and/or sample indicators. Indicators can be derived from a combination of **Foundational Datasets** and **Data Products**. By combining these two inputs, teams are empowered to develop a large array of indicators to meet their project needs. Indicators can be presented side-by-side in an Excel workbook -- a format that is generally accessible to the widest audience. Because all indicators are based on the same underlying data, they are comparable with each other, across geographies and across time. +3. **Insights and Indicators**. Each Data Goods package may also include additional analytical work, such as dynamic maps, data visualizaations, and/or sample indicators. Indicators can be derived from a combination of **Datasets** and **Data Products**. By combining these two inputs, teams are empowered to develop a large array of indicators to meet their project needs. Indicators can be presented side-by-side in an Excel workbook -- a format that is generally accessible to the widest audience. Because all indicators are based on the same underlying data, they are comparable with each other, across geographies and across time.

4. **Data Lab Team**. For each project, the [World Bank Data Lab](https://wbdatalab.org/) recruits colleagues from throughout our organization, pooling our collective great talents in support of our lending and technical assistance operations. Data Goods documentation includes a list and contact information for the unique team that prepared the Goods.

diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 873d7b8b..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -docutils==0.17.1 -jupyter-book==1.0.0 \ No newline at end of file diff --git a/notebooks/hsos-survey/README.md b/notebooks/hsos-survey/README.md index d150d034..5847ad1f 100644 --- a/notebooks/hsos-survey/README.md +++ b/notebooks/hsos-survey/README.md @@ -1,5 +1,4 @@ -# Humanitarian Assistance Survey Data - +# Humanitarian Assistance Survey ## Data @@ -7,7 +6,6 @@ We use data from the Humanitarian Situation Overview Survey (HSOS) conducted by The HSOS includes information on community situations and needs relating to shelter, electricity, water sanitation and hygiene (WASH), food security, livelihoods, health, education, humanitarian assistance, and priority needs. HSOS has disaggregated information on the different conditions and needs of residents and internally displaced persons (IDPs). - ## Methodology In the analysis, we look at trends in the data before and after the earthquake, and whether those trends differ depending on severity of exposure to the earthquake. We use data from December 2022 as the most recent data before the earthquake and April 2023 as the first dataset after the earthquake. Note that we do not include data from January 2023 as it was collected for NWS only, and we do not include data from February 2023 as it was collected during the time of the earthquake. @@ -16,7 +14,6 @@ We compare outcomes for communities severely impacted by the earthquake before/a The earthquake exposure measure uses the Modified Mercalli Intensity Scale (mmi). From this we derive three groups of communities: light earthquake intensity, moderate intensity, and strong or very strong intensity. - ## Implementation Code to replicate the analysis can be found [here](https://github.com/datapartnership/syria-economic-monitor/tree/main/notebooks/hsos-survey/notebooks/hsos-survey/Do%20Files/). @@ -24,11 +21,10 @@ The [main script](https://github.com/datapartnership/syria-economic-monitor/tree The script to produce the graphs can be found [here](https://github.com/datapartnership/syria-economic-monitor/tree/main/notebooks/hsos-survey/notebooks/hsos-survey/Do%20Files/4_Bar%Graphs.do). All data used in the analysis can be downloaded from [Syria Humanitarian Situation Overview Survey](https://reach-info.org/syr/hsos/). - - ## Findings ### Humanitarian Assistance + Communities strongly affected by the earthquake (in Northwest Syria) were more likely to receive humanitarian assistance than communities that were less affected (in Northeast Syria), both before and after the earthquake. @@ -77,6 +73,7 @@ Access to Humanitarian Aid - Voucher

--> ### Access to Services + Access to community electricity networks was substantially lower for communities in NWS strongly affected by the earthquake than communities that were less affected (in NES). Immediately after the earthquake, @@ -113,8 +110,8 @@ Less than 8 hours of electricity

--> - ### Priority Needs & Coping Strategies + In the post-earthquake period, the primary needs for the IDP population are food, shelter, and livelihood support. For residents, the top priority needs are food, livelihoods support and water and sanitation services. @@ -157,7 +154,7 @@ increases sales of household items and productive assets in communities strongly affected by the earthquake. Somewhat surprisingly, there are substantial decreases in reports of sending children to work or to early marriage for both residents and IDPs, possibly due to humanitarian -interventions. +interventions. ```{figure} ./Figures/Line_trends//Fig_IDP_coping_sellittemc.png --- @@ -178,12 +175,11 @@ Coping strategies - Spending savings

--> - - ## Limitations -The categorical definition of exposure to the earthquake: light, moderate, or strong intensity is highly geographically correlated within the HSOS sample. Of the 346 communities in NWS, 331 were affected strongly by the earthquake and the remaining 15 were affected moderately. In NES, in contrast, only 45 communities were strongly affected, 625 were moderately affected, and 410 were lightly affected. This is to say, nearly all strongly affected communities are in NWS and all lightly affected communities are in NES. NES and NWS differ in important observable and unobservable ways - such as the controlling regime, which limits the conclusions that can be drawn from the data. +The categorical definition of exposure to the earthquake: light, moderate, or strong intensity is highly geographically correlated within the HSOS sample. Of the 346 communities in NWS, 331 were affected strongly by the earthquake and the remaining 15 were affected moderately. In NES, in contrast, only 45 communities were strongly affected, 625 were moderately affected, and 410 were lightly affected. This is to say, nearly all strongly affected communities are in NWS and all lightly affected communities are in NES. NES and NWS differ in important observable and unobservable ways - such as the controlling regime, which limits the conclusions that can be drawn from the data. ## Next Steps + Given the limited variation in the measure of earthquake intensity, the first next step will be to explore distance from the epicenter as a more continuous measure which may be less correlated with other underlying conditions (such as soil characteristics). If we are able to establish parallel trends prior to the earthquake, a difference-in-difference strategy would be appropriate. Longer-term, a larger survey sample, ideally nationally-representative would all for more robust analysis. diff --git a/notebooks/hsos-survey/SEM survey analysis.md b/notebooks/hsos-survey/SEM survey analysis.md index 09503552..611dd13d 100644 --- a/notebooks/hsos-survey/SEM survey analysis.md +++ b/notebooks/hsos-survey/SEM survey analysis.md @@ -110,7 +110,7 @@ increases sales of household items and productive assets in communities strongly affected by the earthquake. Somewhat surprisingly, there are substantial decreases in reports of sending children to work or to early marriage for both residents and IDPs, possibly due to humanitarian -interventions. +interventions.

diff --git a/notebooks/internet-connectivity/README.md b/notebooks/internet-connectivity/README.md index 6949e72b..257963c5 100644 --- a/notebooks/internet-connectivity/README.md +++ b/notebooks/internet-connectivity/README.md @@ -19,4 +19,3 @@ Once the data was obtained from the Ookla Speedtest portal, the point data were The limitation of Ookla's Speedtest connectivity relies on user-generated tests. Although the average number of users who take a test remain relatively consistent per month, it is subject to fluctuation. The dataset also does not contain information about the same latitude and longitude consistently. However, given aggregated data is used (at admin 1 or admin 2 levels), the findings can still be useful. ## Next Steps - diff --git a/notebooks/mobility/README.md b/notebooks/mobility/README.md index 12d5a100..a20b2cfd 100644 --- a/notebooks/mobility/README.md +++ b/notebooks/mobility/README.md @@ -10,7 +10,7 @@ This pilot study seeks to demonstrate the potential of mobility data as a powerf This pilot study resulted in following (experimental) outputs: -- {ref}`mobility-stops` +- [Estimating cross-border movement in Lebanon and Syria through Mobility Data](stops/README.md) - [Türkiye-Syria Earquake Impact](https://datapartnership.org/turkiye-earthquake-impact/notebooks/mobility/README.html) ## Data diff --git a/notebooks/mobility/stops/01a-aoi-and-tessellation.ipynb b/notebooks/mobility/stops/01a-aoi-and-tessellation.ipynb index ca4b428f..8f304150 100644 --- a/notebooks/mobility/stops/01a-aoi-and-tessellation.ipynb +++ b/notebooks/mobility/stops/01a-aoi-and-tessellation.ipynb @@ -71,6 +71,7 @@ "source": [ "# Below, see auxiliary functions. Ideally, we'll move them to a package in the future\n", "\n", + "\n", "def get_h3_tessellation(\n", " gdf: geopandas.GeoDataFrame, name=\"shapeName\", resolution=RESOLUTION\n", "):\n", @@ -84,7 +85,9 @@ " match geometry.geom_type:\n", " case \"Polygon\":\n", " hex_ids = h3.polyfill(\n", - " shapely.geometry.mapping(geometry), resolution, geo_json_conformant=True\n", + " shapely.geometry.mapping(geometry),\n", + " resolution,\n", + " geo_json_conformant=True,\n", " )\n", "\n", " h3_tessellation = h3_tessellation.union(set(hex_ids))\n", @@ -93,7 +96,9 @@ " case \"MultiPolygon\":\n", " for x in geometry.geoms:\n", " hex_ids = h3.polyfill(\n", - " shapely.geometry.mapping(x), resolution, geo_json_conformant=True\n", + " shapely.geometry.mapping(x),\n", + " resolution,\n", + " geo_json_conformant=True,\n", " )\n", "\n", " h3_tessellation = h3_tessellation.union(set(hex_ids))\n", @@ -715,7 +720,7 @@ "source": [ "### Region B\n", "\n", - "In this step, we generate **Region B** defined as a border buffer strip between Lebanon and Syria, using boudaries provided by [geoBoundaries](https://www.geoboundaries.org)." + "In this step, we generate **Region B** defined as a border buffer strip between Lebanon and Syria, using boundaries provided by [geoBoundaries](https://www.geoboundaries.org)." ] }, { @@ -1635,7 +1640,7 @@ "TESSELLATION.to_crs(epsg=3857).plot(ax=ax, alpha=0.25, color=\"red\", edgecolor=\"k\")\n", "\n", "ax.axis(\"off\")\n", - "ax.set_title(f\"Lebanon-Syria H3 Tessellation\", fontsize=24)\n", + "ax.set_title(\"Lebanon-Syria H3 Tessellation\", fontsize=24)\n", "\n", "cx.add_basemap(ax)" ] @@ -1665,7 +1670,9 @@ }, "outputs": [], "source": [ - "TESSELLATION.to_file(\"../../data/interim/tessellation/LNBSYRH3.geojson\", driver=\"GeoJSON\")" + "TESSELLATION.to_file(\n", + " \"../../data/interim/tessellation/LNBSYRH3.geojson\", driver=\"GeoJSON\"\n", + ")" ] }, { @@ -1680,10 +1687,14 @@ "outputs": [], "source": [ "TESSELLATION[\"coordinates\"] = TESSELLATION[\"tile_ID\"].apply(h3.h3_to_geo)\n", - "TESSELLATION[[\"lat\", \"lon\"]] = pd.DataFrame(TESSELLATION[\"coordinates\"].tolist(), columns=[\"lat\", \"lon\"])\n", + "TESSELLATION[[\"lat\", \"lon\"]] = pd.DataFrame(\n", + " TESSELLATION[\"coordinates\"].tolist(), columns=[\"lat\", \"lon\"]\n", + ")\n", "TESSELLATION[\"id\"] = TESSELLATION[\"tile_ID\"]\n", "TESSELLATION[\"name\"] = TESSELLATION[\"tile_ID\"]\n", - "TESSELLATION[[\"id\", \"name\", \"lat\", \"lon\"]].to_csv(\"../../data/final/locations.csv\", index=False)" + "TESSELLATION[[\"id\", \"name\", \"lat\", \"lon\"]].to_csv(\n", + " \"../../data/final/locations.csv\", index=False\n", + ")" ] } ], @@ -1703,7 +1714,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.9" + "version": "3.10.13" } }, "nbformat": 4, diff --git a/notebooks/mobility/stops/01b-convenience-sampling.ipynb b/notebooks/mobility/stops/01b-convenience-sampling.ipynb index 2d464f98..1c9fc66b 100644 --- a/notebooks/mobility/stops/01b-convenience-sampling.ipynb +++ b/notebooks/mobility/stops/01b-convenience-sampling.ipynb @@ -5,7 +5,7 @@ "id": "dba12959-03fc-4875-9ab5-35888785c799", "metadata": {}, "source": [ - "# Constructiong Samples\n", + "# Createp Longitudinal Panels\n", "\n", "In this step, we create sub-panels **A** (formal) and **B** (informal) as described in the [methodological notes](README.md) of this pilot study. The sub-panels are composed of longitudinal mobility data generated by GPS-enabled devices based on whether they were detected within the proximity of [Region A or Region B](01a-aoi-and-tessellation.ipynb#regions-a-b) throughout the time horizon. \n", "\n", @@ -38,8 +38,7 @@ "outputs": [], "source": [ "import dask.dataframe as dd\n", - "import geopandas\n", - "import pandas as pd" + "import geopandas" ] }, { @@ -93,7 +92,7 @@ "source": [ "### Area of Interest\n", "\n", - "On the previous step, we defiend the area(s) of interest. Here, we selected it." + "On the previous step, we defined the area(s) of interest. Here, we selected it." ] }, { @@ -326,8 +325,8 @@ "outputs": [], "source": [ "PATH = [\n", - " f\"../../data/external/outlogic/LB/date=*/*.parquet\",\n", - " f\"../../data/external/outlogic/SY/date=*/*.parquet\",\n", + " \"../../data/external/outlogic/LB/date=*/*.parquet\",\n", + " \"../../data/external/outlogic/SY/date=*/*.parquet\",\n", "]" ] }, @@ -529,17 +528,7 @@ "source": [ "## Repartitioning\n", "\n", - "Let's repartition on `country`, `year` and `quarter` (to reduce the overhead and improve performance)." - ] - }, - { - "cell_type": "markdown", - "id": "da365242-cafd-420f-be02-6d09a5c96bae", - "metadata": {}, - "source": [ - "### Apply tranformations\n", - "\n", - "In this step, we convert `datetime` to the **Asia/Damascus** timezone and calculate the quarter. " + "Let's repartition on `country`, `year` and `quarter` (to reduce the overhead and improve performance).In this step, we convert `datetime` to the **Asia/Damascus** timezone and calculate the quarter. " ] }, { @@ -625,7 +614,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.8" + "version": "3.10.13" }, "toc-showtags": false }, diff --git a/notebooks/mobility/stops/03a-count-within-aoi.ipynb b/notebooks/mobility/stops/03a-count-within-aoi.ipynb index f31e892a..7cddd09f 100644 --- a/notebooks/mobility/stops/03a-count-within-aoi.ipynb +++ b/notebooks/mobility/stops/03a-count-within-aoi.ipynb @@ -5,7 +5,7 @@ "id": "dba12959-03fc-4875-9ab5-35888785c799", "metadata": {}, "source": [ - "# Counting Devices within Areas of Interest\n", + "# Calculate Number of Devices within Areas of Interest\n", "\n", "In this step, we calculate the number of devices detected within the **areas of interest**, creating a time series." ] @@ -23,7 +23,6 @@ "source": [ "import dask.dataframe as dd\n", "import geopandas\n", - "import matplotlib.colors as mcolors\n", "import matplotlib.dates as mdates\n", "import matplotlib.pyplot as plt\n", "import pandas as pd\n", @@ -123,8 +122,7 @@ " f\"../../data/interim/panels/{NAME}\",\n", "]\n", "\n", - "filters = [\n", - "]" + "filters = []" ] }, { @@ -557,7 +555,10 @@ ], "source": [ "gdf = geopandas.GeoDataFrame(\n", - " df[[\"longitude\", \"latitude\"]].iloc[:10000], geometry=geopandas.points_from_xy(df.longitude.iloc[:10000], df.latitude.iloc[:10000], crs=\"EPSG:4326\")\n", + " df[[\"longitude\", \"latitude\"]].iloc[:10000],\n", + " geometry=geopandas.points_from_xy(\n", + " df.longitude.iloc[:10000], df.latitude.iloc[:10000], crs=\"EPSG:4326\"\n", + " ),\n", ")\n", "gdf.explore()" ] @@ -595,9 +596,7 @@ "metadata": {}, "outputs": [], "source": [ - "count = (\n", - " ddf.groupby([\"date\"])[\"uid\"].nunique().compute().to_frame(\"count\")\n", - ")\n", + "count = ddf.groupby([\"date\"])[\"uid\"].nunique().compute().to_frame(\"count\")\n", "\n", "count.index = pd.to_datetime(count.index)" ] @@ -655,7 +654,7 @@ " fontweight=\"bold\",\n", ")\n", "ax.yaxis.set_label_text(\"Number of devices\")\n", - "ax.xaxis.set_major_formatter(mdates.DateFormatter('%b-%Y'));" + "ax.xaxis.set_major_formatter(mdates.DateFormatter(\"%b-%Y\"));" ] }, { @@ -669,7 +668,9 @@ }, "outputs": [], "source": [ - "fig.savefig(f\"../../reports/count_{NAME}.png\", dpi=300, transparent=True, bbox_inches=\"tight\")" + "fig.savefig(\n", + " f\"../../reports/count_{NAME}.png\", dpi=300, transparent=True, bbox_inches=\"tight\"\n", + ")" ] }, { @@ -697,7 +698,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.8" + "version": "3.10.13" }, "toc-showtags": false }, diff --git a/notebooks/mobility/stops/03b-estimate-stay-locations.ipynb b/notebooks/mobility/stops/03b-estimate-stay-locations.ipynb index c84ead45..8eb7d22b 100644 --- a/notebooks/mobility/stops/03b-estimate-stay-locations.ipynb +++ b/notebooks/mobility/stops/03b-estimate-stay-locations.ipynb @@ -29,7 +29,7 @@ "from dask.distributed import Client\n", "from shapely.geometry import Polygon\n", "from skmob.measures.individual import distance_straight_line\n", - "from skmob.preprocessing import clustering, compression, detection, filtering" + "from skmob.preprocessing import clustering, detection, filtering" ] }, { diff --git a/notebooks/mobility/stops/README.md b/notebooks/mobility/stops/README.md index 6bf4b76c..deda899f 100644 --- a/notebooks/mobility/stops/README.md +++ b/notebooks/mobility/stops/README.md @@ -1,5 +1,3 @@ -(mobility-stops)= - # Estimating cross-border movement in Lebanon and Syria through Mobility Data This pilot exploratory study seeks to leverage mobility data to estimate the location of activity and, in particular, tentatively estimate the location of formal and informal activity between Lebanon and Syria. The working hypothesis is that by identifying devices seen in the proximity of point of interests, such as border checkpoints, and mapping their mobility traces throughout the time horizon, the movement captured may indicate changes in trade patterns and potentially identify new trade centers and corridors. @@ -10,7 +8,7 @@ The results presented are the stay locations (or “stops”) generated by sub-p The WB Data Lab team obtained a high-frequency longitudinal panel of human mobility. The data consisted of anonymized timestamped geographical points generated by 639,233 GPS-enabled devices, located in Lebanon and Syria and spanning the period of January 1, 2020, to October 15, 2022. The mobility data panel has been provided pro-bono by [Outlogic](https://outlogic.io) through the proposal [Syria Economic Monitor (Outlogic)](https://portal.datapartnership.org/readableproposal/407) of the [Development Data Partnership](https://datapartnership.org). -During the project's execution, [Outlogic Observation Panel](https://outlogic.io)'s global daily data feed was ingested and processed through the [Mobility](https://docs.datapartnership.org/collections/mobility/README.html) pipeline maintained by the [Development Data Partnership](https://datapartnership.org). As input, the mobility data has been acessed as an Apache Parquet dataset, partitioned on country, year, and date. For additional information, please refer to the [Mobility](https://docs.datapartnership.org/collections/mobility/README.html) documentation accessible to all World Bank staff. +During the project's execution, [Outlogic Observation Panel](https://outlogic.io)'s global daily data feed was ingested and processed through the [Mobility](https://docs.datapartnership.org/collections/mobility/README.html) pipeline maintained by the [Development Data Partnership](https://datapartnership.org). As input, the mobility data has been accessed as an Apache Parquet dataset, partitioned on country, year, and date. For additional information, please refer to the [Mobility](https://docs.datapartnership.org/collections/mobility/README.html) documentation accessible to all World Bank staff. ## Methodology diff --git a/notebooks/ntl-analysis/README.md b/notebooks/ntl-analysis/README.md index 2b664a7f..04263c38 100644 --- a/notebooks/ntl-analysis/README.md +++ b/notebooks/ntl-analysis/README.md @@ -6,7 +6,7 @@ Nighttime lights have become a commonly used resource to estimate changes in loc We use nighttime lights data from the VIIRS Black Marble dataset. Raw nighttime lights data requires correction due to cloud cover and stray light, such as lunar light. The Black Marble dataset applies advanced algorithms to correct raw nighttime light values and calibrate data so that trends in lights over time can be meaningfully analyzed. From VIIRS Black Marble, we use monthly data from January 2012 through August 2022—where data is available at a 500-meter resolution. -For further information, please refer to {ref}`foundational_datasets`. +For more information, please refer to {ref}`datasets`. ## Methodology @@ -25,7 +25,7 @@ Data for the analysis can be downloaded from: * __Black Marble Nighttime Lights:__ There are two options to access the data: * The code [here](https://github.com/datapartnership/syria-economic-monitor/blob/main/notebooks/ntl-analysis/01_download_black_marble.R) downloads raw data from the [NASA archive](https://ladsweb.modaps.eosdis.nasa.gov/missions-and-measurements/products/VNP46A3/) and processes the data for Syria---mosaicing raster tiles together to cover Syria. Running the code requires a NASA bearer token; the documentation [here](https://github.com/ramarty/download_blackmarble) describes how to obtain a token. - + * Pre-processed data can be downloaded from [here](https://datacatalog.worldbank.org/int/data/dataset/0063879/syria__night_time_lights), using the __Night Time Lights BlackMarble Data__ ## Findings diff --git a/notebooks/ntl-analysis/ntl-update-12-2023.md b/notebooks/ntl-analysis/ntl-update-12-2023.md index 6bcabf18..4e139807 100644 --- a/notebooks/ntl-analysis/ntl-update-12-2023.md +++ b/notebooks/ntl-analysis/ntl-update-12-2023.md @@ -35,5 +35,3 @@ We examine trends in daily nighttime lights from before and after the February 6 ![](../../reports/figures/pchange_ntl_nogf_2022_2023.png) ![](../../reports/figures/pchange_ntl_monthly.png) - - diff --git a/notebooks/ntl-analysis/ntl-update-6-2023.md b/notebooks/ntl-analysis/ntl-update-6-2023.md index 91f9f56b..2f39a6f8 100644 --- a/notebooks/ntl-analysis/ntl-update-6-2023.md +++ b/notebooks/ntl-analysis/ntl-update-6-2023.md @@ -24,7 +24,7 @@ The below figures show daily trends (and a 7 day moving average from daily data) > *Trends in Nighttime Lights in Border Crossing Locations. The red line indicates February 6, 2023.* -### +### ### Maps of Percent Change in Nighttime Lights diff --git a/notebooks/traffic/README.md b/notebooks/traffic/README.md index f706dcbe..9e15cacb 100644 --- a/notebooks/traffic/README.md +++ b/notebooks/traffic/README.md @@ -12,7 +12,7 @@ We test to the use of three data sources for monitoring trends in traffic at bor * __Mobility Data:__ We leverage mobility data from GPS-enabled devices to monitor the number of unique devices at border crossing locations. Mobility data comes from Outlogic, which is further described in {doc}`../mobility/README`. The number of unique devices observed at border crossing locations can indicate activity---and traffic---at the crossing. A key advantage of mobility data over satellite imagery is that it is available at all points in time; the dataset captures the timestamp and location of GPS-enable devices. Consequently, the data can be aggregated hourly, daily, or at other intervals. Mobility data may underestimate activity as not everyone may have a GPS-enabled device; however, we check whether trends in mobility data are similar to trends captured from satellite imagery. -For further information, please refer to {ref}`foundational_datasets`. +For more information, please refer to {ref}`datasets`. ## Implementation diff --git a/notebooks/vegetation-conditions/README.md b/notebooks/vegetation-conditions/README.md index 73e049df..d7ac6840 100644 --- a/notebooks/vegetation-conditions/README.md +++ b/notebooks/vegetation-conditions/README.md @@ -10,13 +10,13 @@ The importance of monitoring vegetation conditions cannot be overstated, particu **Figure 2.** Syria land cover. -Remote sensing techniques, such as those employed through the use of Moderate Resolution Imaging Spectroradiometer ([MODIS](https://modis.gsfc.nasa.gov/about/)) Terra ([MOD13Q1](https://lpdaac.usgs.gov/products/mod13q1v061/)) and Aqua ([MYD13Q1](https://lpdaac.usgs.gov/products/myd13q1v061/)) Vegetation Indices 16-day L3 Global 250m time series data, have revolutionized the way we monitor vegetation conditions [2]. By deriving variables such as ratio anomaly, difference anomaly, standardized anomaly, and vegetation condition index, these analyses enable the quantification of vegetation changes over time and across vast spatial extents. +Remote sensing techniques, such as those employed through the use of Moderate Resolution Imaging Spectroradiometer ([MODIS](https://modis.gsfc.nasa.gov/about/)) Terra ([MOD13Q1](https://lpdaac.usgs.gov/products/mod13q1v061/)) and Aqua ([MYD13Q1](https://lpdaac.usgs.gov/products/myd13q1v061/)) Vegetation Indices 16-day L3 Global 250m time series data, have revolutionized the way we monitor vegetation conditions [2]. By deriving variables such as ratio anomaly, difference anomaly, standardized anomaly, and vegetation condition index, these analyses enable the quantification of vegetation changes over time and across vast spatial extents. Regular vegetation monitoring provides numerous benefits, including the ability to detect and mitigate the impacts of deforestation, land degradation, and desertification, as well as monitor crop health and inform agricultural decision-making [3]. Furthermore, such monitoring can guide policymakers in the development of adaptive strategies and environmental policies, ensuring a sustainable future for the country and its people. Building on the foundation of monitoring vegetation conditions using MODIS MOD13Q1 and MYD13Q1 time series data, a more comprehensive understanding of vegetation dynamics in cropland areas can be achieved by incorporating phenological analysis. This is particularly important in a country like Syria, where agriculture is a vital sector for the economy and food security [4]. Accurate and timely information on crop phenology can significantly enhance agricultural management, resource allocation, and the overall resilience of the farming sector. -To achieve this, the use of [TIMESAT](https://web.nateko.lu.se/timesat/timesat.asp), a software tool designed for the analysis of time series data, can be employed to extract critical phenological parameters such as the Start of Season (SOS), Mid of Season (MOS), and End of Season (EOS) from the Enhanced Vegetation Index (EVI) data [5]. By first clipping the EVI data to the cropland extent, the analysis becomes more focused on the regions of interest, ensuring that the extracted parameters are directly relevant to agricultural practices. +To achieve this, the use of [TIMESAT](https://web.nateko.lu.se/timesat/timesat.asp), a software tool designed for the analysis of time series data, can be employed to extract critical phenological parameters such as the Start of Season (SOS), Mid of Season (MOS), and End of Season (EOS) from the Enhanced Vegetation Index (EVI) data [5]. By first clipping the EVI data to the cropland extent, the analysis becomes more focused on the regions of interest, ensuring that the extracted parameters are directly relevant to agricultural practices. This phenological information can then be used to guide farmers and agricultural stakeholders in making timely and informed decisions, such as when to plant, irrigate, or harvest their crops. Moreover, it can help identify potential threats to crop health and yield, such as disease outbreaks, pest infestations, or the effects of climate change, allowing for proactive and targeted interventions. Ultimately, incorporating phenological analysis into vegetation monitoring efforts provides a more holistic and actionable understanding of the complex dynamics that govern agricultural productivity and environmental sustainability. @@ -26,7 +26,7 @@ In this study, we utilize a range of high-quality datasets to analyze vegetation ### Crop extent -We used the new [ESA World Cover](https://esa-worldcover.org/en) map 10m LULC to mask out areas which aren't of interest in computing the EVI, i.e. built-up, water, forest, etc. The cropland class has value equal to 40, which will be used within Google Earth Engine to generate the mask. +We used the new [ESA World Cover](https://esa-worldcover.org/en) map 10m LULC to mask out areas which aren't of interest in computing the EVI, i.e. built-up, water, forest, etc. The cropland class has value equal to 40, which will be used within Google Earth Engine to generate the mask. There are many ways to download the WorldCover, as explained in the WorldCover [Data Access](https://esa-worldcover.org/en/data-access) page. @@ -66,13 +66,13 @@ Similarly, rainfall patterns play a crucial role in determining water availabili **Figure 6.** Accumulated rainfall, September 2023. -By analyzing these climate data alongside vegetation indices and phenological information, we can correlate climate trends with vegetation dynamics. +By analyzing these climate data alongside vegetation indices and phenological information, we can correlate climate trends with vegetation dynamics. Monthly temperature derived from [ERA5-Land](https://doi.org/10.24381/cds.68d2bb30), and rainfall data come from [CHRIPS](https://www.chc.ucsb.edu/data/chirps). ## Limitations and Assumptions -Getting VI data with good quality for all period are challenging (pixels covered with cloud, snow/ice, aerosol quantity, shadow) for optic data (MODIS). Cultivated area year by year are varies, due to MODIS data quality and crop type is not described, so the seasonal parameters are for general cropland. +Getting VI data with good quality for all period are challenging (pixels covered with cloud, snow/ice, aerosol quantity, shadow) for optic data (MODIS). Cultivated area year by year are varies, due to MODIS data quality and crop type is not described, so the seasonal parameters are for general cropland. At this point, the analysis is also limited to seasonal crops due to difficulty to capture the dynamics of perennial crops within a year. The value may not represent for smaller cropland and presented result are only based upon the most current available remote sensing data. As the climate phenomena is a dynamic situation, the current realities may differ from what is depicted in this document. @@ -136,7 +136,7 @@ A how-to guideline on calculating the phenological metrics are available through We utilized GEE to acquire a time series of EVI data. The EVI data was then processed using the ArcPy library in ArcGIS to generate long-term statistics and derive various vegetation indices products. Following this, we employed the TIMESAT software to extract seasonality parameters from the processed vegetation data. -In this study, we employed a three-step coding approach to analyze the time series EVI data and derive vegetation index products. The first step utilized GEE to efficiently batch download the time series EVI data. +In this study, we employed a three-step coding approach to analyze the time series EVI data and derive vegetation index products. The first step utilized GEE to efficiently batch download the time series EVI data. * The code for downloading timeseries EVI in GEE: [gee-batch-export-mxd13q1.js](/gee-batch-export-mxd13q1.js) @@ -150,7 +150,7 @@ Lastly, another ArcPy script was employed to compute various vegetation index de ## Result -We present a summary of the key derived variables employed in our analysis to monitor vegetation conditions and dynamics within Syria's cropland areas. +We present a summary of the key derived variables employed in our analysis to monitor vegetation conditions and dynamics within Syria's cropland areas. ### Anomaly and Vegetation Condition @@ -479,35 +479,35 @@ This section presents a comprehensive analysis of planting and harvest cycles in **Figure 42.** Annual Harvest and Planting, 2003-2023 ::: - + :::{tab-item} Tartous :sync: key10 ![AHP43](./images/plot_syr_adm1_Tartous_annual_pheno.png) **Figure 43.** Annual Harvest and Planting, 2003-2023 ::: - + :::{tab-item} Ar-Raqqa :sync: key11 ![AHP44](./images/plot_syr_adm1_Ar-Raqqa_annual_pheno.png) **Figure 44.** Annual Harvest and Planting, 2003-2023 ::: - + :::{tab-item} Dar'a :sync: key12 ![AHP45](./images/plot_syr_adm1_Dar'a_annual_pheno.png) **Figure 45.** Annual Harvest and Planting, 2003-2023 ::: - + :::{tab-item} As-Sweida :sync: key13 ![AHP46](./images/plot_syr_adm1_As-Sweida_annual_pheno.png) **Figure 46.** Annual Harvest and Planting, 2003-2023 ::: - + :::{tab-item} Quneitra :sync: key14 ![AHP47](./images/plot_syr_adm1_Quneitra_annual_pheno.png) @@ -581,35 +581,35 @@ This section presents a comprehensive analysis of planting and harvest cycles in **Figure 56.** Monthly Harvest and Planting, 2003-2023 ::: - + :::{tab-item} Tartous :sync: key10 ![MHP57](./images/plot_syr_adm1_Tartous_monthly_pheno.png) **Figure 57.** Monthly Harvest and Planting, 2003-2023 ::: - + :::{tab-item} Ar-Raqqa :sync: key11 ![MHP58](./images/plot_syr_adm1_Ar-Raqqa_monthly_pheno.png) **Figure 58.** Monthly Harvest and Planting, 2003-2023 ::: - + :::{tab-item} Dar'a :sync: key12 ![MHP59](./images/plot_syr_adm1_Dar'a_monthly_pheno.png) **Figure 59.** Monthly Harvest and Planting, 2003-2023 ::: - + :::{tab-item} As-Sweida :sync: key13 ![MHP60](./images/plot_syr_adm1_As-Sweida_monthly_pheno.png) **Figure 60.** Monthly Harvest and Planting, 2003-2023 ::: - + :::{tab-item} Quneitra :sync: key14 ![MHP61](./images/plot_syr_adm1_Quneitra_monthly_pheno.png) @@ -703,35 +703,35 @@ This section presents a comprehensive analysis of planting and harvest cycles in **Figure 72.** Annual Rainfall and Temperature, 2003-2023 ::: - + :::{tab-item} Tartous :sync: key10 ![ART73](./images/plot_syr_adm1_Tartous_annual_preciptavg.png) **Figure 73.** Annual Rainfall and Temperature, 2003-2023 ::: - + :::{tab-item} Ar-Raqqa :sync: key11 ![ART74](./images/plot_syr_adm1_Ar-Raqqa_annual_preciptavg.png) **Figure 74.** Annual Rainfall and Temperature, 2003-2023 ::: - + :::{tab-item} Dar'a :sync: key12 ![ART75](./images/plot_syr_adm1_Dar'a_annual_preciptavg.png) **Figure 75.** Annual Rainfall and Temperature, 2003-2023 ::: - + :::{tab-item} As-Sweida :sync: key13 ![ART76](./images/plot_syr_adm1_As-Sweida_annual_preciptavg.png) **Figure 76.** Annual Rainfall and Temperature, 2003-2023 ::: - + :::{tab-item} Quneitra :sync: key14 ![ART77](./images/plot_syr_adm1_Quneitra_annual_preciptavg.png) @@ -805,35 +805,35 @@ This section presents a comprehensive analysis of planting and harvest cycles in **Figure 86.** Monthly Rainfall and Temperature, 2003-2023 ::: - + :::{tab-item} Tartous :sync: key10 ![MRT87](./images/plot_syr_adm1_Tartous_monthly_preciptavg.png) **Figure 87.** Monthly Rainfall and Temperature, 2003-2023 ::: - + :::{tab-item} Ar-Raqqa :sync: key11 ![MRT88](./images/plot_syr_adm1_Ar-Raqqa_monthly_preciptavg.png) **Figure 88.** Monthly Rainfall and Temperature, 2003-2023 ::: - + :::{tab-item} Dar'a :sync: key12 ![MRT89](./images/plot_syr_adm1_Dar'a_monthly_preciptavg.png) **Figure 89.** Monthly Rainfall and Temperature, 2003-2023 ::: - + :::{tab-item} As-Sweida :sync: key13 ![MRT90](./images/plot_syr_adm1_As-Sweida_monthly_preciptavg.png) **Figure 90.** Monthly Rainfall and Temperature, 2003-2023 ::: - + :::{tab-item} Quneitra :sync: key14 ![MRT91](./images/plot_syr_adm1_Quneitra_monthly_preciptavg.png) @@ -1068,7 +1068,7 @@ This section delves into the analysis of annual and monthly trends in planting a The aggregate data in admin0, 1, 2 and 3 level, along with the maps and charts are available in the Sharepoint: [link](https://worldbankgroup.sharepoint.com/:f:/r/teams/DevelopmentDataPartnershipCommunity-WBGroup/Shared%20Documents/Projects/Data%20Lab/Syria%20Economic%20Monitor/Data/vegetation-conditions?csf=1&web=1&e=4XhouQ) - accessible from internal network. -## Potential Application +## Potential Application Above products provides an important starting point for continuous monitoring of the crop planting status. Continuous monitoring could inform the following assessments: @@ -1095,6 +1095,3 @@ This information is necessary for both policy makers, farmers, and other agricul 7. Peel, M. C., Finlayson, B. L., and McMahon, T. A.: Updated world map of the Köppen-Geiger climate classification, Hydrol. Earth Syst. Sci., 11, 1633–1644, https://doi.org/10.5194/hess-11-1633-2007, 2007 8. Porter John R and Semenov Mikhail A 2005Crop responses to climatic variation. Phil. Trans. R. Soc. B. 360:2021–2035. http://doi.org/10.1098/rstb.2005.1752 9. Rockström, J., & Falkenmark, M. (2000). Semiarid crop production from a hydrological perspective: Gap between potential and actual yields. Critical Reviews in Plant Sciences, 19(4), 319-346. https://doi.org/10.1080/07352680091139259 - - - diff --git a/notebooks/vegetation-conditions/Seasonality_Parameters_Data_Extraction.md b/notebooks/vegetation-conditions/Seasonality_Parameters_Data_Extraction.md index 19167e4a..05f78fef 100644 --- a/notebooks/vegetation-conditions/Seasonality_Parameters_Data_Extraction.md +++ b/notebooks/vegetation-conditions/Seasonality_Parameters_Data_Extraction.md @@ -28,7 +28,7 @@ For this tutorial, we are working on these folder `X:/Temp/modis/syr/` directory Place to put downloaded VI data, and pre-process temporary files. -2. `output` +2. `output` 1. `01_raw_seasonality_metrics` Place for raw outputs seasonality files generated by TIMESAT 2. `02_tif_seasonality_metrics` Place for ready-to-used seasonality raster (`.tif`) files 3. `03_extract_date` Place for extract each seasonality date @@ -43,7 +43,7 @@ This whole process requires the support of several software. ### 1.1. TIMESAT -To investigate the seasonality of satellite time-series data and their relationship with dynamic properties of vegetation, such as phenology and temporal development, we will use [TIMESAT](https://web.nateko.lu.se/timesat/timesat.asp) software - a software package for analysing time-series of satellite sensor data. +To investigate the seasonality of satellite time-series data and their relationship with dynamic properties of vegetation, such as phenology and temporal development, we will use [TIMESAT](https://web.nateko.lu.se/timesat/timesat.asp) software - a software package for analysing time-series of satellite sensor data. TIMESAT available for download via this link [https://web.nateko.lu.se/timesat/timesat.asp?cat=4](https://web.nateko.lu.se/timesat/timesat.asp?cat=4). You are required to register first before downloading the software. @@ -69,9 +69,9 @@ The main driver for all TIMESAT processing, Matlab or Fortran, is a menu system. **Images input** -* TIMESAT needs a sequence of vegetation index images covering a particular geographical area. Images should be converted to headerless binary format. +* TIMESAT needs a sequence of vegetation index images covering a particular geographical area. Images should be converted to headerless binary format. -* The number of images needs to be identical for each year, and each image should represent the same time interval (e.g. one day, 8-days, 10-days, 1 month etc.). +* The number of images needs to be identical for each year, and each image should represent the same time interval (e.g. one day, 8-days, 10-days, 1 month etc.). * If an image representing a certain date is missing, an image denoting missing data should be added. This image should contain numerical values outside the range of the valid data. @@ -98,9 +98,9 @@ The first row contains the number of data files (images), then comes one image n **Viewing images** -* Start TSM_imageview from the TIMESAT menu system. Under File, Open image file, browse to the folder `02_bil` and click on one of `.bil` file. +* Start TSM_imageview from the TIMESAT menu system. Under File, Open image file, browse to the folder `02_bil` and click on one of `.bil` file. -* The files contain EVI data from the MODIS sensor. Change the choice under Image file type to 16-bit signed integer. Type `2229` under No of rows in image, and `3016` under No of columns per row. Click the Draw button. +* The files contain EVI data from the MODIS sensor. Change the choice under Image file type to 16-bit signed integer. Type `2229` under No of rows in image, and `3016` under No of columns per row. Click the Draw button. ![TIMESAT imageview](./images/climag-timesat-imageview.png) @@ -110,11 +110,11 @@ The first row contains the number of data files (images), then comes one image n **Browsing through several files** -* If you have made sure that your file list correctly points to your vegetation index image data, you may use the function Open file list under File. +* If you have made sure that your file list correctly points to your vegetation index image data, you may use the function Open file list under File. -* Click on the Open file list button and browse to folder the file `syr_data_2022_gee_raw.txt`, select it. +* Click on the Open file list button and browse to folder the file `syr_data_2022_gee_raw.txt`, select it. -* Click on one of the files, leave the window open and go over to the main window. +* Click on one of the files, leave the window open and go over to the main window. * Choose the correct settings under Format and click the Draw button. You can then point to another file in the list and just click the Draw button again to view this image file. @@ -130,9 +130,9 @@ The first row contains the number of data files (images), then comes one image n * Click on TSM_GUI in the TIMESAT menu system -* Then select File, Open ASCII data file. Use the Browse button to open the file `syr_data_2022_gee_raw.txt`. +* Then select File, Open ASCII data file. Use the Browse button to open the file `syr_data_2022_gee_raw.txt`. -* This file contains EVI data from MODIS for the time period 2021 – 2023. Note the preview of the file contents loaded into the window. +* This file contains EVI data from MODIS for the time period 2021 – 2023. Note the preview of the file contents loaded into the window. * The first row shows that there are 3 years of data, 46 observations per year. Press Load data. The raw data from the first row of the file will load into the plotting area of TSM_GUI. @@ -140,9 +140,9 @@ The first row contains the number of data files (images), then comes one image n **Figure 7.** Specify input data -* Next, select and unselect the different check boxes under Data plotting. Note the different fits achieved with `Gaussian`, `Logistic` and `Savitsky-Golay`. +* Next, select and unselect the different check boxes under Data plotting. Note the different fits achieved with `Gaussian`, `Logistic` and `Savitsky-Golay`. -* The fits are affected by a number of options for detecting spikes, adapting to the upper envelope etc. These options can be controlled by the check boxes and buttons in the GUI either under Common settings or Class-specific settings. +* The fits are affected by a number of options for detecting spikes, adapting to the upper envelope etc. These options can be controlled by the check boxes and buttons in the GUI either under Common settings or Class-specific settings. * There are more options, including the Spike method, Number of envelope iterations and Adaptation strength, that you might want to explore. @@ -160,11 +160,11 @@ The first row contains the number of data files (images), then comes one image n ### 2.5. Process -* To start the program click on `TSF_process` in the TIMESAT menu system. +* To start the program click on `TSF_process` in the TIMESAT menu system. -* TIMESAT will ask for the input settings file. Select the file `syr_2022_gee_raw.set`. +* TIMESAT will ask for the input settings file. Select the file `syr_2022_gee_raw.set`. -* A command window will then open and `TSF_process` will start running immediately. +* A command window will then open and `TSF_process` will start running immediately. * You can also start `TSF_process` directly from a separate command window by typing `TSF_process`. @@ -184,18 +184,18 @@ As example, we only utilized `TSF_seas2img` to extract the seasonal parameters **TSF_seas2img: Creating an image from the seasonality data** -* This program generates an image from the seasonality parameters generated by Timesat. +* This program generates an image from the seasonality parameters generated by Timesat. -* Click on `TSF_seas2img` in TSM_menu. +* Click on `TSF_seas2img` in TSM_menu. -* Now enter the seasonality file `syr_2022_gee_raw_TS.tpa`. Then specify the seasonality parameter to map. Here we will map the Time of Middle Season, `5`. +* Now enter the seasonality file `syr_2022_gee_raw_TS.tpa`. Then specify the seasonality parameter to map. Here we will map the Time of Middle Season, `5`. -* Then specify an interval that is wide enough to cover the second season. A suggestion is to specify this interval to `47` to `92` since this will overlap the second year. +* Then specify an interval that is wide enough to cover the second season. A suggestion is to specify this interval to `47` to `92` since this will overlap the second year. -* Define codes for missing data due to no season found within the interval, and no pixel data at all found at that location. -Finally, give a name of the output file, and specify its format. +* Define codes for missing data due to no season found within the interval, and no pixel data at all found at that location. +Finally, give a name of the output file, and specify its format. -* Carefully note the format since it is important when viewing the file with TSM_imageview. Here we will give the name begin, and specify output in full precision, `16-bit`. +* Carefully note the format since it is important when viewing the file with TSM_imageview. Here we will give the name begin, and specify output in full precision, `16-bit`. ![TIMESAT seas2img](./images/climag-timesat-seas2img.png) @@ -234,4 +234,3 @@ Finally, give a name of the output file, and specify its format. ``` * After all the output data available in GeoTIFF format, feel free to use other software for further processing. - diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..0335eb85 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,46 @@ +[build-system] +requires = ["hatchling>=1.21.0", "hatch-vcs>=0.3.0"] +build-backend = "hatchling.build" + +[project] +name = "syria-economic-monitor" +description = "Support for the World Bank Syria Economic Monitor" +readme = { file = "README.md", content-type = "text/markdown" } +license = { file = "LICENSE" } +keywords = ["nighttime lights", "nasa black marble"] +authors = [{ name = "World Bank Data Lab", email = "datalab@worldbank.org" }] +maintainers = [ + { name = "Gabriel Stefanini Vicente", email = "gvicente@worldbank.org" }, + { name = "Robert Marty", email = "rmarty@worldbank.org" }, +] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering", +] +requires-python = ">=3.10" +dynamic = ["version"] + +[project.optional-dependencies] +docs = [ + "docutils==0.17.1", # https://jupyterbook.org/en/stable/content/citations.html?highlight=docutils#citations-and-bibliographies + "jupyter-book>=0.15.1", +] +[project.urls] +"Homepage" = "https://datapartnership.github.io/syria-economic-monitor" +"Bug Reports" = "https://github.com/datapartnership/syria-economic-monitor/issues" +"Source" = "https://github.com/datapartnership/syria-economic-monitor" + +[tool.codespell] +skip = './.git,docs/_build,docs/bibliography.bib,*.py,*.R,*.png,*.gz,*.whl' +ignore-regex = '^\s*"image\/png":\s.*' +ignore-words-list = "gost," + +[tool.hatch.build.targets.wheel] +packages = ["src/*"] + +[tool.hatch.version] +source = "vcs" + +[tool.ruff.lint.pydocstyle] +convention = "numpy"