Giter Club home page Giter Club logo

international-crime-stats's Introduction

title author date output
README
Peter Ellis and Kay Fisher
3 January 2017
html_document

International Crime Statistics

This project is for comparative analysis of international statistics on crime. It examines country-level data on homicide, assault, suicide; in the light of other variables such as Gross National Income, Human Development Index, economic inequality, and civilian firearm ownership.

suicide

Using this repository

This project has a GPL-3 license.

The ./integrate.R script acts a bit like a make file. It creates all datasets from original source data, and performs all analysis and documentation that produce persistent artefacts. Any new analysis or data should be created with their own individual scripts which are then called with source() from integrate.R.

This README file is an README.md markdown file that is built from README.Rmd which is an Rmarkdown document. Don't edit the .md file directly - edit the README.Rmd file and rebuild it (with the knit() command in integrate.R).

data

The ./data/ folder contains only final, cleaned and concorded analysis-ready data sets, in either rda or csv format.

  • .rda files should have a single data frame, with the same name as the *.rda file itself.
  • Data that is a cross-sectional snapshot should have that reflected in the data.frame's name eg indicators2005.
  • hand-curated small datasets (eg concordances like conc_iso3166.csv) are ok but should be in csv format for easy tracking by Git and editing by a text editor or Excel.

raw_data

The ./raw_data/ folder contains only untouched downloaded data. Generally this should have been programmatically downloaded by one of the scripts in ./grooming/ but in some cases they might have been downloaded by hand.

grooming

The ./grooming/ folder contains scripts that download data (and in some cases save it to the ./raw_data/ folder), tidies, cleans and concords it and saves it in the ./data/ folder.

analysis

The ./analysis/ folder contains scripts that perform analysis. These can be R or .Rmd scripts

doc

The `./doc/ folder contains .Rmd and HTML files with documentation.

See also the project issues and project Wiki.

Some of the documents in the Wiki are generated by code in the main repository. For the integrate.R script to work properly you will need a clone of the Wiki at the location ../international-crime-stats.wiki.

R chunks in .Rmd files need to be named if they produce images eg they should look like this in the line that starts the chunk, where i2005ch1 is a unique document-chunk combination: ````{r i2005ch1, results = 'asis'}`

This is because all .Rmd files have their .md versions storing their .png images in the same folder, /figure/. This is something to always look out for in a project that has multiple .Rmd files. Note that the integrate.R script copies over all files in the /figure/ folder from the main repository over to your local clone of the Wiki's repository.

images

The ./images/ folder holds images (typically analysis output) that is used in common across the project - for example analytical outputs.

Other dependencies

There are a few slightly non-standard R dependencies.

Webshot and phantomjs

library(webshot)
webshot::install_phantomjs()

Tabulizer

See the small arms survey download script.

international-crime-stats's People

Contributors

ellisp avatar kayfisher avatar

Watchers

James Cloos avatar  avatar  avatar

international-crime-stats's Issues

Small Arms Survey 2007 data issues

The Small Arms Survey 2007, chapter 2 has an Annex with national level data. It includes three columns which should be consistent:

  • Population 2005
  • Total firearms
  • Firearms per 100 people

But they are not. Problems include:

  • Some of the population numbers are very wrong.
  • Some of the "Firearms per 100 people" numbers aren't equal to TotalFirearms / Population * 100, with either the original Population numbers and/or the corrected ones

We wrote to the publishers on 1 January 2017 asking for a response, noting we intend to blog about the data in a week or so.

relevant literature

Income_Inequality_Unemployment_and_Suicide_A_Panel_Data_Analysis_of_15_European_Countries
https://www.researchgate.net/publication/24075635_Income_Inequality_Unemployment_and_Suicide_A_Panel_Data_Analysis_of_15_European_Countries

economic determinants of suicide rates
http://oldweb.sbc.edu/sites/default/files/Honors/CRoden.pdf

IS THE EFFECT OF INCOME ON THE SUICIDE RATE ALWAYS NEGATIVE? A TEST OF BARNES’ THEORY
http://www.diva-portal.org/smash/get/diva2:686081/FULLTEXT01.pdf

Relationship of suicide rates to economic variables in Europe: 2000-2011
http://bjp.rcpsych.org/content/205/6/486

NZ research docs from early 2000s on suicide rates (there are others that are not linked here)
suicideratesinnewzealand.docx
suicidetrendsandsocialfactors.docx
explainingpatternsofsuicide.pdf

develop theory of structural economic factors explaining suicide and homicide rates

high homicide rates in middle income countries could be explained by these countries being a process of disruptive social transition - alongside high inequality. expressed in more violence against others, crime etc

high suicide rates in high income countries with relatively low inequality could be explained by socially disruptive structural and competitive factors being internalised into self-blaming, anxiety, depression among groups of people (eg young people, structurally unemployed blue collar workers or farmers) who are not meeting their (socially derived) expectations of themselves. eg could include factors explored in fertility research eg education by gender, proxies like marriage

need to investigate/theorise on what kind of relationship these factors have in low income, high inequality countries...

Add HDI

human development index - probably availalbe from WDI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.