diff --git a/backend/db/garbage.csv b/admin_panel/garbage.csv similarity index 100% rename from backend/db/garbage.csv rename to admin_panel/garbage.csv diff --git a/backend/db/garbage_cans.csv b/admin_panel/garbage_cans.csv similarity index 97% rename from backend/db/garbage_cans.csv rename to admin_panel/garbage_cans.csv index 8f94036..06b61a9 100644 --- a/backend/db/garbage_cans.csv +++ b/admin_panel/garbage_cans.csv @@ -53,4 +53,4 @@ garbage_can_id,created_at,updated_at,deleted_at,latitude,longitude,note,burnable 52,2024-11-06,,,35.69125,139.7020556,ペットボトル・カン,0,0,1,0 53,2024-11-14,,,35.69125,139.7020556,ペットボトル・カン・ビン,0,0,1,0 54,2024-11-02,,,35.69130556,139.7088333,ペットボトル・カン・ビン,0,0,1,0 -55,2024-11-03,,,35.69138889,139.6990556,灰皿,0,0,0,1 \ No newline at end of file +55,2024-11-03,,,35.69138889,139.6990556,灰皿,0,0,0,1 diff --git a/admin_panel/sample_cans.csv b/admin_panel/sample_cans.csv new file mode 100644 index 0000000..535e3b1 --- /dev/null +++ b/admin_panel/sample_cans.csv @@ -0,0 +1,56 @@ +garbage_can_id,created_at,updated_at,deleted_at,latitude,longitude,note,burnable,non_burnable,bottles_cans,ashtray +1,2024-11-01,,,35.689207, 139.761330,燃えるゴミ,1,0,0,0 +2,2024-11-11,,,35.686875, 139.762227,ペットボトル・カン・ビン,0,0,1,0 +3,2024-10-31,,,35.685369, 139.761808,ペットボトル・カン・ビン,0,0,1,0 +4,2024-11-04,,,35.684737, 139.763662,ペットボトル・カン・ビン,0,0,1,0 +5,2024-11-11,,,35.684446, 139.766294,ペットボトル・カン,0,0,1,0 +6,2024-11-05,,,35.686972, 139.770102,ペットボトル・カン,0,0,1,0 +7,2024-11-02,,,35.690033, 139.770980,燃えるゴミ・燃えないゴミ,1,1,0,0 +8,2024-11-04,,,35.691150, 139.767929,ペットボトル・カン,0,0,1,0 +9,2024-11-06,,,35.693239, 139.765477,ペットボトル・カン,0,0,1,0 +10,2024-10-31,,,35.695085, 139.768109,ペットボトル・カン・ビン・紙類,0,0,1,0 +11,2024-11-13,,,35.695571, 139.758718,ペットボトル・カン,0,0,1,0 +12,2024-11-01,,,35.697417, 139.762785,燃えるゴミ・燃えないゴミ,1,1,0,0 +13,2024-11-06,,,35.693482, 139.761708,ペットボトル・カン,0,0,1,0 +14,2024-11-12,,,35.693336, 139.759136,ペットボトル・カン,0,0,1,0 +15,2024-11-03,,,35.690276, 139.756983,ペットボトル・カン,0,0,1,0 +16,2024-11-02,,,35.694453, 139.758817,燃えるゴミ・燃えないゴミ,1,1,0,0 +17,2024-11-02,,,35.680073, 139.762087,ペットボトル・カン,0,0,1,0 +18,2024-11-03,,,35.677741, 139.763742,燃えるゴミ・燃えないゴミ,1,1,0,0 +19,2024-11-13,,,35.677255, 139.765596,ペットボトル・カン,0,0,1,0 +20,2024-11-05,,,35.676089, 139.770182,ペットボトル・カン,0,0,1,0 +21,2024-11-13,,,35.676332, 139.773093,ペットボトル・カン,0,0,1,0 +22,2024-11-14,,,35.678275, 139.774529,ペットボトル・カン,0,0,1,0 +23,2024-11-14,,,35.682211, 139.774210,ペットボトル・カン,0,0,1,0 +24,2024-11-08,,,35.683814, 139.775087,灰皿,0,0,0,1 +25,2024-11-04,,,35.688284, 139.773751,ペットボトル・カン,0,0,1,0 +26,2024-11-01,,,35.690664, 139.772435,ペットボトル・カン,0,0,1,0 +27,2024-11-11,,,35.681093, 139.764659,ペットボトル・カン,0,0,1,0 +28,2024-11-14,,,35.681482, 139.770501,ペットボトル・カン,0,0,1,0 +29,2024-11-03,,,35.679830, 139.775087,ペットボトル・カン,0,0,1,0 +30,2024-11-04,,,35.674291, 139.774888,ペットボトル・カン・灰皿,0,0,1,1 +31,2024-11-07,,,35.670987, 139.766434,ペットボトル・カン,0,0,1,0 +32,2024-11-10,,,35.695217, 139.751913,ペットボトル・カン,0,0,1,0 +33,2024-11-14,,,35.697694, 139.750896,ペットボトル・カン,0,0,1,0 +34,2024-11-05,,,35.699054, 139.753288,ペットボトル・カン,0,0,1,0 +35,2024-11-09,,,35.690699, 139.773426,ペットボトル・カン,0,0,1,0 +36,2024-11-05,,,35.698034, 139.773167,ペットボトル・カン,0,0,1,0 +37,2024-11-06,,,35.697403, 139.768840,ペットボトル・カン,0,0,1,0 +38,2024-11-12,,,35.697840, 139.766248,ペットボトル・カン,0,0,1,0 +39,2024-11-10,,,35.696237, 139.766009,ペットボトル・カン,0,0,1,0 +40,2024-11-04,,,35.697403, 139.755462,ペットボトル・カン,0,0,1,0 +41,2024-11-01,,,35.702503, 139.770236,ペットボトル・カン,0,0,1,0 +42,2024-11-07,,,35.704689, 139.770415,燃えるゴミ・燃えないゴミ,1,1,0,0 +43,2024-11-13,,,35.688758, 139.775121,ペットボトル・カン,0,0,1,0 +44,2024-11-02,,,35.684580, 139.773565,ペットボトル・カン,0,0,1,0 +45,2024-11-12,,,35.681568, 139.772190,ペットボトル・カン,0,0,1,0 +46,2024-11-01,,,35.687414, 139.779075,ペットボトル・カン,0,0,1,0 +47,2024-11-01,,,35.694507, 139.762785,ペットボトル・カン,0,0,1,0 +48,2024-11-10,,,35.690669, 139.777181,ペットボトル・カン,0,0,1,0 +49,2024-11-11,,,35.681875, 139.780052,ペットボトル・カン,0,0,1,0 +50,2024-11-03,,,35.687317, 139.778975,ペットボトル・カン,0,0,1,0 +51,2024-11-08,,,35.688677, 139.781348,ペットボトル・カン,0,0,1,0 +52,2024-11-06,,,35.691863, 139.762909,ペットボトル・カン,0,0,1,0 +53,2024-11-14,,,35.697158, 139.765341,ペットボトル・カン・ビン,0,0,1,0 +54,2024-11-02,,,35.697109, 139.770047,ペットボトル・カン・ビン,0,0,1,0 +55,2024-11-03,,,35.689045, 139.777922,灰皿,0,0,0,1 diff --git a/admin_panel/sample_garbage.csv b/admin_panel/sample_garbage.csv new file mode 100644 index 0000000..29ad9cb --- /dev/null +++ b/admin_panel/sample_garbage.csv @@ -0,0 +1,36 @@ +garbage_id,user_id,created_at,updated_at,deleted_at,latitude,longitude,is_discarded,type +1,1,2024-11-11,,,35.695895, 139.762012,0,plastic +2,1,2024-11-12,,,35.697449, 139.762670,0,bottle +3,1,2024-11-06,,,35.696381, 139.760457,0,paper +4,1,2024-11-02,,,35.691037, 139.759440,1,bottle +5,1,2024-11-01,,,35.689337, 139.761154,0,bottle +6,1,2024-11-10,,,35.690454, 139.766458,0,plastic +7,1,2024-11-13,,,35.690017, 139.770087,1,paper +8,1,2024-11-13,,,35.686470, 139.770685,0,can +9,1,2024-11-03,,,35.682827, 139.771343,0,can +10,1,2024-11-08,,,35.683021, 139.764285,0,bottle +11,1,2024-11-03,,,35.691523, 139.762969,1,plastic +12,1,2024-11-10,,,35.691620, 139.773715,0,can +13,1,2024-11-12,,,35.693029, 139.777304,0,paper +14,1,2024-11-01,,,35.688851, 139.777962,1,bottle +15,1,2024-11-08,,,35.686082, 139.778780,1,paper +16,1,2024-11-13,,,35.685693, 139.769568,1,paper +17,1,2024-11-12,,,35.683555, 139.764723,0,plast +18,1,2024-11-14,,,35.687831, 139.763108,1,bottle +19,1,2024-11-08,,,35.694875, 139.759440,0,can +20,1,2024-11-10,,,35.696138, 139.766617,1,bottle +21,1,2024-10-31,,,35.692835, 139.769369,0,can +22,1,2024-10-31,,,35.695798, 139.772719,1,paper +23,1,2024-11-13,,,35.688802, 139.782867,0,plastic +24,1,2024-11-11,,,35.686082, 139.778441,1,pottle +25,1,2024-11-01,,,35.696455, 139.754019,1,paper +26,1,2024-10-31,,,35.697572, 139.755575,1,can +27,1,2024-10-31,,,35.699370, 139.758326,0,bottle +28,1,2024-11-11,,,35.696892, 139.759104,0,paper +29,1,2024-10-31,,,35.702867, 139.765245,0,bottle +30,1,2024-11-12,,,35.690623, 139.766408,0,paper +31,1,2024-11-03,,,35.689409, 139.768840,1,can +32,1,2024-11-14,,,35.685134, 139.771592,0,can +33,1,2024-11-01,,,35.687611, 139.780265,0,bottle +34,1,2024-11-04,,,35.690526, 139.781082,1,plastic +35,1,2024-11-06,,,35.690332, 139.765830,1,plastic diff --git a/admin_panel/streamlit.py b/admin_panel/streamlit.py index cf6ac36..9cbc2cb 100644 --- a/admin_panel/streamlit.py +++ b/admin_panel/streamlit.py @@ -37,9 +37,9 @@ } [data-testid="stMetricLabel"] { - display: flex; - justify-content: center; - align-items: center; + display: flex; + justify-content: center; + align-items: center; } [data-testid="stMetricDeltaIcon-Up"] { @@ -65,8 +65,8 @@ ### # データのロード -garbage_csv_path = "../backend/db/garbage.csv" -garbage_cans_csv_path = "../backend/db/garbage_cans.csv" +garbage_csv_path = "./sample_garbage.csv" +garbage_cans_csv_path = "./sample_cans.csv" df_gb, df_gbcans = load_data(garbage_csv_path=garbage_csv_path, garbage_cans_csv_path=garbage_cans_csv_path) # カラム設定(カラム2を最も太くする) diff --git a/backend/app.py b/backend/app.py index 359f86e..3d6ba3c 100644 --- a/backend/app.py +++ b/backend/app.py @@ -32,11 +32,6 @@ def get_google_provider_cfg(): return requests.get(GOOGLE_DISCOVERY_URL).json() -@app.route("/") -def hello(): - return jsonify({"message": "Hello, Flask!"}) - - @app.route("/login") def login(): # Discover Google's authorization endpoint