Skip to content

Commit c1ccf78

Browse files
authored
Merge branch 'master' into pep_monthly_cloud_job_fix
2 parents 285dedd + 22f9701 commit c1ccf78

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

scripts/us_bts/latch/manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
],
3737
"cron_schedule": "0 1 6 * *",
3838
"resource_limits": {
39-
"cpu": 8,
40-
"memory": 64,
41-
"disk": 100
39+
"cpu": 16,
40+
"memory": 128,
41+
"disk": 300
4242
}
4343
}
4444
]
45-
}
45+
}

scripts/us_census/pep/us_pep_sex/process.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,11 @@ def process(self):
10921092
value_vars=['Count_Person_Male', 'Count_Person_Female'],
10931093
var_name="SV",
10941094
value_name="Observation")
1095-
1095+
subset_cols = ['Year', 'geo_ID', 'Measurement_Method', 'SV']
1096+
# 2. Drop duplicates based on those columns, keeping the first occurrence
1097+
final_df.drop_duplicates(subset=subset_cols,
1098+
keep='first',
1099+
inplace=True)
10961100
final_df.to_csv(self._cleaned_csv_file_path, index=False)
10971101
sv_list = ['Count_Person_Female', 'Count_Person_Male']
10981102
self._generate_mcf(sv_list)
@@ -1117,7 +1121,7 @@ def fetch_skip_urls_from_gcs(GCS_BUCKET_NAME: str,
11171121

11181122
def is_valid_url(url):
11191123
try:
1120-
response = requests.get(url, timeout=10)
1124+
response = requests.get(url, timeout=20)
11211125
if response.status_code != 200:
11221126
return False
11231127
content_type = response.headers.get("Content-Type", "")

0 commit comments

Comments
 (0)