Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLS_CPI changes made related to test cases,download and process #1191

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
acf7893
Auxilio Brazil Test Data and Readme file added
shamimansari1988 Aug 13, 2024
97791a0
reverted the changes
shamimansari1988 Aug 20, 2024
2fa9928
Merge branch 'datacommonsorg:master' into master
shamimansari1988 Nov 22, 2024
ad44b6e
Merge branch 'datacommonsorg:master' into master
shamimansari1988 Dec 6, 2024
4dde783
Merge branch 'datacommonsorg:master' into master
shamimansari1988 Dec 11, 2024
110758f
Merge branch 'datacommonsorg:master' into master
shamimansari1988 Dec 16, 2024
ed151de
Merge branch 'datacommonsorg:master' into master
shamimansari1988 Dec 23, 2024
1794abb
Merge branch 'datacommonsorg:master' into master
shamimansari1988 Jan 3, 2025
1badad3
Merge branch 'datacommonsorg:master' into master
shamimansari1988 Jan 20, 2025
4b1808b
Merge branch 'datacommonsorg:master' into master
shamimansari1988 Jan 20, 2025
2fdd7ba
BLS_CPI changes made related to test cases and download and process
shamimansari1988 Jan 20, 2025
e5dfcdc
BLS_CPI changes made related to test cases and download and process
shamimansari1988 Jan 20, 2025
3466242
PR comment resolved
shamimansari1988 Jan 21, 2025
f755344
PR comment resolved
shamimansari1988 Jan 21, 2025
c1e79da
PR comments fix done
shamimansari1988 Jan 22, 2025
93ed15d
Dependency version fix done
shamimansari1988 Jan 22, 2025
6db74c1
added . with imported module
shamimansari1988 Jan 22, 2025
66049b7
flag renamed to start_date
shamimansari1988 Jan 23, 2025
585b1d3
requirements_all.txt updated
shamimansari1988 Jan 23, 2025
102fecd
Merge branch 'master' into data-us_bls_cpi_SwethaChanges_new
shamimansari1988 Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ pandas
psutil
pylint
pytest
requests==2.27.1
requests_cache
retry==0.9.2
shapely==1.8.5
urllib3==1.26.8
xarray==0.19.0
xlrd
zipp
beautifulsoup4
ratelimit
xlsxwriter==3.2.0
websockets==12.0
shamimansari1988 marked this conversation as resolved.
Show resolved Hide resolved
requests==2.31.0
urllib3==1.26.17

5 changes: 3 additions & 2 deletions requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@ pylint
pytest
rasterio
rdp==0.8
requests==2.27.1
retry==0.9.2
s2sphere==0.2.5
shapely==1.8.5
tabula-py
urllib3==1.26.8
xarray==0.19.0
xlrd
yapf
zipp
beautifulsoup4
ratelimit
xlsxwriter==3.2.0
websockets==12.0
requests==2.31.0
urllib3==1.26.17
85 changes: 8 additions & 77 deletions scripts/us_bls/cpi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,80 +110,11 @@ The license is available online at https://www.bls.gov/bls/linksite.htm.
- Contains StatisticalVariables for C-CPI-U series.
- [cpi_u.mcf](cpi_u.mcf)
- [cpi_w.mcf](cpi_w.mcf)
- [pop_type_enums.mcf](pop_type_enums.mcf)
- Contains populationType enums for all three types of series.
- [unit_enums.mcf](unit_enums.mcf)
- Contains unit enums for all three types of series.

#### Scripts

- [generate_csv_mcf.py](generate_csv_mcf.py) generates the CSVs,
StatisticalVariable MCFs, and template MCFs. See module docstring.

## Proposed manifest.json for adding product breakdown

See About the Import > Status above for context.

```
{
"import_specifications": [
{
"import_name": "USBLS_CPI_U",
"curator_emails": [
"shijunjie@google.com"
],
"provenance_url": "https://www.bls.gov/cpi/",
"provenance_description": "U.S. Bureau of Labor Statistics Consumer Price Index for All Urban Consumers",
"scripts": [
"generate_csv_mcf.py"
],
"import_inputs": [
{
"template_mcf": "cpi_u.tmcf",
"cleaned_csv": "cpi_u.csv",
"node_mcf": "cpi_u.mcf"
}
],
"cron_schedule": "0 17 15 * *"
},
{
"import_name": "USBLS_CPI_W",
"curator_emails": [
"shijunjie@google.com"
],
"provenance_url": "https://www.bls.gov/cpi/",
"provenance_description": "U.S. Bureau of Labor Statistics Consumer Price Index for Urban Wage Earners and Clerical Workers",
"scripts": [
"generate_csv_mcf.py"
],
"import_inputs": [
{
"template_mcf": "cpi_w.tmcf",
"cleaned_csv": "cpi_w.csv",
"node_mcf": "cpi_w.mcf"
}
],
"cron_schedule": "15 17 15 * *"
},
{
"import_name": "USBLS_C_CPI_U",
"curator_emails": [
"shijunjie@google.com"
],
"provenance_url": "https://www.bls.gov/cpi/",
"provenance_description": "U.S. Bureau of Labor Statistics Chained Consumer Price Index for All Urban Consumers",
"scripts": [
"generate_csv_mcf.py"
],
"import_inputs": [
{
"template_mcf": "c_cpi_u.tmcf",
"cleaned_csv": "c_cpi_u.csv",
"node_mcf": "c_cpi_u.mcf"
}
],
"cron_schedule": "30 17 15 * *"
}
]
}
```

### Steps to download and process

python3 generate_csv.py --mode=download
python3 generate_csv.py --mode=process

### Note: Data is available from 1947 in source , so the historical data is retained in GCP bucket (unresolved_mcf/bls/cpi/HistoricalData) from 1913 to 1946.
### Auto-refresh is done only for 1947 and more year data.
7,309 changes: 0 additions & 7,309 deletions scripts/us_bls/cpi/c_cpi_u.csv

This file was deleted.

Loading
Loading