Skip to content

Commit 70a89b1

Browse files
author
Alam, Maksudul
committed
Updated React + Chat plugins + FlowMap
1 parent 34d51dd commit 70a89b1

16 files changed

+950
-719
lines changed

viz/.gitignore

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# ----------------------------
2+
# React + Vite .gitignore
3+
# ----------------------------
4+
5+
# Node dependencies
6+
node_modules/
7+
8+
# Vite build output
9+
dist/
10+
11+
# Local environment variables
12+
.env
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
# Logs
19+
npm-debug.log*
20+
yarn-debug.log*
21+
yarn-error.log*
22+
pnpm-debug.log*
23+
lerna-debug.log*
24+
25+
# Editor settings
26+
.vscode/
27+
.idea/
28+
*.suo
29+
*.ntvs*
30+
*.njsproj
31+
*.sln
32+
33+
# OS-specific files
34+
.DS_Store
35+
Thumbs.db
36+
37+
# Optional caches
38+
.cache/
39+
vite-cache/
40+
.parcel-cache/
41+
coverage/
42+
43+
# Temporary files
44+
*.tmp
45+
*.log
46+
*.bak
47+
48+
# TypeScript (optional if using TS)
49+
*.tsbuildinfo
50+
51+
# Optional lock files — uncomment if you want to ignore them
52+
# package-lock.json
53+
yarn.lock
54+
# pnpm-lock.yaml
55+
56+
# Local preview build
57+
*.local

viz/geninputfile.py

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,23 @@
22

33
filename = sys.argv[1]
44

5-
with open('module_casedata.js', 'w') as f:
6-
f.write('// ExaGo Viz Input File\n')
7-
f.write('\n')
8-
f.write('module.exports = {\n')
9-
f.write('\n')
10-
f.write('\tget_casedata: function () {\n')
11-
f.write('\t\t\t\tvar inputcasedata = require("./data/' + filename + '");\n')
12-
f.write('\n')
13-
f.write('\t\t\t\tvar casedata0 = {};\n')
14-
f.write('\t\t\t\tcasedata0.geojsondata = {};\n')
15-
f.write('\t\t\t\tcasedata0.nareas = inputcasedata.nareas;\n')
16-
f.write('\t\t\t\tcasedata0.nzones = inputcasedata.nzones;\n')
17-
f.write('\t\t\t\tcasedata0.areas = inputcasedata.areas;\n')
18-
f.write('\t\t\t\tcasedata0.zones = inputcasedata.zones;\n')
19-
f.write('\t\t\t\tcasedata0.geojsondata.type = "FeatureCollection";\n')
20-
f.write(
21-
'\t\t\t\tcasedata0.geojsondata.features = [...inputcasedata.geojsondata.features];\n')
22-
f.write('\t\t\t\treturn casedata0;\n')
23-
f.write('\t\t\t}\n')
24-
f.write('\n')
25-
f.write('};\n')
5+
with open("src/module_casedata.js", "w") as f:
6+
7+
f.write("// ExaGo Viz Input File\n")
8+
f.write("\n")
9+
f.write('import inputcasedata from "../data/' + filename + '" with { type: "json" };\n')
10+
f.write("\n")
11+
f.write("export default {\n")
12+
f.write(" get_casedata() {\n")
13+
f.write(" var casedata0 = {};\n")
14+
f.write("\n")
15+
f.write(" casedata0.geojsondata = {};\n")
16+
f.write(" casedata0.nareas = inputcasedata.nareas;\n")
17+
f.write(" casedata0.nzones = inputcasedata.nzones;\n")
18+
f.write(" casedata0.areas = inputcasedata.areas;\n")
19+
f.write(" casedata0.zones = inputcasedata.zones;\n")
20+
f.write(' casedata0.geojsondata.type = "FeatureCollection";\n')
21+
f.write(" casedata0.geojsondata.features = [...inputcasedata.geojsondata.features];\n")
22+
f.write(" return casedata0;\n")
23+
f.write(" },\n")
24+
f.write("};\n")

viz/index.html

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8">
3+
<head>
4+
<meta charset="UTF-8" />
55
<title>ExaGO viz</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7-
<!-- <link href="node_modules/@blueprintjs/select/lib/css/blueprint-select.css" rel="stylesheet" /> -->
8-
<!-- <link href="node_modules/normalize.css/normalize.css" rel="stylesheet" /> -->
9-
<!-- <link href="node_modules/@blueprintjs/icons/lib/css/blueprint-icons.css" rel="stylesheet" /> -->
10-
<!-- <link href="node_modules/@blueprintjs/core/lib/css/blueprint.css" rel="stylesheet" /> -->
11-
<!-- <link href="node_modules/@blueprintjs/core/dist/blueprint.css" rel="stylesheet" /> -->
127
<link href="node_modules/react-widgets/styles.css" rel="stylesheet" />
138
<link href="index.css" rel="stylesheet" />
14-
<link href="node_modules/react-chat-widget/lib/styles.css" rel="stylesheet" />
15-
<!-- <link href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" rel="stylesheet" />
16-
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> -->
179
<style>
1810
body {margin: 0; font-family: sans-serif; width: 100vw; height: 100vh; overflow: hidden;}
1911
</style>
20-
</head>
21-
<body>
22-
<div id="root"></div>
23-
<script type="text/javascript" src="app.js"></script>
24-
</body>
12+
<meta
13+
name="ExaGO Visualization"
14+
content="ExaGO Visualization"
15+
/>
16+
</head>
17+
<body>
18+
<div id="root"></div>
19+
<script type="module" src="/src/main.jsx"></script>
20+
</body>
2521
</html>

