-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into wizard-anomalist
- Loading branch information
Showing
47 changed files
with
1,743 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
steps: | ||
# | ||
# GHSL degree of urbanization. | ||
# | ||
data://meadow/urbanization/2024-01-26/ghsl_degree_of_urbanisation: | ||
- snapshot://urbanization/2024-01-26/ghsl_degree_of_urbanisation.zip | ||
data://garden/urbanization/2024-01-26/ghsl_degree_of_urbanisation: | ||
- data://meadow/urbanization/2024-01-26/ghsl_degree_of_urbanisation | ||
- data://garden/wb/2023-04-30/income_groups | ||
- data://garden/regions/2023-01-01/regions | ||
data://grapher/urbanization/2024-01-26/ghsl_degree_of_urbanisation: | ||
- data://garden/urbanization/2024-01-26/ghsl_degree_of_urbanisation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
etl/steps/data/garden/cancer/2024-10-13/gco_cancer_over_time_cervical.countries.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"Argentina": "Argentina", | ||
"Australia": "Australia", | ||
"Austria": "Austria", | ||
"Bahrain": "Bahrain", | ||
"Belarus": "Belarus", | ||
"Canada": "Canada", | ||
"Chile": "Chile", | ||
"China": "China", | ||
"Colombia": "Colombia", | ||
"Costa Rica": "Costa Rica", | ||
"Croatia": "Croatia", | ||
"Cyprus": "Cyprus", | ||
"Czechia": "Czechia", | ||
"Denmark": "Denmark", | ||
"Ecuador": "Ecuador", | ||
"Estonia": "Estonia", | ||
"Finland": "Finland", | ||
"Germany": "Germany", | ||
"Iceland": "Iceland", | ||
"India": "India", | ||
"Ireland": "Ireland", | ||
"Israel": "Israel", | ||
"Italy": "Italy", | ||
"Japan": "Japan", | ||
"Korea, Republic of": "South Korea", | ||
"Kuwait": "Kuwait", | ||
"Latvia": "Latvia", | ||
"Lithuania": "Lithuania", | ||
"Malta": "Malta", | ||
"New Zealand": "New Zealand", | ||
"Norway": "Norway", | ||
"Philippines": "Philippines", | ||
"Poland": "Poland", | ||
"Puerto Rico": "Puerto Rico", | ||
"Qatar": "Qatar", | ||
"Slovenia": "Slovenia", | ||
"Spain": "Spain", | ||
"Sweden": "Sweden", | ||
"Switzerland": "Switzerland", | ||
"Thailand": "Thailand", | ||
"USA": "United States", | ||
"Uganda": "Uganda", | ||
"France (metropolitan)": "France", | ||
"France, Martinique": "Martinique", | ||
"The Netherlands": "Netherlands", | ||
"T\u00fcrkiye": "Turkey", | ||
"UK, England": "England", | ||
"UK, Northern Ireland": "Northern Ireland", | ||
"UK, Scotland": "Scotland", | ||
"UK, Wales": "Wales", | ||
"USA: Black": "United States (Black)", | ||
"USA: White": "United States (White)" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
etl/steps/data/garden/cancer/2024-10-13/gco_cancer_today_cervical.meta.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# NOTE: To learn more about the fields, hover over their names. | ||
definitions: | ||
common: | ||
presentation: | ||
topic_tags: | ||
- Cancer | ||
|
||
|
||
# Learn more about the available fields: | ||
# http://docs.owid.io/projects/etl/architecture/metadata/reference/ | ||
dataset: | ||
update_period_days: 365 | ||
|
||
|
||
tables: | ||
gco_cancer_today_cervical: | ||
variables: | ||
asr: | ||
title: Age-standardized cervical cancer incidence rate per 100,000 women | ||
unit: 'per 100,000 women' | ||
description_short: |- | ||
Estimated number of new cervical [cancer](#dod:cancer) cases per 100,000 women. | ||
description_from_producer: |- | ||
An age-standardized rate (ASR) is a summary measure of the rate that would have been observed if the population had a standard age structure. Standardization is necessary when comparing several populations that differ with respect to age, because age has a strong influence on the risk of cancer. An ASR is a weighted mean of the age-specific rates; the weighting is based on the population distribution of a standard population. The most frequently used standard population is the World (W) Standard Population. The calculated incidence rate is then called the age-standardized incidence or mortality rate (W), and is expressed per 100 000 person-years. The World Standard Population used in GLOBOCAN was first proposed by Segi (1960)a and later modified by Doll et al. (1966)b. | ||
presentation: | ||
grapher_config: | ||
note: To allow for comparisons between countries and over time, this metric is [age-standardized](#dod:age_standardized). The methods of estimation are country-specific, and the quality of the national estimates depends on the coverage, accuracy, and timeliness of the recorded incidence and mortality data in a given country. |
36 changes: 36 additions & 0 deletions
36
etl/steps/data/garden/cancer/2024-10-13/gco_cancer_today_cervical.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
"""Load a meadow dataset and create a garden dataset.""" | ||
|
||
from etl.data_helpers import geo | ||
from etl.helpers import PathFinder, create_dataset | ||
|
||
# Get paths and naming conventions for current step. | ||
paths = PathFinder(__file__) | ||
|
||
|
||
def run(dest_dir: str) -> None: | ||
# | ||
# Load inputs. | ||
# | ||
# Load meadow dataset. | ||
ds_meadow = paths.load_dataset("gco_cancer_today_cervical") | ||
|
||
# Read table. | ||
|
||
tb = ds_meadow["gco_cancer_today_cervical"].reset_index() | ||
# | ||
# Process data. | ||
# | ||
|
||
tb = geo.harmonize_countries(df=tb, countries_file=paths.country_mapping_path) | ||
tb = tb.format(["country", "year"]) | ||
|
||
# | ||
# Save outputs. | ||
# | ||
# Create a new garden dataset with the same metadata as the meadow dataset. | ||
ds_garden = create_dataset( | ||
dest_dir, tables=[tb], check_variables_metadata=True, default_metadata=ds_meadow.metadata | ||
) | ||
|
||
# Save changes in the new garden dataset. | ||
ds_garden.save() |
Oops, something went wrong.