irie 0.0.42__py3-none-any.whl → 0.0.43__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of irie might be problematic. Click here for more details.

Files changed (49) hide show
  1. irie/apps/inventory/archive/CESMD.py +0 -0
  2. irie/apps/inventory/models.py +27 -0
  3. irie/apps/inventory/services/render.py +0 -0
  4. irie/apps/inventory/urls.py +3 -0
  5. irie/apps/inventory/views.py +57 -0
  6. irie/apps/prediction/forms.py +2 -1
  7. irie/apps/prediction/models.py +24 -0
  8. irie/apps/prediction/urls.py +5 -3
  9. irie/apps/prediction/views.py +101 -8
  10. irie/apps/static/assets/css/brace.css +0 -32
  11. irie/apps/static/assets/css/brace.css.map +1 -1
  12. irie/apps/static/assets/css/brace.min.css +1 -1
  13. irie/apps/templates/inventory/asset-on-map.html +457 -0
  14. irie/apps/templates/inventory/asset-profile.html +1 -2
  15. irie/apps/templates/inventory/map-inventory.html +136 -0
  16. irie/apps/templates/inventory/map-inventory2.html +143 -0
  17. irie/apps/templates/inventory/map-single-asset.html +0 -0
  18. irie/apps/templates/inventory/map-single-asset2.html +618 -0
  19. irie/apps/templates/inventory/map-terrain.html +214 -0
  20. irie/apps/templates/inventory/sensor-upload.html +1 -0
  21. irie/apps/templates/inventory/three-maps.html +229 -0
  22. irie/apps/templates/layouts/base.html +1 -0
  23. irie/apps/templates/prediction/predictor-upload.html +68 -22
  24. irie/apps/templates/site/index.html +36 -27
  25. irie/apps/templates/site/page-400-sidebar.html +31 -0
  26. irie/apps/templates/site/page-400.html +29 -0
  27. irie/apps/templates/site/page-404-sidebar.html +1 -1
  28. irie/apps/templates/site/page-404.html +1 -1
  29. irie/fhwa/__init__.py +132 -0
  30. irie/fhwa/__main__.py +79 -0
  31. irie/fhwa/fields/nbi001.py +61 -0
  32. irie/fhwa/fields/nbi001b.py +1 -0
  33. irie/fhwa/fields/nbi002.py +0 -0
  34. irie/fhwa/fields.py +32 -0
  35. irie/init/__main__.py +0 -4
  36. irie/init/calid.py +86 -3
  37. irie/init/getNBIData.py +1 -1
  38. irie/init/management/commands/init_assets.py +11 -11
  39. irie/init/management/commands/init_predictors.py +1 -1
  40. irie/init/management/commands/make_asset.py +0 -0
  41. {irie-0.0.42.dist-info → irie-0.0.43.dist-info}/METADATA +1 -1
  42. {irie-0.0.42.dist-info → irie-0.0.43.dist-info}/RECORD +46 -31
  43. {irie-0.0.42.dist-info → irie-0.0.43.dist-info}/WHEEL +1 -1
  44. irie/apps/inventory/CESMD.py +0 -81
  45. irie/apps/inventory/archive/arcGIS.py +0 -1175
  46. irie/apps/inventory/traffic.py +0 -175052
  47. /irie/apps/inventory/{calid.py → archive/calid.py} +0 -0
  48. {irie-0.0.42.dist-info → irie-0.0.43.dist-info}/entry_points.txt +0 -0
  49. {irie-0.0.42.dist-info → irie-0.0.43.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,143 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8"/>
5
+ <title>D3 Map – California Outline & Markers</title>
6
+ <script src="https://d3js.org/d3.v7.min.js"></script>
7
+ <style>
8
+ html, body {
9
+ margin: 0;
10
+ padding: 0;
11
+ height: 100%;
12
+ }
13
+ /* The container for the SVG */
14
+ #map {
15
+ width: 100%;
16
+ height: 100%;
17
+ }
18
+ /* --- Marker Styles --- */
19
+ /* Partial markers: small gray circles */
20
+ .marker-partial {
21
+ fill: #929292;
22
+ stroke: #555;
23
+ stroke-width: 1;
24
+ }
25
+ /* Complete markers: beige teardrop shape with drop shadow */
26
+ .marker-complete {
27
+ filter: url(#drop-shadow);
28
+ fill: #febf80;
29
+ stroke: #000;
30
+ stroke-width: 1;
31
+ }
32
+ /* Instrumented markers: blue teardrop shape with drop shadow */
33
+ .marker-instrumented {
34
+ filter: url(#drop-shadow);
35
+ fill: #2f9ad4;
36
+ stroke: #000;
37
+ stroke-width: 1;
38
+ }
39
+ </style>
40
+ </head>
41
+ <body>
42
+ <!-- The container holds the marker data via a data attribute -->
43
+ <div id="map" data-bridges='{{ data|safe }}'></div>
44
+
45
+ <script>
46
+ // Select the container and parse marker data from its data attribute.
47
+ const container = d3.select("#map");
48
+ const bridgesData = JSON.parse(container.attr("data-bridges"));
49
+
50
+ // Get container dimensions.
51
+ const width = container.node().clientWidth;
52
+ const height = container.node().clientHeight;
53
+
54
+ // Append an SVG element that fills the container.
55
+ const svg = container.append("svg")
56
+ .attr("width", width)
57
+ .attr("height", height);
58
+
59
+ // Append a defs element to hold the drop shadow filter.
60
+ const defs = svg.append("defs");
61
+ const filter = defs.append("filter")
62
+ .attr("id", "drop-shadow")
63
+ .attr("height", "130%");
64
+ filter.append("feGaussianBlur")
65
+ .attr("in", "SourceAlpha")
66
+ .attr("stdDeviation", 2)
67
+ .attr("result", "blur");
68
+ filter.append("feOffset")
69
+ .attr("in", "blur")
70
+ .attr("dx", 0)
71
+ .attr("dy", 2)
72
+ .attr("result", "offsetBlur");
73
+ const feMerge = filter.append("feMerge");
74
+ feMerge.append("feMergeNode").attr("in", "offsetBlur");
75
+ feMerge.append("feMergeNode").attr("in", "SourceGraphic");
76
+
77
+ // Load the California outline GeoJSON.
78
+ d3.json("/california.json").then(california => {
79
+ // Create a projection that fits the California GeoJSON into the SVG.
80
+ const projection = d3.geoMercator().fitSize([width, height], california);
81
+ const path = d3.geoPath().projection(projection);
82
+
83
+ // Draw the California outline.
84
+ svg.append("path")
85
+ .datum(california)
86
+ .attr("d", path)
87
+ .attr("fill", "none")
88
+ .attr("stroke", "#000")
89
+ .attr("stroke-width", 3);
90
+
91
+ // Helper: project a marker's [lon, lat] to [x, y] in the SVG.
92
+ const projectPoint = d => projection([d.lon, d.lat]);
93
+
94
+ // ----- Draw Partial markers as circles -----
95
+ svg.selectAll("circle.marker-partial")
96
+ .data(bridgesData.Partial)
97
+ .enter()
98
+ .append("circle")
99
+ .attr("class", "marker-partial")
100
+ .attr("r", 3)
101
+ .attr("cx", d => projectPoint(d)[0])
102
+ .attr("cy", d => projectPoint(d)[1]);
103
+
104
+ // Define the teardrop marker shape as a reusable path string.
105
+ const teardropPath = "M15 0C8.383 0 3 5.383 3 12c0 8.25 12 24.75 12 24.75S27 20.25 27 12c0-6.617-5.383-12-12-12zM15 16.4c-2.427 0-4.4-1.973-4.4-4.4 0-2.427 1.973-4.4 4.4-4.4 2.427 0 4.4 1.973 4.4 4.4 0 2.427-1.973 4.4-4.4 4.4z";
106
+
107
+ // ----- Draw Instrumented markers (blue teardrop) -----
108
+ // These will be scaled to a width of ~20px (original viewBox width is 30).
109
+ svg.selectAll("path.marker-instrumented")
110
+ .data(bridgesData.Instrumented)
111
+ .enter()
112
+ .append("path")
113
+ .attr("class", "marker-instrumented")
114
+ .attr("d", teardropPath)
115
+ .attr("transform", d => {
116
+ const [x, y] = projectPoint(d);
117
+ const scale = 20 / 30; // scale down to 20px width
118
+ // The teardrop shape is defined in a 30x44 viewBox; its tip is at (15,44).
119
+ // We shift so the tip aligns with the projected [x,y].
120
+ return `translate(${x - 15 * scale}, ${y - 44 * scale}) scale(${scale})`;
121
+ });
122
+
123
+ // ----- Draw Complete markers (beige teardrop) -----
124
+ svg.selectAll("path.marker-complete")
125
+ .data(bridgesData.Complete)
126
+ .enter()
127
+ .append("path")
128
+ .attr("class", "marker-complete")
129
+ .attr("d", teardropPath)
130
+ .attr("transform", d => {
131
+ // In the original code, complete markers are offset slightly in latitude (+0.2).
132
+ // Compute the projected offset.
133
+ const [x, y] = projectPoint(d);
134
+ const shifted = projection([d.lon, d.lat + 0.2]);
135
+ const dy = shifted[1] - y;
136
+ // Use the full size (30px wide) for complete markers.
137
+ const scale = 1;
138
+ return `translate(${x - 15 * scale}, ${y - 44 * scale + dy}) scale(${scale})`;
139
+ });
140
+ });
141
+ </script>
142
+ </body>
143
+ </html>
File without changes