Giter Site home page Giter Site logo

mpjashby / crimemapping Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 1.0 94.46 MB

Tutorials for crime mapping in R

Home Page: http://books.lesscrime.info/learncrimemapping/

License: Creative Commons Attribution 4.0 International

R 16.38% CSS 40.26% HTML 43.36%
cartography crime-analysis crime-map mapping r

crimemapping's People

Contributors

mpjashby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

crimemapping's Issues

Release tutorials 6 and 7

  • Add questions
  • Add further reading
  • Add concluding message with thumbs up emoji
  • Reduce image sizes using harmonise_image_sizes()
  • Spell check
  • Check all code in RStudio Server

Release tutorials 10 and 11

  • Add questions
  • Add further reading
  • Add concluding message with thumbs up emoji
  • Reduce image sizes using harmonise_image_sizes()
  • Spell check
  • Increment package version number
  • Check all code in RStudio Server
  • Update Moodle

Release tutorials 14 and 15

  • Add questions
  • Add further reading
  • Add concluding message with thumbs up emoji
  • Reduce image sizes using harmonise_image_sizes()
  • Spell check
  • Increment package version number
  • Check all code in RStudio Server
  • Update Moodle

Explain the function sequence st_transform() |> st_buffer() |> st_transform()

At:

You don't need to understand what each of these R functions does โ€“ we will cover
them all in a future tutorial.
```{r exercise6, exercise=TRUE, exercise.setup = "exercise5-setup", exercise.lines=13}
# Define the area included in the map, based on a 500m buffer around the data
map_boundary <- homicides %>%
st_bbox() %>%
st_as_sfc() %>%
st_as_sf() %>%
st_transform(26967) %>%
st_buffer(500 * 3.3) %>%
st_transform(4326) %>%

the tutorial tells students this will be explained later, but it doesn't appear to be actually explained anywhere. A possible answer is in this answer to a question on Moodle.

Minimise size of images used in tutorials

Possibly resize full-width cartoons to 800px width at 150dpi and hex stickers to 150px at 150dpi. Remember to add max-width to the corresponding CSS so that images are not scaled too large.

Release tutorials 12 and 13

  • Add questions
  • Add further reading
  • Add concluding message with thumbs up emoji
  • Reduce image sizes using harmonise_image_sizes()
  • Spell check
  • Increment package version number
  • Check all code in RStudio Server
  • Update Moodle

Provide a more-detailed explanation of what EPSG codes are

Mention that an EPSG code is a way to reference an entry in a database of ways to translate numbers to points on the earth. Give examples like 'EPSG 27700 tells R that co-ordinates reference points on the earth in terms of how many metres they are north and east of a point in the Atlantic Ocean' vs [something else].

Add cartography package to area mapping tutorial

The tutorial 'Mapping area data' currently uses the tmap package for static choropleth maps. These would be better done with the cartography package because it allows inclusion of base maps on static choropleth maps. Keep using tmap as a wrapper around leaflet for dynamic maps.

Remove section on geographic profiling

It's not possible to do justice to geographic profiling justice in the time available and this is a case where a little knowledge could well be dangerous, so remove this content.

Release tutorials 1, 2 and 3

  • Add questions
  • Add further reading
  • Add concluding message with thumbs up emoji
  • Reduce image sizes
  • Spell check
  • Check all code in RStudio Server

Release tutorial 16

  • Add questions
  • Add further reading
  • Add concluding message with thumbs up emoji
  • Reduce image sizes using harmonise_image_sizes()
  • Spell check
  • Increment package version number
  • Check all code in RStudio Server
  • Update Moodle

Release tutorials 4 and 5

  • Add questions
  • Add further reading
  • Add concluding message with thumbs up emoji
  • Reduce image sizes using harmonise_image_sizes()
  • Spell check
  • Check all code in RStudio Server

Add section on when to use a table and when to use a chart

Tables are generally better when readers need to know exact values for variables, or when you need to present several quantities for each unit of analysis. Charts are better at showing patterns or differences. A chart accompanied by an appendix table can be the best of both worlds.

Add note to leave a blank line before/after each Rmarkdown chunk

Students are still not doing this, which means:

  • it's harder to see where one chunk starts/finishes, which has led some students to end up with un-finished chunks, and
  • students often end up with text starting on the same line as a figure sits, rather than on a new line below.

Add section on harm weighting

At the moment, when asked to choose crime types for police to focus on, many (most?) students simply choose the most frequent. Add a section to explain on what basis you can choose to prioritise different types of crime, including joining harm weights to crime counts and then producing a harm-weighted bar chart.

Add box with 10 R functions never to use

For example, base::attach().

In each case, explain why students shouldn't use it.

This should probably go in the tutorial on handling errors, since the reason the functions should not be used will typically because they make code (or coders) more prone to errors.

Add serial murder data

This needs to be carefully chosen to minimise the risk that anyone taking the course might be distressed because they know someone involved (this has happened to me before). It needs a travelling offender. Only the necessary details of the crimes should be included and no details of the offender.

Possibly using the canal murders around Frankfurt between 1976 and 1983. Use data from the Wikipedia page (the German and English pages are virtually identical, but both have exact dates and locations) plus this record of some newspaper research done (translated from DE to EN) to confirm some of the locations.

Release tutorials 8 and 9

  • Add questions
  • Add further reading
  • Add concluding message with thumbs up emoji
  • Reduce image sizes using harmonise_image_sizes()
  • Spell check
  • Check all code in RStudio Server
  • Update Moodle

Warn about interpreting correlations visually

In some of their assessments, students have claimed 'strong relationships' or similar between variables based on a scatter plot, even when there is little or no actual relationship. Add a note to the section on scatter plots to warn students not to attempt to judge relationships visually.

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.