-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
|
||
*************************************************************************** | ||
* This is "do CovidVisualizedGlobal master.do" | ||
******************* | ||
* Project: Combine and visualize international periodically updating * uptake 20210813 * | ||
* estimates of COVID-19 at the global level (CovidVisualizedGlobal) ******************* | ||
* Person: Farshad Pourmalek pourmalek_farshad at yahoo dot com | ||
* Time (initial): 2021-04-14 | ||
*************************************************************************** | ||
|
||
|
||
*************************** | ||
* To change uptake date, find and replace all, 20210813 (old), with 20210813 (new) <<-- <<<--- * change uptake date here * | ||
*************************** | ||
|
||
|
||
|
||
/* | ||
This file "do CovidVisualizedGlobal master.do" was set up to be run from: | ||
|Users|local-user-name|Downloads|CovidVisualizedGlobal-main|202YMMDD|code|master|do CovidVisualizedGlobal master.do | ||
where 2021MMDD is the udpate date, e.g. update 20210813 | ||
If the first run does not go thru due to directory path clash, edit the contents within " " of the line _59_ or _62_ below, located beneath ****** set path based on local operating system ****** ,,, | ||
,,, to reflect the location of directory /CovidVisualizedGlobal-main/ or \CovidVisualizedGlobal-main\ on your local machine. Path should be: | ||
global pathCovidVisualizedGlobal "/Users/`usrnam'/Downloads/CovidVisualizedGlobal-main/202YMMDD/code/" [for Mac] | ||
global pathCovidVisualizedGlobal = "C:\Users\\`usrnam'\Downloads\CovidVisualizedGlobal-main\202YMMDD\code\" [for Windows] | ||
It can be moved to and run from anywhere else as far as path requirements are adjusted. | ||
This code was developed and run using Stata SE 14.2 on MacOS Big Sur 11.2.2 (also ran on same flavour of Stata on Windows 10). | ||
*/ | ||
|
||
|
||
|
||
* setup Stata path by operating system | ||
|
||
set more off | ||
|
||
set mem 1000m // for older versions of Stata | ||
|
||
clear all | ||
|
||
dis "`c(username)'" | ||
|
||
local usrnam = "`c(username)'" | ||
|
||
di "`usrnam'" | ||
|
||
****** set path based on local operating system ****** | ||
|
||
if regexm(c(os),"Mac") == 1 { | ||
global pathCovidVisualizedGlobal "/Users/`usrnam'/Downloads/CovidVisualizedGlobal-main/20210813/code/" | ||
} | ||
else if regexm(c(os),"Windows") { | ||
global pathCovidVisualizedGlobal = "C:\Users\\`usrnam'\Downloads\CovidVisualizedGlobal-main\20210813\code\" | ||
} | ||
* | ||
|
||
|
||
cd "$pathCovidVisualizedGlobal" | ||
|
||
cd master | ||
|
||
|
||
|
||
|
||
|
||
* preserve native scheme (of the local machine; will be eventually restored at the end of "do CovidVisualizedGlobal merge.do") | ||
|
||
di c(scheme) | ||
|
||
global nativescheme `c(scheme)' | ||
|
||
di "$nativescheme" | ||
|
||
|
||
|
||
* get grstyle for graphs and its dependencies | ||
|
||
ssc install grstyle, replace | ||
ssc install palettes, replace | ||
ssc install colrspace, replace | ||
|
||
grstyle init | ||
set scheme _GRSTYLE_ | ||
grstyle color background white | ||
|
||
|
||
|
||
|
||
/* | ||
List of component studies: | ||
JOHN | ||
DELP | ||
IHME | ||
IMPE | ||
LANL | ||
SRIV | ||
*/ | ||
|
||
|
||
|
||
|
||
* runs the do files for each study and merge them. | ||
|
||
* IF the target server for a given study is temp down, the respective line can be commented out. Edits would then be needed in merge.do, however. | ||
|
||
|
||
do "$pathCovidVisualizedGlobal/JOHN/do CovidVisualizedGlobal JOHN.do" | ||
|
||
do "$pathCovidVisualizedGlobal/DELP/do CovidVisualizedGlobal DELP.do" | ||
|
||
do "$pathCovidVisualizedGlobal/IHME/do CovidVisualizedGlobal IHME.do" | ||
|
||
do "$pathCovidVisualizedGlobal/IMPE/do CovidVisualizedGlobal IMPE.do" | ||
|
||
do "$pathCovidVisualizedGlobal/LANL/do CovidVisualizedGlobal LANL.do" | ||
|
||
do "$pathCovidVisualizedGlobal/SRIV/do CovidVisualizedGlobal SRIV.do" | ||
|
||
do "$pathCovidVisualizedGlobal/merge/do CovidVisualizedGlobal merge.do" | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|