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

Climate change and health - precipitation and healthcare provision #1485

Draft
wants to merge 287 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
287 commits
Select commit Hold shift + click to select a range
c18c129
removed imports
RachelMurray-Watson Oct 14, 2024
0785843
File for examination of trend between weather and reporting
RachelMurray-Watson Oct 14, 2024
0c077a9
Added labels to graph
RachelMurray-Watson Oct 14, 2024
a25a0fc
Comments for clarity
RachelMurray-Watson Oct 14, 2024
81caf49
Added year as a fixed effect - as reporting goes up over time anyway
RachelMurray-Watson Oct 14, 2024
c53faf2
Included year and month as fixed effects
RachelMurray-Watson Oct 14, 2024
3d88f3b
isort
RachelMurray-Watson Oct 14, 2024
a8ed9c6
Two versions of linear regression - one by facility (year and month a…
RachelMurray-Watson Oct 14, 2024
e5d468b
One-hot encoded the facilities variable for fixed effect
RachelMurray-Watson Oct 14, 2024
7106542
Changed to statsmodel to get summary data
RachelMurray-Watson Oct 14, 2024
0e5e6fc
Added binary predictor of above/below average precipitation for that …
RachelMurray-Watson Oct 14, 2024
ae6a5bc
Added whether in top 80 percentile... But too few observations
RachelMurray-Watson Oct 14, 2024
25be631
Retrieval script for daily (sampled hourly) analysis data. Returns ma…
RachelMurray-Watson Oct 15, 2024
e74ff7c
Request was too large must loop over years
RachelMurray-Watson Oct 15, 2024
5e37b42
Couldn't access the newest dataset (https://cds.climate.copernicus.eu…
RachelMurray-Watson Oct 15, 2024
e51d318
Whitespace
RachelMurray-Watson Oct 15, 2024
0273979
Updated fpr ssp2_4_5
RachelMurray-Watson Oct 15, 2024
dfd6dbf
changed back to the max daily precip (even though it is still not wor…
RachelMurray-Watson Oct 16, 2024
441af24
removed double request for days
RachelMurray-Watson Oct 16, 2024
b86b88e
rename for specificity
RachelMurray-Watson Oct 16, 2024
c5267f3
New file that has finer-grid facilities. Have broad mapping to grids;…
RachelMurray-Watson Oct 16, 2024
ed47a96
Edited to correspond directly to the malawi grid
RachelMurray-Watson Oct 16, 2024
ae81b8a
removed accidental filtering of data
RachelMurray-Watson Oct 16, 2024
2c35964
Updated to include the 2011 data
RachelMurray-Watson Oct 16, 2024
7ca170f
Tidied
RachelMurray-Watson Oct 16, 2024
1ce484f
Added new data for finer grain on facilities
RachelMurray-Watson Oct 16, 2024
618a192
See nothing by DHO
RachelMurray-Watson Oct 16, 2024
a62075d
added district level, but dropped central hospitals
RachelMurray-Watson Oct 16, 2024
2c9c439
ssp245
RachelMurray-Watson Oct 16, 2024
3de67c7
Added accessing of historical grids
RachelMurray-Watson Oct 16, 2024
12eb3c0
Updated to use data from new file that has lat/long for each facility…
RachelMurray-Watson Oct 16, 2024
46193b3
Back to central facilities (not more accurate)
RachelMurray-Watson Oct 16, 2024
aba7ece
Added extra variables, e.g. if rain was above/below a certain thresho…
RachelMurray-Watson Oct 17, 2024
cad17be
tidied
RachelMurray-Watson Oct 17, 2024
89562b2
First stab at aggregating across all of CMIP data. However, not every…
RachelMurray-Watson Oct 17, 2024
2bdfe15
File that collects data from "smaller" facilities (all District/Rural…
RachelMurray-Watson Oct 17, 2024
aa025cd
allowed writing csv
RachelMurray-Watson Oct 17, 2024
3e7c078
Edited to allow for small facilities.
RachelMurray-Watson Oct 17, 2024
fc21fad
notes
RachelMurray-Watson Oct 17, 2024
7b7b561
notes
RachelMurray-Watson Oct 18, 2024
f540d13
Removed the actually facility as a predictor, as it introduced a lot …
RachelMurray-Watson Oct 18, 2024
c636da0
tidied
RachelMurray-Watson Oct 18, 2024
17b7728
Changed to beta regression model - no avail
RachelMurray-Watson Oct 18, 2024
4bccfd2
Kept at 1000mm level
RachelMurray-Watson Oct 18, 2024
bfeed74
Linear model for rain and reporting
RachelMurray-Watson Oct 21, 2024
9df09d2
Accidentally was comparing latitude and longitude
RachelMurray-Watson Oct 21, 2024
bd9a521
Have correct data now... but association is gone
RachelMurray-Watson Oct 21, 2024
19077e8
Added beta model check
RachelMurray-Watson Oct 21, 2024
b57ed49
plotting
RachelMurray-Watson Oct 22, 2024
d0a6bb7
Plots raw reanalysis data against reporting
RachelMurray-Watson Oct 22, 2024
524c9f7
Inlcuded plot of y_pred
RachelMurray-Watson Oct 23, 2024
2a8be78
Plot of reporting vs precip
RachelMurray-Watson Oct 23, 2024
7236ac2
isort
RachelMurray-Watson Oct 24, 2024
7955ebf
file to calculate the 5- day average from the historical ERA5 reanaly…
RachelMurray-Watson Oct 24, 2024
d148786
file to calculate the 5- day average from the historical ERA5 reanaly…
RachelMurray-Watson Oct 25, 2024
83c5414
renamed
RachelMurray-Watson Oct 25, 2024
606be18
added association to facilities based on grid squares
RachelMurray-Watson Oct 25, 2024
1c02b96
changed to remove oct 2024
RachelMurray-Watson Oct 25, 2024
6e54dab
changed so that a seperate file is created if it is using the ANC data
RachelMurray-Watson Oct 25, 2024
1230993
Reduced window to max weather for that month
RachelMurray-Watson Oct 25, 2024
feaa71a
Added check to see if it was ANC data, so then changed how files were…
RachelMurray-Watson Oct 25, 2024
50fc2aa
Added check to see if it was ANC data, so then changed how files were…
RachelMurray-Watson Oct 25, 2024
6c45d2b
Added new weather data writing to account for the fact there are diff…
RachelMurray-Watson Oct 25, 2024
7bef017
Allowed for toggle between ANC/reporting and daily max/monthly
RachelMurray-Watson Oct 25, 2024
0cb6086
made more flexible for going between model scenarios
RachelMurray-Watson Nov 6, 2024
603e96c
Changed to allow for ssp245
RachelMurray-Watson Nov 7, 2024
e0383fa
Changed how data were aggregated (do not need to search over model na…
RachelMurray-Watson Nov 7, 2024
986aa24
Deleted as now part of "process_CMIP6_data"
RachelMurray-Watson Nov 7, 2024
371a078
Redid so no longer need to list the models, only need to look in dire…
RachelMurray-Watson Nov 7, 2024
15f1cac
Added averaging over time points
RachelMurray-Watson Nov 8, 2024
14925e2
isort
RachelMurray-Watson Nov 8, 2024
4098fa7
realized I averaged over all timepoints
RachelMurray-Watson Nov 8, 2024
38e1c1c
Realized for daily precipitation, doing an incorrect conversion. The …
RachelMurray-Watson Nov 8, 2024
c494264
Realized for daily precipitation, doing an incorrect conversion. The …
RachelMurray-Watson Nov 8, 2024
6e235d4
Added plot of projected rain by grid point
RachelMurray-Watson Nov 8, 2024
dead8bf
Changed 86400 as the mulitplier to depend on what data source is bein…
RachelMurray-Watson Nov 8, 2024
00f5317
Changed to collect daily totals, not daily maximums
RachelMurray-Watson Nov 11, 2024
a83bf90
Added in median and 25/75 percentiles
RachelMurray-Watson Nov 11, 2024
1980632
added in multiplier variable
RachelMurray-Watson Nov 11, 2024
96ee2ef
intorduced mask level variable
RachelMurray-Watson Nov 11, 2024
d7b20b4
intorduced mask level variable
RachelMurray-Watson Nov 11, 2024
53dd04a
Plot for median and IQR (needs improving for legibility)
RachelMurray-Watson Nov 11, 2024
eaf3ec5
removed multiplier from reporting (?)
RachelMurray-Watson Nov 11, 2024
1e5d464
File for processing the ERA5 historical reanalysis data for daily tot…
RachelMurray-Watson Nov 12, 2024
5597d4d
Added in daily total data
RachelMurray-Watson Nov 12, 2024
40a10ca
Added in changes for five day and/or cumulative sum
RachelMurray-Watson Nov 12, 2024
f71b7d7
Did all time points
RachelMurray-Watson Nov 12, 2024
a317df1
Changed to allow for fact that data was hourly, so need to add up ove…
RachelMurray-Watson Nov 12, 2024
8c2d12b
Removed unnecessary repeat
RachelMurray-Watson Nov 12, 2024
1af6a22
Added in code to load 5 day cumulative
RachelMurray-Watson Nov 12, 2024
fc5b4b5
Data to put CMIP6 models on the Malawi grid
RachelMurray-Watson Nov 12, 2024
54fbd7a
Plot individual grids
RachelMurray-Watson Nov 12, 2024
94abde8
Added model to generate new y data set. Residuals of model without th…
RachelMurray-Watson Nov 12, 2024
a24a8e4
Reordered code for clarity.
RachelMurray-Watson Nov 12, 2024
41904f2
Added in if else if not doing 5 day
RachelMurray-Watson Nov 13, 2024
a6410d9
Added in function for stepwise selection
RachelMurray-Watson Nov 13, 2024
aef2d35
changed file name
RachelMurray-Watson Nov 13, 2024
37d0f92
exclude some outliers
RachelMurray-Watson Nov 13, 2024
0a764da
have somehow lost significant relationship...
RachelMurray-Watson Nov 13, 2024
f45f5a6
Checked "all" model and find the R2 is better
RachelMurray-Watson Nov 13, 2024
b5955f7
File for using the picked models and predicting the shortfall in ANC …
RachelMurray-Watson Nov 14, 2024
f462a07
Used ANC data and daily totals for 5-day cumulative.
RachelMurray-Watson Nov 14, 2024
c3a993c
Added loop to create monthly and 5-day cumulatve data. Needs tidying.
RachelMurray-Watson Nov 14, 2024
1a15b5a
Soft reset
RachelMurray-Watson Jan 3, 2025
674bf96
Added in facilities to map
RachelMurray-Watson Jan 3, 2025
20331e4
Added calculation of average precipitation
RachelMurray-Watson Jan 3, 2025
6b10869
Coloured dots of clinics by average annual precipitation
RachelMurray-Watson Jan 3, 2025
dba70c8
removed facilities
RachelMurray-Watson Jan 3, 2025
9654cc3
removed facilities legend
RachelMurray-Watson Jan 3, 2025
baf9038
isort
RachelMurray-Watson Jan 3, 2025
8018c8f
Put era5 and CMIP6 on same graph
RachelMurray-Watson Jan 6, 2025
7bbf91a
Added loop for going over each scenario of the CMIP6 and then the med…
RachelMurray-Watson Jan 6, 2025
0e7f0c1
tidied function
RachelMurray-Watson Jan 6, 2025
0d7402a
Saved model prediction coefficients
RachelMurray-Watson Jan 6, 2025
8b83ff9
added p value and coefficient names to saving
RachelMurray-Watson Jan 6, 2025
3112713
file for accessing CIL downscaled data
RachelMurray-Watson Jan 7, 2025
9278314
Did piecewise downloading of downscaled data (as kept getting nan)
RachelMurray-Watson Jan 7, 2025
39af21e
Changed params
RachelMurray-Watson Jan 7, 2025
ac9d1d1
Removed the scaling
RachelMurray-Watson Jan 7, 2025
fd5c98b
Rename
RachelMurray-Watson Jan 7, 2025
1d398ee
Run kdball
RachelMurray-Watson Jan 7, 2025
ffa6846
Have quicker processing of downscaled data
RachelMurray-Watson Jan 8, 2025
3fed2c4
Changed naming
RachelMurray-Watson Jan 8, 2025
75777bc
Changed data to access the files where data was missing
RachelMurray-Watson Jan 9, 2025
c545685
Changed data to access the files where data was missing
RachelMurray-Watson Jan 9, 2025
572a54a
Undid hash out
RachelMurray-Watson Jan 9, 2025
26b613f
Large files
RachelMurray-Watson Jan 9, 2025
4591b07
Stops saving large files
RachelMurray-Watson Jan 9, 2025
20171b8
Added district
RachelMurray-Watson Jan 9, 2025
d5f2e30
Found Blantyre was mispelled as "Blanytyre"
RachelMurray-Watson Jan 9, 2025
48422c7
Added district
RachelMurray-Watson Jan 9, 2025
ae22229
"Contents are identical"
RachelMurray-Watson Jan 9, 2025
a65f099
Added map showing projected decrease (%) by district of ANC cases (fo…
RachelMurray-Watson Jan 9, 2025
0016678
Added map showing projected decrease (%) by district of ANC cases (fo…
RachelMurray-Watson Jan 9, 2025
3c687ac
Python file for calculating and plotting the projected disruptions in…
RachelMurray-Watson Jan 9, 2025
7d49812
Added plot of them all
RachelMurray-Watson Jan 9, 2025
87fdc85
Readded scaling
RachelMurray-Watson Jan 10, 2025
34110a1
Rmoved if log y as y will always be logged
RachelMurray-Watson Jan 10, 2025
26c2521
Rmoved use residuals as changed that analysis
RachelMurray-Watson Jan 10, 2025
2b2d028
The standard scaler introduces very weird results (esp. for the Dedza…
RachelMurray-Watson Jan 10, 2025
3096b0f
Removing the facilities reduces R^2 but also increases significance o…
RachelMurray-Watson Jan 10, 2025
91dacec
Tried PCA... Made worse
RachelMurray-Watson Jan 10, 2025
706f404
Tried PCA... Made worse, but all predictors did have significant coef…
RachelMurray-Watson Jan 10, 2025
d3e4aae
Actually, it was the imputer that made it work
RachelMurray-Watson Jan 10, 2025
0e5c0c7
Not even, it was a mistake...
RachelMurray-Watson Jan 10, 2025
0c85041
Removed PCA
RachelMurray-Watson Jan 10, 2025
e6f38f9
Testing statistically significant results
RachelMurray-Watson Jan 10, 2025
345e545
Tidy
RachelMurray-Watson Jan 10, 2025
940967f
Tidy
RachelMurray-Watson Jan 10, 2025
f9b5ff3
Correlation matrix - removing ftype and district reduced multicolline…
RachelMurray-Watson Jan 13, 2025
d9d0959
Correlation matrix - removing ftype and district reduced multicolline…
RachelMurray-Watson Jan 13, 2025
07efa88
Reordered naming of predictors for saving results
RachelMurray-Watson Jan 13, 2025
2881fac
Identical
RachelMurray-Watson Jan 13, 2025
4ad5234
Fixed up graphs and edited to make 5-year groupings
RachelMurray-Watson Jan 13, 2025
4a1567c
Undid hashing out
RachelMurray-Watson Jan 14, 2025
86878eb
Tidied
RachelMurray-Watson Jan 14, 2025
1fd422d
Added calculation based on the % in each district.
RachelMurray-Watson Jan 15, 2025
765a14e
Added in ssp126
RachelMurray-Watson Jan 15, 2025
bb9bb8a
Unneccessary
RachelMurray-Watson Jan 15, 2025
fbd064a
added 126
RachelMurray-Watson Jan 15, 2025
e39a404
Was using %, not proption... daft
RachelMurray-Watson Jan 15, 2025
f7a7044
Identical
RachelMurray-Watson Jan 15, 2025
36cb131
Changed median to mean
RachelMurray-Watson Jan 15, 2025
58b4f7b
Added conversion factor of births to pregnancies (1.4)
RachelMurray-Watson Jan 16, 2025
bba3ea4
Added ssp126
RachelMurray-Watson Jan 16, 2025
e25ea80
Changed median to mean
RachelMurray-Watson Jan 16, 2025
1605f46
Ensured that the cumulative numbers were also pregnancies.
RachelMurray-Watson Jan 16, 2025
c580b59
tidied
RachelMurray-Watson Jan 16, 2025
e4ff762
Added map of historical weather
RachelMurray-Watson Jan 16, 2025
a582531
Updated to aggregate over all years, and ensure that only the negativ…
RachelMurray-Watson Jan 17, 2025
2888408
Updated to aggregate over all years, and ensure that only the negativ…
RachelMurray-Watson Jan 17, 2025
f4b48ec
Added in calculation of cases disrupted due to precip in top 10%
RachelMurray-Watson Jan 17, 2025
ab553d2
graph aesthetics
RachelMurray-Watson Jan 17, 2025
f107e03
typo
RachelMurray-Watson Jan 17, 2025
366041e
mask for covid months caused issues with indexing
RachelMurray-Watson Jan 17, 2025
f681d4a
map of historical disruptions
RachelMurray-Watson Jan 17, 2025
a2bce9b
Changed so that all heatmaps were on the same scale for comparison
RachelMurray-Watson Jan 17, 2025
3593e43
Changed so that the threshold for historical precip is 90th percentil…
RachelMurray-Watson Jan 20, 2025
08df36b
Changed to be overall percent affected due to extreme climate events,…
RachelMurray-Watson Jan 20, 2025
043e678
Annual summary of precip by model for scenario
RachelMurray-Watson Jan 21, 2025
93d0938
Added column
RachelMurray-Watson Jan 21, 2025
c70555d
Added plot of all models over years
RachelMurray-Watson Jan 21, 2025
496c1f9
Ensured now from 2024
RachelMurray-Watson Jan 22, 2025
c5b910a
Joint graph of historical and future precip
RachelMurray-Watson Jan 22, 2025
132aa8f
aesthetics
RachelMurray-Watson Jan 23, 2025
b31f80e
Made model slection not based on p value
RachelMurray-Watson Jan 23, 2025
23b389d
Made clearer which coefficients were included
RachelMurray-Watson Jan 23, 2025
5b9d95d
Added annual and monthly precipitation for clinics
RachelMurray-Watson Jan 24, 2025
f77998d
Added average historical disruption
RachelMurray-Watson Jan 24, 2025
f491e1c
Fixed the axes
RachelMurray-Watson Jan 28, 2025
b89531f
Fixed the saving
RachelMurray-Watson Jan 28, 2025
b0f681d
Added difference between models
RachelMurray-Watson Jan 29, 2025
cf65725
changed axis label
RachelMurray-Watson Jan 29, 2025
5a2c12b
changed axis label
RachelMurray-Watson Jan 29, 2025
8fe4624
added squares
RachelMurray-Watson Jan 30, 2025
df7e88c
added squares
RachelMurray-Watson Jan 31, 2025
9486b66
Added inpatient data
RachelMurray-Watson Jan 31, 2025
92e604f
Made more cohesive for inpatient data
RachelMurray-Watson Jan 31, 2025
4676198
Removed x mask from build model as it was getting it wrong when doing…
RachelMurray-Watson Feb 3, 2025
7ecc023
Added in Inpatient services
RachelMurray-Watson Feb 3, 2025
34493af
Different percentiles
RachelMurray-Watson Feb 3, 2025
085c867
Added in felxibility for changing between services
RachelMurray-Watson Feb 3, 2025
964d3fa
Added in felxibility for changing between services
RachelMurray-Watson Feb 4, 2025
93f231c
Graphs for inpatient days. Could not use cohort model as that was for…
RachelMurray-Watson Feb 4, 2025
d447f75
Added plot of past vs future precipitation
RachelMurray-Watson Feb 4, 2025
0e21aba
Inpatient
RachelMurray-Watson Feb 11, 2025
1454d48
Added graph of difference
RachelMurray-Watson Feb 11, 2025
24d8259
Add in calculation of total historical disruptions
RachelMurray-Watson Feb 12, 2025
8013b7d
Added Lake Malawi
RachelMurray-Watson Feb 12, 2025
ea08aaf
Added Lake Malawi
RachelMurray-Watson Feb 12, 2025
5d867c1
Add in LR test
RachelMurray-Watson Feb 13, 2025
249d5c9
Added in summary based on zone
RachelMurray-Watson Feb 14, 2025
73e6805
format
RachelMurray-Watson Feb 14, 2025
c97a49c
added new years
RachelMurray-Watson Feb 14, 2025
11aef2a
added new years
RachelMurray-Watson Feb 14, 2025
e29b688
extracted years to compare with Cyclone Freddy paper
RachelMurray-Watson Feb 14, 2025
5a6203a
Added processing and saving of pre-2000 data
RachelMurray-Watson Feb 17, 2025
8c08a8d
Added processing and saving of pre-2000 data
RachelMurray-Watson Feb 17, 2025
49470a1
Added retrieval of baseline data
RachelMurray-Watson Feb 17, 2025
7df6eb3
Added in processing of baseline data (from ERA5, earliest is 1940)
RachelMurray-Watson Feb 17, 2025
a239922
Typo
RachelMurray-Watson Feb 17, 2025
652afe7
Baseline data from 1940 - 1980
RachelMurray-Watson Feb 17, 2025
1b3f4d2
Fixed indentation errors etc
RachelMurray-Watson Feb 17, 2025
855443a
did cumulative
RachelMurray-Watson Feb 17, 2025
c855e69
Added in historical data
RachelMurray-Watson Feb 17, 2025
3358189
Removed loop for lags, was throwing errors
RachelMurray-Watson Feb 17, 2025
b4ace7a
typo
RachelMurray-Watson Feb 18, 2025
479028e
plotting precipiation for baseline years (1940 - 1980)
RachelMurray-Watson Feb 18, 2025
4349c6f
Added baseline graph of 1940 - 1980
RachelMurray-Watson Feb 18, 2025
7e3718f
tidy
RachelMurray-Watson Feb 18, 2025
cb8f077
allowed saving of expanded info for baseline - the average precip wil…
RachelMurray-Watson Feb 18, 2025
1d3298d
tidied and then transported year
RachelMurray-Watson Feb 18, 2025
1303222
tidied and then transported year
RachelMurray-Watson Feb 18, 2025
1ec86a5
made it so the "year" for the baseline analysis was 2012 - 2024
RachelMurray-Watson Feb 19, 2025
757ebb5
made it so the "year" for the baseline analysis was 2012 - 2024
RachelMurray-Watson Feb 19, 2025
362a972
changed average precipitation for the baseline scenario to be 1941-1953
RachelMurray-Watson Feb 19, 2025
2566b9d
changed average precipitation for the baseline scenario to be 1941-1953
RachelMurray-Watson Feb 19, 2025
e4f2ee0
tidied graphs
RachelMurray-Watson Feb 19, 2025
a287448
Updated years to be the same length
RachelMurray-Watson Feb 24, 2025
73a56ad
Added legend for difference graph
RachelMurray-Watson Feb 26, 2025
620e0a5
Added mean difference etc to graphs
RachelMurray-Watson Feb 26, 2025
9d4e13e
Fixed slicing
RachelMurray-Watson Feb 26, 2025
a61a711
increase dpi
RachelMurray-Watson Feb 26, 2025
d0dd96e
Tidy
RachelMurray-Watson Feb 26, 2025
0f8a2ff
Tidy
RachelMurray-Watson Feb 27, 2025
06b8f72
So, from https://dhsprogram.com/publications/publication-fr319-dhs-fi…
RachelMurray-Watson Feb 27, 2025
b600f67
So, from https://dhsprogram.com/publications/publication-fr319-dhs-fi…
RachelMurray-Watson Feb 27, 2025
93a9d6f
isort
RachelMurray-Watson Feb 27, 2025
ea6c763
Tidied so getting conversion happens up top
RachelMurray-Watson Feb 27, 2025
2035e3a
Plot to see the difference in precipitation between 1940-1950 and 201…
RachelMurray-Watson Feb 28, 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
Prev Previous commit
Next Next commit
tidied
  • Loading branch information
RachelMurray-Watson committed Oct 18, 2024
commit c636da014173e05b257914eb482517eea7a082d3
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ def create_binary_feature(threshold, weather_data_df, recent_months):
above_below_average = create_binary_feature(
grouped_data.groupby(['facility', 'month'])['weather_data'].transform('mean'), weather_data_historical, 0
)
above_below_X = create_binary_feature(800, weather_data_historical, 12)
above_below_X = create_binary_feature(1000, weather_data_historical, 12)

# Prepare additional facility info
expanded_facility_info = pd.read_csv("/Users/rem76/Desktop/Climate_change_health/Data/expanded_facility_info_by_smaller_facility_lm.csv", index_col=0)
@@ -92,7 +92,7 @@ def repeat_info(info, num_facilities, year_range):
year_flattened,
month_flattened,
above_below_average,
above_below_X,
#above_below_X,
#facility_encoded,
resid_encoded,
zone_encoded,
@@ -103,9 +103,9 @@ def repeat_info(info, num_facilities, year_range):

#scaler = StandardScaler() # as weather is at such different levels
#X_scaled = scaler.fit_transform(X)
results = build_model(X, y, scale_y=False, binomial=False, X_mask_mm = 0)
results = build_model(X, y, scale_y=False, binomial=False, X_mask_mm = 800)
print(results.summary())

results = build_model(X, y, X_mask_mm = 0)
results = build_model(X, y, X_mask_mm = 800)

print(results.summary())
Original file line number Diff line number Diff line change
@@ -109,9 +109,6 @@
monthly_reporting_by_facility = monthly_reporting_by_facility.loc[:, monthly_reporting_by_facility.columns.isin(facilities_with_location)]
monthly_reporting_by_facility = monthly_reporting_by_facility[facilities_with_location]

print(len(facilities_with_location))
print(len(monthly_reporting_by_facility.columns))
print(len(weather_df.columns))
monthly_reporting_by_facility.to_csv("/Users/rem76/Desktop/Climate_change_health/Data/monthly_reporting_by_smaller_facility_lm.csv")
weather_df.to_csv("/Users/rem76/Desktop/Climate_change_health/Data/historical_weather_by_smaller_facility_lm.csv")

@@ -120,7 +117,7 @@
facilities_with_lat_long["Fname"].isin(facilities_with_location)
]

additional_rows = ["Zonename", "Resid", "A105", "A109__Altitude"]
additional_rows = ["Zonename", "Resid", "A105", "A109__Altitude", "Ftype"]
expanded_facility_info = included_facilities_with_lat_long[["Fname"] + additional_rows]

expanded_facility_info.columns = ["Fname"] + additional_rows
Loading