Skip to content

Instructions for California County Local Installation

Michael Samuel edited this page Mar 15, 2019 · 15 revisions
  • Install R onto your local machine

  • Install RStudio onto the same machine

  • Not essential, but very beneficial for collaborating with CDPH CCB Team

    • sign up for [GitHub account] (https://github.com/)
    • install Git on same local machine
    • Fork the CCB GitHub site to your GitHub account
    • set up RStudio to interface with Git/GitHub, following step 2 of the instructions here
    • create a local "0.CBD" project on your machine, following step 3 of those same instructions, except use your repository version (not mcSamuelDataSci) AND use the project name "0.CBD" only
  • If you can not or do not want to use the steps above

    • create a new project folder on your machine named "0.CBD"
    • go to the CCB GitHub site, and use the "clone or download" button to download the project files to your local machine; extract all the folders and files directly into the "0.CBD" folder
  • IF, planning to share local version via internet, sign up for shiny.io account (various pricing including free) or set up local Shiny server ($10K)


LOCAL FILE MODIFICATION AND PROCESSING

  • Get into RStudio by clicking on the file "0.CBD.proj" in your project folder

    • Run /0.CBD/myUpstream/A1.install_packages.R

    • Open /0.CBD/myUpstream/B2.process_California_raw_death_data.R

      • Edit path at "# PROVIDE PATH FOR SECURE DATA HERE" with your own path (Line 21 or close)
      • Edit "myDrive" to be the location (drive/path) of your "0.CBD" project folder (Line 24 or close)
      • Edit variables in "EDIT for Local versus State installation" section (Line 31-33 or close)
        • set state.installation to FALSE
        • set local.installation to TRUE
        • edit "YOUR_DEATH_DATA_FILE_NAME_HERE.csv"
      • Run this file
      • Pray that it works
    • Open /0.CBD/myUpstream/E1. make_death_datasets_for_app.R

      • Edit subSite to TRUE (Line 23 or close)
      • Edit SecureDataFile to be the location/name of your processed secure death data; i.e. yourDrive/yourPath/cbdDat0FULL.R (Line 26 or close)
      • Optionally edit the "criticalNumber" for data suppression (Line 47 or close)
      • Run this file
      • Again, cross your fingers...
  • Open /0.CBD/myCBD/Global.R

    • edit subSite to TRUE (line 34 or close)
    • change the subsite county(s) list "subsiteList" and name subsiteName and as appropriate (Lines 37-38 or close)
    • save all edited files
    • Click "Run App"
    • Thing about something that makes you happy

Cheat List to get Ready for Local Installation:

  • Recent versions R and RStudio installed on a local machine
  • Ability to install needed R packages on that machine (most users in most places appear to be able to load packages if R is loaded, but this may required IT involvement in unusual situations)
  • Access to your county VRBIS data
  • An Excel or .csv file linking census tracts to "community names" IF you want "communities" defined as anything other than MSSA (Medical Service Study Areas)
  • Ability to access GitHub from your environment
  • Ideally, but not necessary, a GitHub account

https://digitaldrummerj.me/git-syncing-fork-with-original-repo/