Skip to content

Commit

Permalink
Proofreading
Browse files Browse the repository at this point in the history
  • Loading branch information
g4brielvs committed Mar 20, 2024
1 parent 43a5c33 commit bd02384
Show file tree
Hide file tree
Showing 21 changed files with 1,117 additions and 1,442 deletions.
59 changes: 32 additions & 27 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- 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
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,6 @@ target/
# Mypy cache
.mypy_cache/

# Jupyter Book
_build/
# Project-specific
_build/
data/
39 changes: 39 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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]
8 changes: 0 additions & 8 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Restrictions may apply to the data that support the findings of this study. Data

## License

The repository is licensed under the [World Bank Master Community License Agreement](LICENSE.md).
This projects is licensed under the [**Mozilla Public License**](https://opensource.org/license/mpl-2-0/) - see the [LICENSE](LICENSE) file for details.
8 changes: 4 additions & 4 deletions docs/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
[[email protected]](mailto:[email protected])
<[email protected]>.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down Expand Up @@ -116,13 +116,13 @@ 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.
<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).

[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.
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.
92 changes: 92 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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).
5 changes: 4 additions & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Book settings
title:
author: World Bank Development Data Group
author: Development Data Group
copyright: "2023"
logo: docs/images/logo.png
only_build_toc_files: true
Expand All @@ -17,6 +17,9 @@ html:
use_issues_button: true
baseurl: https://datapartnership.github.io/turkiye-earthquake-impact
extra_footer: |
<div>
Country borders or names do not necessarily reflect the World Bank Group’s official position. All maps are for illustrative purposes and do 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
</div>
<div>
<b>All content (unless otherwise specified) is subject to the <a href="https://www.mozilla.org/en-US/MPL">Mozilla Public License.</a></b>
</div>
Expand Down
8 changes: 3 additions & 5 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ parts:
- caption: Introduction to Data Goods
chapters:
- file: docs/introduction_to_data_goods
- caption: Foundational Datasets
chapters:
- file: docs/foundational_datasets_and_data_products.md
- file: notebooks/earthquake-intensity/earthquake_intensity.ipynb
- file: docs/data
- caption: Data Products
chapters:
- file: notebooks/earthquake-intensity/earthquake_intensity.ipynb
- file: notebooks/business-activity-trends/README
sections:
- file: notebooks/business-activity-trends/01-business-activity-trends.ipynb
Expand All @@ -28,7 +26,7 @@ parts:
- file: notebooks/nighttime-lights/README
- file: notebooks/surveys/README
sections:
- file: notebooks/surveys/premise.ipynb
- file: notebooks/surveys/premise.ipynb
- caption: Sample Indicators and Insights
chapters:
- file: docs/sample-indicators
Expand Down
1 change: 0 additions & 1 deletion docs/bibliography.bib
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,3 @@ @inproceedings{10.1145/3292500.3340412
location = {Anchorage, AK, USA},
series = {KDD '19}
}

15 changes: 8 additions & 7 deletions ...oundational_datasets_and_data_products.md → docs/data.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
(foundational-data)=
# Foundational Datasets and Data Products Summary
# Datasets and Data Products Summary

## Foundational Datasets
(data)=

**Foundational Datasets** refer to **all** datasets used in the analytics prepared for a project. The Foundational Datasets table includes a description of the data and their update frequency, as well as access links and contact information for questions about use and access. Users should not require any datasets not included in this table to complete the analytical work for the Data Good.
## Datasets

Following is list of all Foundational Datasets used in this Data Good:
**Datasets** refer to **all** datasets used in the analytics prepared for a project. The Datasets table includes a description of the data and their update frequency, as well as access links and contact information for questions about use and access. Users should not require any datasets not included in this table to complete the analytical work for the Data Good.

Following is 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.
Expand All @@ -26,11 +27,11 @@ Where feasible, all datasets that can be obtained through the Development Data H

## 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:

| ID | Name | Description | Limitations | Foundational Datasets Used (ID#) |
| ID | Name | Description | Limitations | Datasets Used (ID#) |
| --- | ---- | ----------- | ----------- | -------------------------------- |
| A | Observed POI Visitation based on mobility traces | Daily aggregated analysis of trip patterns through formal and informal checkpoints, over time. | Convenience sampling; Sample size is limited | 1,2 |
| B | Observed changes in Business Activity Trends | Daily and weekly aggregated business activity trends per business vertical | Only uses data from Facebook users | 1, 4 |
Expand Down
2 changes: 0 additions & 2 deletions docs/requirements.txt

This file was deleted.

Loading

0 comments on commit bd02384

Please sign in to comment.