alexdum commited on
Commit
40adfb6
·
1 Parent(s): 0962165

feat: Initial setup for JMA Weather Explorer, including README, Dockerfile, and Hugging Face deployment workflow.

Browse files
Files changed (3) hide show
  1. .github/workflows/main.yml +49 -0
  2. Dockerfile +29 -0
  3. README.md +13 -0
.github/workflows/main.yml ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face Hub
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ sync-to-hub:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ with:
14
+ fetch-depth: 0
15
+ lfs: true
16
+
17
+ - name: Configure Git user
18
+ run: |
19
+ git config --global user.email "alexandru.dumitrescu@gmail.com"
20
+ git config --global user.name "alexdum"
21
+
22
+ - name: Install Git LFS
23
+ run: |
24
+ sudo apt-get update
25
+ sudo apt-get install git-lfs
26
+ git lfs install
27
+
28
+ - name: Track data folder with Git LFS
29
+ run: |
30
+ tracked=false
31
+ if ! git lfs track --list | grep -Fq "data/**"; then
32
+ git lfs track "data/**"
33
+ tracked=true
34
+ fi
35
+ if [ "$tracked" = true ]; then
36
+ git add .gitattributes
37
+ git commit -m "Configure Git LFS for data folder"
38
+ fi
39
+
40
+ - name: Add and commit any changes
41
+ run: |
42
+ git add .
43
+ git diff-index --quiet HEAD || git commit -m "Sync data files for Hugging Face"
44
+
45
+ - name: Push to Hugging Face
46
+ env:
47
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
48
+ run: |
49
+ git push -f https://alexdum:$HF_TOKEN@huggingface.co/spaces/alexdum/jma main
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM rocker/shiny-verse:latest
2
+
3
+ WORKDIR /code
4
+
5
+ # Install R packages
6
+ # listed explicitly to ensure all dependencies are met
7
+ RUN install2.r --error \
8
+ shiny \
9
+ bslib \
10
+ bsicons \
11
+ leaflet \
12
+ dplyr \
13
+ readr \
14
+ DT \
15
+ plotly \
16
+ ggplot2 \
17
+ shinyjs \
18
+ later \
19
+ htmltools \
20
+ rvest \
21
+ stringr \
22
+ lubridate \
23
+ purrr \
24
+ jsonlite \
25
+ curl
26
+
27
+ COPY . .
28
+
29
+ CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
README.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: JMA Weather Explorer
3
+ emoji: 🇯🇵
4
+ colorFrom: blue
5
+ colorTo: white
6
+ sdk: docker
7
+ app_port: 7860
8
+ ---
9
+
10
+ # JMA Weather Explorer
11
+
12
+ Explore Japanese Meteorological Agency (JMA) weather data including daily, hourly, and 10-minute resolutions.
13
+ Interactive map visualization and data downloading included.