|
7 | 7 | import math
|
8 | 8 | import datetime as dt
|
9 | 9 | import pandas as pd
|
10 |
| -from dash.dependencies import Input, Output, State, ClientsideFunction |
11 |
| -import dash_core_components as dcc |
12 |
| -import dash_html_components as html |
| 10 | +from dash import html, dcc, Input, Output, State, ClientsideFunction |
13 | 11 |
|
14 | 12 | # Multi-dropdown options
|
15 | 13 | from controls import COUNTIES, WELL_STATUSES, WELL_TYPES, WELL_COLORS
|
|
63 | 61 |
|
64 | 62 |
|
65 | 63 | # Create global chart template
|
66 |
| -mapbox_access_token = "pk.eyJ1IjoicGxvdGx5bWFwYm94IiwiYSI6ImNrOWJqb2F4djBnMjEzbG50amg0dnJieG4ifQ.Zme1-Uzoi75IaFbieBDl3A" |
67 | 64 |
|
68 | 65 | layout = dict(
|
69 | 66 | autosize=True,
|
|
75 | 72 | legend=dict(font=dict(size=10), orientation="h"),
|
76 | 73 | title="Satellite Overview",
|
77 | 74 | mapbox=dict(
|
78 |
| - accesstoken=mapbox_access_token, |
79 |
| - style="light", |
| 75 | + style="open-street-map", |
80 | 76 | center=dict(lon=-78.05, lat=42.54),
|
81 | 77 | zoom=7,
|
82 | 78 | ),
|
|
147 | 143 | dcc.RangeSlider(
|
148 | 144 | id="year_slider",
|
149 | 145 | min=1960,
|
150 |
| - max=2017, |
| 146 | + max=2020, |
| 147 | + marks={i: "{}".format(i) for i in range(1960, 2021, 10)}, |
| 148 | + step=1, |
151 | 149 | value=[1990, 2010],
|
152 | 150 | className="dcc_control",
|
153 | 151 | ),
|
@@ -404,7 +402,7 @@ def update_year_slider(count_graph_selected):
|
404 | 402 |
|
405 | 403 | if count_graph_selected is None:
|
406 | 404 | return [1990, 2010]
|
407 |
| - |
| 405 | + |
408 | 406 | nums = [int(point["pointNumber"]) for point in count_graph_selected["points"]]
|
409 | 407 | return [min(nums) + 1960, max(nums) + 1961]
|
410 | 408 |
|
|
0 commit comments