Skip to content

Scripts to run and update New York Civic Engagement Table analysis

Notifications You must be signed in to change notification settings

lorenaparralanda/nycet-runners

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

New York Civic Engagement Table Analysis: Run Scripts

INSTRUCTIONS

Experiments

May take a few hours to run.

  1. Install Docker
  2. Run Docker on your computer
  3. Open Docker>Preferences>Advanced and change Memory to +15.0GiB and max Swap due to voter file size

To determine experiment results

  1. Add new experiments to the experiments table in the ny database
  2. Update the following files in the src/input folder
    • contact_types.csv
      • list all contact types to include in experiment analysis
    • election_mapping.csv
      • year: year of election
      • election: election name in ny database
      • start: date experiment started
      • end: date experiment ended (normally day of election)
    • org_mapping.csv
      • contact_history: org name as it appears in contacthistory table
      • experiments: org name as it appears in experiments table
  3. Run these commands in a terminal:
    • docker build . -t nycet-exp
    • docker run -t -e PASSWORD=type-password-here nycet-exp

Competitive Districts

  1. Install Docker
  2. Run Docker on your computer

To calculate competitive metrics

  1. Add new results to the electionresults table in the ny database
  2. If new parties are added update maps_pollean table in the ny database
    • party: name of party in electionresults table
    • map: political leaning of party (left, right, or other)
  3. Run these commands in a terminal:
    • docker build . -t nycet-comp
    • docker run -t -e PASSWORD=type-password-here -e FILE_NAME=comp_generator.py nycet-comp

To generate demographic metrics

  1. ?
  2. Run these commands in a terminal:
    • docker build . -t nycet-comp
    • docker run -t -e PASSWORD=type-password-here -e FILE_NAME=demo_generator.py nycet-comp

About

Scripts to run and update New York Civic Engagement Table analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Dockerfile 0.5%