Skip to content

Commit 99e5495

Browse files
authored
Merge pull request #1328 from cmu-delphi/release/indicators_v0.2.0_utils_v0.2.0
Release covidcast-indicators 0.2.0
2 parents db4caba + dbd46d0 commit 99e5495

File tree

75 files changed

+75457
-76252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+75457
-76252
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.1.25
2+
current_version = 0.2.0
33
commit = True
44
message = chore: bump covidcast-indicators to {new_version}
55
tag = False

_delphi_utils_python/.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.1.17
2+
current_version = 0.2.0
33
commit = True
44
message = chore: bump delphi_utils to {new_version}
55
tag = False

_delphi_utils_python/data_proc/geomap/consistency_checks.ipynb

Lines changed: 0 additions & 888 deletions
This file was deleted.

_delphi_utils_python/data_proc/geomap/geo_data_proc.py

100644100755
Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
FIPS_MSA_URL = "https://www2.census.gov/programs-surveys/metro-micro/geographies/reference-files/2018/delineation-files/list1_Sep_2018.xls"
2525
JHU_FIPS_URL = "https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/UID_ISO_FIPS_LookUp_Table.csv"
2626
STATE_CODES_URL = "http://www2.census.gov/geo/docs/reference/state.txt?#"
27-
FIPS_POPULATION_URL = "https://www2.census.gov/programs-surveys/popest/datasets/2010-2019/counties/totals/co-est2019-alldata.csv"
27+
FIPS_POPULATION_URL = "https://www2.census.gov/programs-surveys/popest/datasets/2010-2020/counties/totals/co-est2020-alldata.csv"
2828
FIPS_PUERTO_RICO_POPULATION_URL = (
2929
"https://www2.census.gov/geo/docs/maps-data/data/rel/zcta_county_rel_10.txt?"
3030
)
@@ -358,34 +358,31 @@ def create_fips_population_table():
358358
census_pop["fips"] = census_pop.apply(
359359
lambda x: f"{x['STATE']:02d}{x['COUNTY']:03d}", axis=1
360360
)
361-
census_pop["pop"] = census_pop["POPESTIMATE2019"]
361+
census_pop["pop"] = census_pop["POPESTIMATE2020"]
362362
census_pop = census_pop[["fips", "pop"]]
363+
364+
# Set population for Dukes and Nantucket combo county
365+
dukes_pop = int(census_pop.loc[census_pop["fips"] == "25007", "pop"])
366+
nantu_pop = int(census_pop.loc[census_pop["fips"] == "25019", "pop"])
363367
census_pop = pd.concat(
364368
[
365369
census_pop,
366370
pd.DataFrame(
367371
{
368-
"fips": ["70002", "70003"],
369-
"pop": [0, 0],
372+
"fips": [
373+
"70002", # Dukes and Nantucket combo county
374+
"70003" # Kansas City
375+
],
376+
"pop": [
377+
dukes_pop + nantu_pop,
378+
491918 # via Google
379+
],
370380
}
371381
),
372382
]
373383
)
374384
census_pop = census_pop.reset_index(drop=True)
375385

376-
# Set population for Dukes and Nantucket
377-
dn_fips = "70002"
378-
dukes_fips = "25007"
379-
nantu_fips = "25019"
380-
381-
census_pop.loc[census_pop["fips"] == dn_fips, "pop"] = (
382-
census_pop.loc[census_pop["fips"] == dukes_fips, "pop"].values
383-
+ census_pop.loc[census_pop["fips"] == nantu_fips, "pop"].values
384-
)
385-
386-
# Set population for Kansas City
387-
census_pop.loc[census_pop["fips"] == "70003", "pop"] = 491918 # via Google
388-
389386
# Get the file with Puerto Rico populations
390387
df_pr = pd.read_csv(FIPS_PUERTO_RICO_POPULATION_URL)
391388
df_pr["fips"] = df_pr["STATE"].astype(str).str.zfill(2) + df_pr["COUNTY"].astype(

_delphi_utils_python/data_proc/geomap/source-file-sanity-check.ipynb

Lines changed: 96 additions & 0 deletions
Large diffs are not rendered by default.

_delphi_utils_python/delphi_utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
from .signal import add_prefix
1515
from .nancodes import Nans
1616

17-
__version__ = "0.1.17"
17+
__version__ = "0.2.0"

_delphi_utils_python/delphi_utils/data/fips_hhs_table.csv

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ fips,hhs
7171
02020,10
7272
02050,10
7373
02060,10
74+
02063,10
75+
02066,10
7476
02068,10
7577
02070,10
7678
02090,10
@@ -91,7 +93,6 @@ fips,hhs
9193
02220,10
9294
02230,10
9395
02240,10
94-
02261,10
9596
02275,10
9697
02282,10
9798
02290,10
@@ -3234,60 +3235,60 @@ fips,hhs
32343235
69100,9
32353236
69110,9
32363237
69120,9
3237-
78000,2
3238-
33000,1
3238+
27000,5
3239+
40000,6
3240+
70000,9
3241+
31000,7
32393242
09000,1
3243+
48000,6
32403244
32000,9
3241-
04000,9
3242-
30000,8
3243-
15000,9
3244-
69000,9
3245+
50000,1
32453246
25000,1
3246-
19000,7
3247-
01000,4
3248-
51000,3
3249-
41000,10
3250-
66000,9
3251-
22000,6
3252-
06000,9
3253-
39000,5
3254-
38000,8
32553247
53000,10
3256-
12000,4
3257-
46000,8
32583248
17000,5
3259-
48000,6
3260-
34000,2
3261-
08000,8
3262-
36000,2
3263-
40000,6
3264-
47000,4
3249+
28000,4
3250+
02000,10
32653251
49000,8
3252+
54000,3
3253+
20000,7
3254+
08000,8
3255+
34000,2
3256+
35000,6
32663257
45000,4
3258+
29000,7
3259+
66000,9
3260+
05000,6
3261+
41000,10
3262+
37000,4
32673263
55000,5
3268-
11000,3
3269-
02000,10
3270-
72000,2
3271-
23000,1
3272-
16000,10
32733264
44000,1
3274-
54000,3
3275-
10000,3
3276-
21000,4
3277-
28000,4
3278-
18000,5
3279-
05000,6
32803265
56000,8
3266+
36000,2
3267+
19000,7
32813268
24000,3
3282-
50000,1
3283-
37000,4
3284-
20000,7
3285-
31000,7
3286-
29000,7
3287-
27000,5
3269+
46000,8
3270+
38000,8
3271+
72000,2
3272+
23000,1
3273+
78000,2
3274+
16000,10
3275+
47000,4
3276+
22000,6
32883277
13000,4
3278+
30000,8
3279+
39000,5
3280+
18000,5
3281+
11000,3
3282+
15000,9
32893283
42000,3
3290-
35000,6
3291-
60000,9
3284+
01000,4
3285+
12000,4
3286+
10000,3
3287+
04000,9
3288+
69000,9
3289+
06000,9
3290+
33000,1
32923291
26000,5
3293-
70000,9
3292+
21000,4
3293+
60000,9
3294+
51000,3

0 commit comments

Comments
 (0)