diff --git a/.gitignore b/.gitignore index a741b43..06b0313 100644 --- a/.gitignore +++ b/.gitignore @@ -19,23 +19,18 @@ pip-selfcheck.json Thumbs.db ehthumbs.db ehthumbs_vista.db - # Dump file *.stackdump - # Folder config file [Dd]esktop.ini - # Recycle Bin used on file shares $RECYCLE.BIN/ - # Windows Installer files *.cab *.msi *.msix *.msm *.msp - # Windows shortcuts *.lnk ### Python template @@ -43,10 +38,8 @@ $RECYCLE.BIN/ __pycache__/ *.py[cod] *$py.class - # C extensions *.so - # Distribution / packaging .Python build/ @@ -65,17 +58,14 @@ wheels/ .installed.cfg *.egg MANIFEST - # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec - # Installer logs pip-log.txt pip-delete-this-directory.txt - # Unit test / coverage reports htmlcov/ .tox/ @@ -87,41 +77,30 @@ coverage.xml *.cover .hypothesis/ .pytest_cache/ - # Translations *.mo *.pot - # Django stuff: *.log local_settings.py db.sqlite3 - # Flask stuff: instance/ .webassets-cache - # Scrapy stuff: .scrapy - # Sphinx documentation docs/_build/ - # PyBuilder target/ - # Jupyter Notebook .ipynb_checkpoints - # pyenv .python-version - # celery beat schedule file celerybeat-schedule - # SageMath parsed files *.sage.py - # Environments .env .venv @@ -130,17 +109,13 @@ venv/ ENV/ env.bak/ venv.bak/ - # Spyder project settings .spyderproject .spyproject - # Rope project settings .ropeproject - # mkdocs documentation /site - # mypy .mypy_cache/ ### VisualStudioCode template @@ -152,19 +127,16 @@ venv.bak/ ### Vagrant template # General .vagrant/ - # Log files (if you are creating logs in debug mode, uncomment this) # *.logs ### JetBrains template # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - # User-specific stuff .idea/**/workspace.xml .idea/**/tasks.xml .idea/**/dictionaries .idea/**/shelf - # Sensitive or high-churn files .idea/**/dataSources/ .idea/**/dataSources.ids @@ -177,101 +149,74 @@ venv.bak/ .idea/**/misc.xml .idea/**/vcs.xml .idea/*.iml - # Let's allow shared run configurations !**/.idea/**/runConfigurations/ - # Gradle .idea/**/gradle.xml .idea/**/libraries - # CMake cmake-build-debug/ cmake-build-release/ - # Mongo Explorer plugin .idea/**/mongoSettings.xml - # File-based project format *.iws - # IntelliJ out/ - # mpeltonen/sbt-idea plugin .idea_modules/ - # JIRA plugin atlassian-ide-plugin.xml - # Cursive Clojure plugin .idea/replstate.xml - # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties fabric.properties - # Editor-based Rest Client .idea/httpRequests ### R template # History files .Rhistory .Rapp.history - # Session Data files .RData - # Example code in package build process *-Ex.R - # Output files from R CMD build /*.tar.gz - # Output files from R CMD check /*.Rcheck/ - # RStudio files .Rproj.user/ .Ruserdata - # produced vignettes vignettes/*.html vignettes/*.pdf - # OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 .httr-oauth - # knitr and R markdown default cache directories /*_cache/ /cache/ - # Temporary files created by R markdown *.utf8.md *.knit.md - # Shiny token, see https://shiny.rstudio.com/articles/shinyapps.html rsconnect/ - - */.idea/* - api_service/docs_src/seattle_flu*rst data/* .pg_service.conf .pgpass - #Models database and local folder model_data/* models.db modelDB.tsv - # Package archives dbViewR_*.tar.gz modelServR_*.tar.gz incidenceMapR_*.tar.gz - # Test directories test_model_store/* plots/* @@ -279,3 +224,4 @@ test_jobs/* plots/* july_22_plots/* may_22_plots/* +.modelStoreToken diff --git a/dbViewR/NAMESPACE b/dbViewR/NAMESPACE index e529185..5020a44 100644 --- a/dbViewR/NAMESPACE +++ b/dbViewR/NAMESPACE @@ -2,6 +2,7 @@ export(addCensusData) export(expandDB) +export(loadBingData) export(masterSpatialDB) export(selectFromDB) import(DBI) @@ -11,7 +12,9 @@ import(geojsonio) import(jsonlite) import(lubridate) import(rgdal) +import(rgeos) import(sf) +import(sp) import(tidycensus) import(tidyr) importFrom(RCurl,getURL) diff --git a/incidenceMapR/man/smoothModel.Rd b/incidenceMapR/man/smoothModel.Rd index 190b5ad..993ab41 100644 --- a/incidenceMapR/man/smoothModel.Rd +++ b/incidenceMapR/man/smoothModel.Rd @@ -1,11 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/smoothModel - Copy.R, R/smoothModel.R +% Please edit documentation in R/smoothModel.R \name{smoothModel} \alias{smoothModel} \title{smoothModel: function to define variable smoothing models from dbViewR object} \usage{ -smoothModel(db, shp, family = NULL, neighborGraph = NULL) - smoothModel(db, shp, family = NULL, neighborGraph = NULL) } \arguments{ @@ -16,25 +14,9 @@ Smoothing only makes sense by age, location, and time. Factor variables cannot \item{family}{non-standard family override (default = NULL).} -\item{neighborGraph}{non-standard neighbor graph (default = NULL)} - -\item{db}{dbViewR object with valid column names for INLA model. -Smoothing only makes sense by age, location, and time. Factor variables cannot be smoothed!} - -\item{shp}{sf object with residence_census_tract shapes (all higher levels assume iid and not local smoothing)} - -\item{family}{non-standard family override (default = NULL).} - \item{neighborGraph}{non-standard neighbor graph (default = NULL)} } \value{ -modelDefinition object for modelTrainR, list with fields - type = smooth - family : as input - formula : model definition for INLA - inputData : inla-prepared db$observed data - neighborGraph : as input or derived from shp during formula construction - modelDefinition object for modelTrainR, list with fields type = smooth family : as input @@ -43,15 +25,10 @@ modelDefinition object for modelTrainR, list with fields neighborGraph : as input or derived from shp during formula construction } \description{ -smoothModel: function to define variable smoothing models from dbViewR object - smoothModel: function to define variable smoothing models from dbViewR object } \examples{ return h1n1pdm incidence model by time and location modelDefinition <- smoothModel(db = dbViewR::selectFromDB(), shp = dbViewR::masterSpatialDB()) -return h1n1pdm incidence model by time and location - modelDefinition <- smoothModel(db = dbViewR::selectFromDB(), shp = dbViewR::masterSpatialDB()) - } diff --git a/modelServR/NAMESPACE b/modelServR/NAMESPACE index 4d7f13a..f2e5174 100644 --- a/modelServR/NAMESPACE +++ b/modelServR/NAMESPACE @@ -1,5 +1,16 @@ # Generated by roxygen2: do not edit by hand +export(getHumanReadableModelIdFromModel) +export(getHumanReadableModelIdFromQuery) +export(getModelIdFromModel) +export(getModelIdFromQuery) +export(getModelQueryObjectFromModel) +export(getModelQueryObjectFromQuery) +export(loadModelFileById) +export(queryLoadedModel) +export(queryModelById) +export(returnModel) +export(saveModel) import(digest) import(jsonlite) import(logging) diff --git a/modelTestR/NAMESPACE b/modelTestR/NAMESPACE index 92588ac..5cb0994 100644 --- a/modelTestR/NAMESPACE +++ b/modelTestR/NAMESPACE @@ -1,9 +1,12 @@ # Generated by roxygen2: do not edit by hand -export(ggplotSmoothEffects) +export(ggplotDiagnosticPlots) +export(ggplotFixedEffects) export(ggplotLatentMap) +export(ggplotSmoothEffects) export(ggplotSmoothMap) export(ggplotSmoothSequential) +import(INLAutils) import(dplyr) import(ggplot2) import(grid) diff --git a/modelTestR/man/ggplotSmoothEffects.Rd b/modelTestR/man/ggplotSmoothEffects.Rd index a1c181d..ead5f23 100644 --- a/modelTestR/man/ggplotSmoothEffects.Rd +++ b/modelTestR/man/ggplotSmoothEffects.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/ggplotWrappers.R \name{ggplotSmoothEffects} \alias{ggplotSmoothEffects} -\title{ggplotSmoothEffects: function for plotting data, smoothed model, and fixed effects model next to each other} +\title{ggplotSmoothEffects: function for plotting smoothed model and fixed effects model next to each other} \usage{ ggplotSmoothEffects(model_smooth, model_effects, shp, censusdb = NULL, title = "", shape_level = "residence_census_tract") @@ -14,12 +14,9 @@ ggplotSmoothEffects(model_smooth, model_effects, shp, censusdb = NULL, ggplot object } \description{ -NOT YET IMPLEMENTED! +ggplotSmoothEffects: function for plotting smoothed model and fixed effects model next to each other } \examples{ -plotDat <- right_join(model$modeledData,shp, by=c('residence_census_tract')) -plotDat$positive[plotDat$positive==0]<-NaN -ggplotSmoothSequential(plotDat) }