bpbond / cosore

Data, metadata, and software tools for the COSORE database of continuous soil respiration measurements
Creative Commons Attribution 4.0 International
31 stars 10 forks source link

ESSD figures #180

Closed stephpenn1 closed 4 years ago

stephpenn1 commented 4 years ago

Two options for fig 1 (map): image

image

Beginning skeleton for fig 2: image

codecov-io commented 4 years ago

Codecov Report

Merging #180 into master will increase coverage by 0.52%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #180      +/-   ##
==========================================
+ Coverage   97.84%   98.36%   +0.52%     
==========================================
  Files           8        8              
  Lines         741      977     +236     
==========================================
+ Hits          725      961     +236     
  Misses         16       16              
Impacted Files Coverage Δ
R/utils.R 100.00% <0.00%> (ø)
R/parser.R 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 043c038...67169a9. Read the comment docs.

bpbond commented 4 years ago

Here's my code for the leaflet map:

# library(ggplot2)
# library(ggmap)
library(dplyr)
# library(mapdata)

library(leaflet)

x <- read.csv("/Users/d3x290/Dropbox/Documents/Work/Data-ongoing/Soil respiration database/github/srdb/srdb-data.csv")

#mp <- get_map(maptype = "terrain-background")

# Load the library
library(leaflet)

# Note: if you do not already installed it, install it with:
# install.packages("leaflet")

# Background 1: NASA
# m <- leaflet() %>% 
#   addTiles() %>% 
#   setView( lng = 2.34, lat = 48.85, zoom = 5 ) %>% 
#   addProviderTiles("NASAGIBS.ViirsEarthAtNight2012")
# m

df <- data.frame(lon = x$Longitude, lat = x$Latitude, Rh_annual = x$Rh_annual)
df <- subset(df, !is.na(lon) & !is.na(lat))
df_rh <- subset(df, !is.na(Rh_annual))

library(cosore)
csr <- csr_datbase()

# Background 2: World Imagery
m <- leaflet() %>% 
  addProviderTiles("Esri.WorldImagery") %>% 
  addCircleMarkers(lng = df_rh$lon, lat = df_rh$lat, radius = 0.5, color = "red") %>% 
  addCircleMarkers(lng = csr$CSR_LONGITUDE, lat = csr$CSR_LATITUDE)
bpbond commented 4 years ago

By the way @stephpenn1 for figure 2 I was thinking something more like this

Screen Shot 2020-03-23 at 11 58 55 AM

stephpenn1 commented 4 years ago

@bpbond so, you would like more temporal coverage displayed?

bpbond commented 4 years ago

The plot I put up is data density within months over time. There are other ways to do it, and other things to visualize...not sure. Could have data density by latitude, for example.

bpbond commented 4 years ago

@stephpenn1 Can we touch base about this on Tuesday?

stephpenn1 commented 4 years ago

Yes

stephpenn1 commented 4 years ago

Other options to discuss Tuesday (these are rough): image

I do like your idea by latitude image

I do like the idea of showing the data by latitude, will come up with a graph for that as well

bpbond commented 4 years ago

Wow!!!!!!!!! That waffle chart is gorgeous. 😍

stephpenn1 commented 4 years ago

Fig 3: image

still need to reorder the y axis so [-35,-30] is at the bottom, but theres a comment in the code to go back to it later

stephpenn1 commented 4 years ago

And updated Fig 1. image

stephpenn1 commented 4 years ago

Note: most recent updates have been pushed and ready to merge if accepted

bpbond commented 4 years ago

👏 those look great!

So, figure 1 the map; figure 2 the waffle plot; and figure 3 the latitude one? Sounds good.