Hotspotr

build status

Hotspotr is an example of distance-based mapping in R

Hotspot Map

To get started with building your own maps, just clone the repository with: git clone https://gitlab.com/jzelner/hotspotr.

To make sure everything works, first run ./install.R to make sure all of the required packages are installed. Then run make map from within the hotspotr directory. If everything works, there should be an example map at output/hotspot_map.jpg that looks like the one on this page. If you want to see how hotspotr performs on different kinds of maps, change the parameters in src/test_data.R and re-run make map.

To start making maps with your own data, you’ll need a CSV file with three columns: x & y, giving the coordinates of your data points and case, containing binary indicators for case vs. control status (case = 1, control = 0).

Then create a YAML file like this one either within or outside of the hotspotr folder:

mapdata: output/data/maptest.csv
outdir: output
cellwidth: 0.01
p: 0.1
circlen: 10
mapname: hotspot_map.jpg

For a template, see the test_parameters.yml file within the hotspotr folder.

Finally, when you’re all set to create some maps, run ./make_map <yourparameters.yml> from the command line, where <yourparameters.yml> is the name of your input parameters file.