From ac3897d0f09c70b7a76c4f9bc43db5d3616ffa8c Mon Sep 17 00:00:00 2001 From: Negin Sobhani Date: Fri, 22 Mar 2024 14:19:44 -0600 Subject: [PATCH 1/4] fixing datetime format --- neon_dashboard/models/download.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/neon_dashboard/models/download.js b/neon_dashboard/models/download.js index bb5e36e..95921d8 100644 --- a/neon_dashboard/models/download.js +++ b/neon_dashboard/models/download.js @@ -1,17 +1,24 @@ function table_to_csv(source) { - const columns = Object.keys(source.data) - const nrows = source.get_length() - const lines = [columns.join(',')] + const columns = Object.keys(source.data); + const nrows = source.get_length(); + const lines = [columns.join(',')]; for (let i = 0; i < nrows; i++) { let row = []; for (let j = 0; j < columns.length; j++) { - const column = columns[j] - row.push(source.data[column][i].toString()) + const column = columns[j]; + let cellValue = source.data[column][i]; + // Check if the column name suggests it's a time/date column + // Adjust the condition to fit your specific column naming + if (column.toLowerCase().includes('time') || column.toLowerCase().includes('date')) { + // Assuming UNIX timestamp in milliseconds, adjust accordingly + cellValue = new Date(cellValue).toISOString(); + } + row.push(cellValue.toString()); } - lines.push(row.join(',')) + lines.push(row.join(',')); } - return lines.join('\n').concat('\n') + return lines.join('\n').concat('\n'); } From 9ece58b4e2a4a8fc98c22d53951b9db3c3607a66 Mon Sep 17 00:00:00 2001 From: Negin Sobhani Date: Fri, 22 Mar 2024 14:20:35 -0600 Subject: [PATCH 2/4] updating .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4f6312c..daf5b3c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -__pycache__/ .ipynb_checkpoints build/ +__pycache__/ neon_dashboard/__pycache__/ .venv .vscode/ From 31627987cdcc8d24bc2e62a6d74f8dd069c518d0 Mon Sep 17 00:00:00 2001 From: Negin Sobhani Date: Fri, 22 Mar 2024 14:21:59 -0600 Subject: [PATCH 3/4] removing extra --- .../__pycache__/data_utils.cpython-39.pyc | Bin 8672 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 neon_dashboard/__pycache__/data_utils.cpython-39.pyc diff --git a/neon_dashboard/__pycache__/data_utils.cpython-39.pyc b/neon_dashboard/__pycache__/data_utils.cpython-39.pyc deleted file mode 100644 index 52875acec6f5d5d702a97d2d2e2610ffa5f5ce48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8672 zcmb_hTaO&ab?)2D^j!ABb}z6c#d%@du=tX zM6nY`Z7nq($nYqw$I=O+UML4$YB75mDEtU_bOVX2(7Z4wwWAA7=;+ySD>Tk8R6MKn z>}jGV%+FQKw2p5!QghD@gMBY{oqtyqrD5T^?K@Fq#i4Z=`oh|~^W!~>8dx6&GzKU3 z!eG0>EpNrK^bSU`8|`qJq$4!7yPyh2J8%Yb(o|`2W!PiE1sNx{uJ-)UiSw`d7-Kxb2)bb?g%>y&{P~h$upo&qy_zU( z(cB=jisM69y5$%xFS7iwizv^)NG}e1PWqfFWa8Z_KvG&hLaOHcO@S5K@eczp_8i|EyOHHs zfqQIu0ahdEmaAT1%<2-fa`2GoE!m%e4%PhM;6pup69}=~;+~wd59h-u|LXjX(lA~P zN+kZx;k4JTruA~w(t0`lRL2C6gh56qZo29SVLv^wOSnMPh+MxX2@SGFiAhPF5@Ofi zC~^sp-`&0blgO3P^}y|8Z?EsV(W5vVUOx`yBh-a~Eu84^AatZyED9%f>{0Cb(f05p zHEr7iT5S7u^cuC0D9x%`{KgjwpllcI#&vfX^>@De{`Y2xTIggsB=!=Ec<)l4`p^LwV7GpcV|KBV=Ob6findC#t7R0IO5&Oxaa_ z_WozuM4uS3o&Z#r6{H%cI;RGwmCMSr%A^7!1*KA}o66&j*bvpYlBmzre^h?0JyTT% zYfl5c)|__>VBT{BSCXQk0}g1F3fSt&a9}ys?fp-!p68RQ3t|VyBUi1`_1z~<5YNgK zN_&oTN!T7b@nNB^A5b33pFmyoo=b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y@QE|y^kajzMXpzpd^nXkJMI&QayItt=mbYwv@56Ok;jRJPUEbI;q@X07aN)VW z)jjD>4gUuYd13HTa!*h6tgBNfWdYq#dWZzUn<`&WUlb1lm1SpphEX1Z+E8RdBdUP! zgfM9oXALtQUYvevo7c>=yk>Qsz&dcPH*W<2JpVT{(ee<_NfUp}$eu?d1%;Hu&x0=0 zl@c>kBRBAbeZ(wul6`#Kc9C%J-cZ?_& zHrRleLH>-AzoLYSW9_ZKfbmt${QS<+v=@kb)AP1W`n%Mfk9>TtqvaW>F&fKD}S! zITe)AY0=z@l02lo7C2*xIfFX|ar_o7GU8ZS);y~R6!?I?UZXbw^5ZkbPFK_|H_}F!!wU5IR+7W{|X_pLA#2BXtWN?wO9J_;I zTFtsx#8Rt=?XfW|+7kRbp+uxVlvYb^Y3pi3l`%?laXorp!sMS(pa_Y`V1h^qV4}m- zE?@$a7BInkg2`u<3CH>-2DAyk$@BFkd z3$IPgxDE}Zv3pyG4r0?8btas5GNQG_Tn9uURYz?-sdKHF)Yf+J%V9(?6Oq|h z2Xr1QKZVBw*zLQpIisABqfnBj%18Xf@kbP)BCMaB(;A*9MIuRn=asd$Mo|$MC8V6Q zFj%aaS|DgEc5Wz*(T;v<36&`F_;ZcA*AEP1TT1w>7CXE|RNW)F_ z0S?d4sahX6Pvw2eRiR~rJ_3;_0dtbxoMoYx1!ex<0>p$F z`sm#M%U|nk%$OJpLF$)Jao&}inJ5iGUdA%=F2M%)7UgME*dSlrJJywD1mRC;1G8u& zOy^%fsJ)p*Fy5vPZXii3h;9#0a)b?G`#DkO3{;rQGvcjge>-LWlyDqn8SNfz3n=6s z*?wug%(8RAL2nK`bC8px0&Kgp9%hzh= Date: Wed, 10 Apr 2024 11:51:07 -0600 Subject: [PATCH 4/4] update readme --- README.md | 106 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 60 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 2589d1c..0a8cdea 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,47 @@ -# 📚 Neon Dashboard Readme 📚 +# 📚 NCAR-NEON Dashboard Readme 📚 -Neon Dashboard is a web-based visualization tool for exploring and analyzing neon data. It was created as part of the research project outlined in the paper (** add link). +**To access the NEON Dashboard, please visit the following link: [Neon Dashboard](https://ncar.nationalsciencedatafabric.org/neon-demo/v1/). + +The NCAR-NEON Dashboard provides an interactive visualization interface for visualizing and analyzing data collected by the [National Ecological Observatory Network (NEON)](https://www.neonscience.org/) and compare it with with the Community Terrestrial System Model (CTSM) simulations at those points. It was created as part of the research project outlined in [this paper](https://gmd.copernicus.org/articles/16/5979/2023/gmd-16-5979-2023.pdf). + +This dashboard enables users from anywhere in the world to explore and interact with model outputs and observations on the fly without any requirements for advanced computational resouces. This tool allows users to generate graphs and statistical summaries comparing CTSM simulations and observational data for NEON sites without downloading the observational data or running the model. Users access a Graphical User Interface (GUI) to select individual NEON sites, variables, and output frequencies to visualize. The tool offers different types of interactive visualizations and statistical summaries based on user selections. This interactive visualization dashboard does not require specialist knowledge to operate; therefore, it can be used for educational outreach activities and in classrooms. Moreover, users +can interact with the dashboard using a browser, so it is possible to interact with the plots via a tablet or smartphone. + +Users can customize the plots by selecting different data sources, time periods, and geographic regions. This dashboard is currently hosted on [the National Science Data Fabric (NSDF)](https://nationalsciencedatafabric.org/) and is publicly accessibler + +Besides using the above link to access the NEON Dashboard, you can also run the application on your local machine. This README provides instructions on how to run the NEON Dashboard application using a Docker container or without using a Docker container. + +-------------------------------------------------- + +## How to run the NEON Dashboard application yourself? There are many ways to run this application on your local machine: -## 🚀 Easiest Method: How to Clone Docker Image and Start the Bokeh Application from Docker Hub 📦 +### 🚀 Easiest Method: Using Docker Image Directly! 📦 -To quickly get started with the Neon Dashboard Bokeh application, you can use the easiest method by pulling the pre-built Docker image from Docker Hub. 📦 +To get started with the NEON Dashboard Bokeh application, you can use the easiest method by pulling the pre-built Docker image from Docker Hub. 📦 Open a terminal or command prompt and run the following command to pull the image: ```bash -docker pull negin513/neon-app +docker pull negin513/NEON-app ``` Once the image is pulled successfully, run the Bokeh application in a Docker container with the following command. This will forward the port `8080`, making the application publicly available: 🚀 ```bash -docker run -p 8080:5006 negin513/neon-app +docker run -p 8080:5006 negin513/NEON-app ``` The Bokeh application should now be up and running inside the Docker container. You can access it in your web browser at http://localhost:8080. 🎉🎉🎉 +### How to Run this Application without Docker Container? (using Conda) 🏃 -## 🚀 How to Run with Container? 🚀 - -To run Neon Dashboard using Docker container, follow these steps: - -1. Make sure you have Docker installed on your system. - -2. Clone or download the Neon Dashboard repository from https://github.com/negin513/neon_dashboard. - ``` - git clone https://github.com/negin513/neon_dashboard - ``` - -3. Navigate to the root directory of the cloned/downloaded repository. - ``` - cd neon_dashboard - ``` - -4. Build the Docker image using the provided Dockerfile: - ``` - docker build -t neon-app . - ``` - -5. Once the image is built, run the container with port mapping: - - ``` - docker run -p 5006:5006 neon-app - ``` - -6. The Neon Dashboard should now be accessible in your web browser at `http://localhost:5006`. - -Sure! Here's an additional section on how to run Neon Dashboard without using a Docker container, using Conda for managing the Python environment. +To run NEON Dashboard without using a Docker container, you'll need to have Conda and Python installed on your system. Follow these steps: -## 🏃 How to Run with Conda (Without Docker Container)? 🏃 - -To run Neon Dashboard without using a Docker container, you'll need to have Conda and Python installed on your system. Follow these steps: - -1. lone or download the Neon Dashboard repository from https://github.com/negin513/neon_dashboard. +1. lone or download the NEON Dashboard repository from https://github.com/negin513/NEON_dashboard. ``` - git clone https://github.com/negin513/neon_dashboard + git clone https://github.com/negin513/NEON_dashboard ``` 2. Create a Conda environment and install the required Python packages: @@ -72,7 +53,7 @@ To run Neon Dashboard without using a Docker container, you'll need to have Cond The first command creates a new Conda environment named "neon-env". The second command activates the environment. The third command installs Bokeh and its required dependencies, while the fourth command installs any additional Python packages listed in the requirements.txt file. -3. Once the dependencies are installed, navigate to the root directory of the Neon Dashboard repository and activate the `ncar-env` environment: +3. Once the dependencies are installed, navigate to the root directory of the NEON Dashboard repository and activate the `ncar-env` environment: ``` conda activate neon-env cd neon_dashboard @@ -85,12 +66,45 @@ To run Neon Dashboard without using a Docker container, you'll need to have Cond The `--allow-websocket-origin` flag is used to enable connections from the local host. -5. The Neon Dashboard should now be accessible in your web browser at `http://localhost:5006`. +5. The NEON Dashboard should now be accessible in your web browser at `http://localhost:5006`. + + + + + +### ### 🚀 How to Run with Container? 🚀 + +To run NEON Dashboard using Docker container, follow these steps: + +1. Make sure you have Docker installed on your system. + +2. Clone or download the NEON Dashboard repository from https://github.com/negin513/neon_dashboard. + ``` + git clone https://github.com/negin513/neon_dashboard + ``` + +3. Navigate to the root directory of the cloned/downloaded repository. + ``` + cd neon_dashboard + ``` + +4. Build the Docker image using the provided Dockerfile: + ``` + docker build -t neon-app . + ``` + +5. Once the image is built, run the container with port mapping: + + ``` + docker run -p 5006:5006 neon-app + ``` +6. The NEON Dashboard should now be accessible in your web browser at `http://localhost:5006`. +Sure! Here's an additional section on how to run NEON Dashboard without using a Docker container, using Conda for managing the Python environment. ## 📄 Citing the Paper 📄 -If you use Neon Dashboard in your research or work and want to cite the original paper, please use the following citation format [***]. +If you use NEON Dashboard in your research or work and want to cite the original paper, please use the following citation format [***]. -🎉🎉🎉 Have fun exploring your neon data with Neon Dashboard! 🎉🎉🎉 \ No newline at end of file +🎉🎉🎉 Have fun exploring your NEON data with NEON Dashboard! 🎉🎉🎉 \ No newline at end of file