viz/module_casedata.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

viz/module_casedata_default.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

viz/package.json

Lines changed: 43 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,51 @@
11
{
2-
"name": "geojson",
3-
"version": "0.0.0",
2+
"name": "ExaGO-Visualization",
3+
"private": true,
4+
"version": "0.0.1",
5+
"type": "module",
46
"scripts": {
5-
"start-local": "webpack-dev-server --env.local --progress --hot --open",
6-
"start": "webpack-dev-server --progress --hot --open "
7+
"dev": "vite",
8+
"start": "yarn dev",
9+
"build": "tsc && vite build",
10+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
11+
"preview": "vite preview"
712
},
813
"dependencies": {
9-
"@emotion/react": "^11.9.0",
10-
"@emotion/styled": "^11.8.1",
11-
"@flowmap.gl/data": "^8.0.0-alpha.25",
12-
"@flowmap.gl/layers": "^8.0.0-alpha.25",
13-
"@mui/icons-material": "^5.6.2",
14-
"@mui/material": "^5.6.4",
15-
"@turf/turf": "^5.1.6",
16-
"babel-preset-env": "^1.7.0",
17-
"babel-preset-es2015": "^6.24.1",
18-
"bootstrap": "^5.3.0",
19-
"buffer": "^6.0.3",
20-
"chart.js": "^3.5.0",
21-
"core-js": "^3.31.1",
22-
"d3": "^7.8.5",
23-
"d3-scale": "^2.0.0",
24-
"deck.gl": "^8.9.19",
25-
"dotenv": "^16.3.1",
26-
"hnswlib-node": "^1.4.2",
27-
"http": "^0.0.1-security",
28-
"https": "^1.0.0",
29-
"langchain": "^0.0.75",
30-
"net": "^1.0.2",
31-
"node-fetch": "^2.6.12",
32-
"node-gyp": "^10",
33-
"pg": "^8.11.1",
34-
"react": "^18.1.0",
35-
"react-bootstrap": "^2.8.0",
36-
"react-chartjs-2": "^4.1.0",
37-
"react-chat-widget": "^3.1.4",
38-
"react-dom": "^18.1.0",
39-
"react-map-gl": "^5.3.21",
40-
"react-widgets": "^5.8.4",
41-
"sass": "^1.63.6",
42-
"stream": "^0.0.2",
43-
"typeorm": "^0.3.17",
44-
"url": "^0.11.1",
45-
"us": "^2.0.0",
46-
"util": "^0.12.5",
47-
"webpack-node-externals": "^3.0.0",
48-
"zlib": "^1.0.5"
14+
"@deck.gl/mapbox": "^8.9.28",
15+
"@deck.gl/react": "^8.9.28",
16+
"@emotion/react": "^11.14.0",
17+
"@emotion/styled": "^11.14.1",
18+
"@flowmap.gl/data": "^8.0.2",
19+
"@flowmap.gl/layers": "^8.0.2",
20+
"@mui/icons-material": "^7.3.5",
21+
"@mui/material": "^7.3.5",
22+
"@turf/turf": "^7.2.0",
23+
"chart.js": "^4.5.1",
24+
"d3": "^7.9.0",
25+
"d3-fetch": "^3.0.1",
26+
"d3-scale": "^4.0.2",
27+
"deck.gl": "^8.9.28",
28+
"h3-js": "^4.1.0",
29+
"lil-gui": "^0.18.2",
30+
"maplibre-gl": "^4.7.1",
31+
"react": "^19.2.0",
32+
"react-chartjs-2": "^5.3.1",
33+
"react-chatbotify": "^2.4.1",
34+
"react-dom": "^19.2.0",
35+
"react-map-gl": "^7.1.6",
36+
"react-widgets": "^5.8.6",
37+
"us": "^2.0.0"
4938
},
5039
"devDependencies": {
51-
"@babel/core": "^7.4.0",
52-
"@babel/preset-react": "^7.0.0",
53-
"babel-loader": "^8.0.5",
54-
"cross-env": "^7.0.3",
55-
"typescript": "^5.1.6",
56-
"webpack": "^4.20.2",
57-
"webpack-cli": "^3.1.2",
58-
"@webpack-cli/serve":"*",
59-
"webpack-dev-server": "^3.1.1"
40+
"@types/react": "^18.2.18",
41+
"@types/react-dom": "^18.2.7",
42+
"@typescript-eslint/eslint-plugin": "^6.2.1",
43+
"@typescript-eslint/parser": "^6.2.1",
44+
"@vitejs/plugin-react": "^4.0.4",
45+
"eslint": "^8.46.0",
46+
"eslint-plugin-react-hooks": "^4.6.0",
47+
"eslint-plugin-react-refresh": "^0.4.3",
48+
"typescript": "^5.0.2",
49+
"vite": "^7.2.2"
6050
}
6151
}

0 commit comments

Comments
 (0)