Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mass Shooting Dataset

    In case anyone's interested in the depressing science of Mass Shootings in the United States, here's some code which grabs a dataset compiled here. Use it, if you'd wish.
    Code:
    cap program drop gsheet
    program define gsheet
        syntax anything , key(string) id(string)
        
        local url "https://docs.google.com/spreadsheets/d/`key'/export?gid=`id'&format=csv"
        
        copy "`url'" `anything', replace
        
        noi disp `"saved in `anything'"'
        
        import delim using `anything', clear bindquote(strict)
    end
    
    cls
    
    gsheet "`c(pwd)'\\test.csv" , key("1b9o6uDO18sLxBqPwl_Gh9bnhW-ev_dABH83M5Vb5L8o") id("0")
    
    erase test.csv
    
    br

    NOTE: The gsheet program belongs to JanDitzen who wrote this first
    Last edited by Jared Greathouse; 25 May 2022, 10:14.

  • #2
    Clearly off topic here, just to perk up after the terrible content of the well compiled dataset that Jared mentioned: those interested in visiting Italy may want to include Bolzano/Bozen (mit umlaut for those who are German mother tongue, like many in that part of Italy), a nice town near the Austrian border with an outstanding university where JanDitzen works.
    Last edited by Carlo Lazzaro; 25 May 2022, 11:00.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment

    Working...
    X