Coder Social home page Coder Social logo

snt's Introduction

snt

Codes for malaria analysis

Maintainer: Spencer [email protected]

Get started

The code is written in R, to access the package, please use devtools to install.

Install the devtools library if not.

install.packages("devtools")
devtools::install_github("sepmein/snt")

Functions

Get multiple files

Raster file extraction

snt's People

Contributors

sepmein avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

snt's Issues

Template for projects

When creating a new projects, it could be quite normal to copy paste codes from other projects.

These codes include comments to refine R code structure, codes to extract rainfall, population or other raster data.

Code templates could let us get started much faster.

Add Color Scheme in the project

When generating maps for SNT analysis, maps are often needed to be presented. We often need to present a combination of interventions through colors.

In R, there are a few packages and function allow us to generate colors.

Show provinces in the map

ADM1 boundary currently do not show in the map. Need to load from shapefile. If no shapefile provided by country, need to calculate from ADM2 districts.
@sepmein

Correlation test of two sets of databases

When comparing the set of data frame, a correlation test was needed to check the correlations between two datasets.

There are a few algorithm built in R or available from other packages. I need to

  1. identifies the nice packages
  2. pick some data columns for example from routine database, e.g. conf, test...
  3. created plot function

Create a line graph with ggplot2

Create a universal line graph that could be used to display various information such as rainfall, prevalence, mortality.

  • Use ggplot2 facets to display multiple graphs.
  • Try to add LCI and UCI with shades into the graphs.

Update rainfall importation codes

After the extraction of rainfall raster file, I need to manually extract year and month from the filename as follows.

resource_rainfall_adm2$data |>
    mutate(
        year = stringr::str_extract(file, "\\d{4}"),
        month = stringr::str_extract(file, "\\d{2}(?=.tif)")
    ) 

So I need to manually do it every time I need to extract file.

The better way is to incorporate this codes inside the Rainfall resource class.

Parallel execution for raster resource

In the main.R RasterResource load_single_folder function, I'm now using normal for function for the loop, it is slow and not using cpu. To speed up execution, should introduce parallel execution.

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.