vivarium-public-health 3.0.2__py3-none-any.whl → 3.0.3__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- __version__ = "3.0.2"
1
+ __version__ = "3.0.3"
@@ -204,8 +204,10 @@ class FertilityAgeSpecificRates(Component):
204
204
 
205
205
  def load_age_specific_fertility_rate_data(self, builder: Builder) -> pd.DataFrame:
206
206
  asfr_data = builder.data.load("covariate.age_specific_fertility_rate.estimate")
207
- columns = ["year_start", "year_end", "age_start", "age_end", "mean_value"]
208
- asfr_data = asfr_data.loc[asfr_data.sex == "Female"][columns]
207
+ columns = ["year_start", "year_end", "age_start", "age_end", "value"]
208
+ asfr_data = asfr_data.loc[
209
+ (asfr_data.sex == "Female") & (asfr_data.parameter == "mean_value")
210
+ ].reset_index()[columns]
209
211
  return asfr_data
210
212
 
211
213
  ########################
@@ -158,11 +158,18 @@ class DisabilityObserver(PublicHealthObserver):
158
158
  once), and so the results here are actually wide by disability weight
159
159
  pipeline name.
160
160
  """
161
-
162
- # Drop the unused 'value' column and rename the pipeline names to causes
163
- results = results.drop(columns=["value"]).rename(
164
- columns={col: col.replace(".disability_weight", "") for col in results.columns},
165
- )
161
+ if len(self.causes_of_disability) > 1:
162
+ # Drop the unused 'value' column and rename the remaining pipeline names to cause names
163
+ results = results.rename(
164
+ columns={
165
+ col: col.replace(".disability_weight", "") for col in results.columns
166
+ }
167
+ )[[col.state_id for col in self.causes_of_disability]]
168
+ else:
169
+ # Rename the 'value' column to the single cause of disability
170
+ results = results.rename(
171
+ columns={COLUMNS.VALUE: self.causes_of_disability[0].state_id}
172
+ )
166
173
  # Get desired index names prior to stacking
167
174
  idx_names = list(results.index.names) + [COLUMNS.SUB_ENTITY]
168
175
  results = pd.DataFrame(results.stack(), columns=[COLUMNS.VALUE])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vivarium_public_health
3
- Version: 3.0.2
3
+ Version: 3.0.3
4
4
  Summary: Components for modelling diseases, risks, and interventions with ``vivarium``
5
5
  Home-page: https://github.com/ihmeuw/vivarium_public_health
6
6
  Author: The vivarium developers
@@ -1,6 +1,6 @@
1
1
  vivarium_public_health/__about__.py,sha256=RgWycPypKZS80TpSX7o41cREnG8PfguNHDHLuLyl820,487
2
2
  vivarium_public_health/__init__.py,sha256=tomMOl3PI7O8GdxDWGBiBjT0Bwd31GpyQTYTzwIv108,361
3
- vivarium_public_health/_version.py,sha256=YKXrr5J7dV2n7ZhaRv0tigylRDtfOuvJC9Y4ouFZpzo,22
3
+ vivarium_public_health/_version.py,sha256=3PslnGRHLeT8kAWbhtBM110cQkzH_QzfQO5_B6lHOuU,22
4
4
  vivarium_public_health/utilities.py,sha256=5cl9jjVkOQ1UeXT4DjDMAhaBNNjAsDo-SVJwpv6FDw0,3071
5
5
  vivarium_public_health/disease/__init__.py,sha256=RuuiRcvAJfX9WQGt_WZZjxN7Cu3E5rMTmuaRS-UaFPM,419
6
6
  vivarium_public_health/disease/model.py,sha256=0WIYDEx-hwlUJp6Zl8m8bUMoWxuVkOWsJvh_YlZiOPs,8234
@@ -18,13 +18,13 @@ vivarium_public_health/mslt/population.py,sha256=6XedM2ZZzaU7U70GQLXj2VcyAvLp0Yj
18
18
  vivarium_public_health/plugins/__init__.py,sha256=oBW_zfgG_LbwfgTDjUe0btfy9FaDvAbtXho1zQFnz0Y,76
19
19
  vivarium_public_health/plugins/parser.py,sha256=dlH-tafOGCFvOUZx_QdOkSScMCwH4CbqR8dwPwX7dVw,32851
20
20
  vivarium_public_health/population/__init__.py,sha256=17rtbcNVK5LtCCxAex7P7Q_vYpwbeTepyf3nazS90Yc,225
21
- vivarium_public_health/population/add_new_birth_cohorts.py,sha256=ZpKURSS6DSsKcHPtkAfC59OYe2hYpduFAOm_goBD9mY,9084
21
+ vivarium_public_health/population/add_new_birth_cohorts.py,sha256=NhrPZBoFrHvYnwmG0Od_VCU_ptNECe7ZfdqUIqvOWrE,9157
22
22
  vivarium_public_health/population/base_population.py,sha256=Xn0sjPOT9KJZKILr1NchCwQFarvb3qWtgQ3Uvu999UU,17091
23
23
  vivarium_public_health/population/data_transformations.py,sha256=PsvE1-S-Q_K4viBgF2Ss0DaaoH0WyhRX26ZJYwJ0O84,22322
24
24
  vivarium_public_health/population/mortality.py,sha256=8T5W4D3oxx-4wjHT-0P1jCLiQI6_zznGLuJ-wobF1BY,10272
25
25
  vivarium_public_health/results/__init__.py,sha256=XKuX9HTXUur1kpHM7zuMSnkJxlg-W7eMAPmh8LP9Xp4,281
26
26
  vivarium_public_health/results/columns.py,sha256=YUI43jdJ3KwvTrm2Gmxk7By2CJjNFzocLwYHhO2pnn0,447
27
- vivarium_public_health/results/disability.py,sha256=juaR8eue3pJfD4QNwzIhSqMHqCU6XPZHGX9l-jHHV5Q,7456
27
+ vivarium_public_health/results/disability.py,sha256=ryb5SiTQ3MCTf5WPWk_1TPN6IC9Z_fY3Wd6XBv3Q9AY,7818
28
28
  vivarium_public_health/results/disease.py,sha256=7xUcyxx_d2T3DQD-WFRHaRxb0qKIOCCpIGWNpEXzixg,8209
29
29
  vivarium_public_health/results/mortality.py,sha256=4KUEPzzo1-kD4TdG0PeRMWW69aJcMQJtho9ED0cpErs,6865
30
30
  vivarium_public_health/results/observer.py,sha256=mzQEmWpY910eRUpdIxsS9S9eDwDMKm6SB_60EeH4Zyo,3079
@@ -42,8 +42,8 @@ vivarium_public_health/treatment/__init__.py,sha256=wONElu9aJbBYwpYIovYPYaN_GYfV
42
42
  vivarium_public_health/treatment/magic_wand.py,sha256=i9N57-MEuQv5B6dQ5iVMTAdOPghYcgiRRz-dTzigf1s,1980
43
43
  vivarium_public_health/treatment/scale_up.py,sha256=kifn7oKTjCJ2l1XiYm4U3FAH98USZ1gLPvf4z5-3wsU,7079
44
44
  vivarium_public_health/treatment/therapeutic_inertia.py,sha256=uOvMgIj-Bl5qTk4z7ZnTPUwOVH-xGeKs1pw8WYuE1f4,2340
45
- vivarium_public_health-3.0.2.dist-info/LICENSE.txt,sha256=mN4bNLUQNcN9njYRc_3jCZkfPySVpmM6MRps104FxA4,1548
46
- vivarium_public_health-3.0.2.dist-info/METADATA,sha256=eE53VuZ1LF_TVBCLpog2ZulD4IKs0RQXrYMrxgJdJ8s,4061
47
- vivarium_public_health-3.0.2.dist-info/WHEEL,sha256=nCVcAvsfA9TDtwGwhYaRrlPhTLV9m-Ga6mdyDtuwK18,91
48
- vivarium_public_health-3.0.2.dist-info/top_level.txt,sha256=VVInlpzCFD0UNNhjOq_j-a29odzjwUwYFTGfvqbi4dY,23
49
- vivarium_public_health-3.0.2.dist-info/RECORD,,
45
+ vivarium_public_health-3.0.3.dist-info/LICENSE.txt,sha256=mN4bNLUQNcN9njYRc_3jCZkfPySVpmM6MRps104FxA4,1548
46
+ vivarium_public_health-3.0.3.dist-info/METADATA,sha256=gkZN4BNaL61XIp1c3TLatmgAEUWE9myE94R7BpLb1_o,4061
47
+ vivarium_public_health-3.0.3.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
48
+ vivarium_public_health-3.0.3.dist-info/top_level.txt,sha256=VVInlpzCFD0UNNhjOq_j-a29odzjwUwYFTGfvqbi4dY,23
49
+ vivarium_public_health-3.0.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (73.0.0)
2
+ Generator: setuptools (73.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5