那些市区做网站群,argo wordpress主题,wordpress显示文章阅读数,搜索引擎营销优化策略有哪些#x1f3af;要点
算法区分不同水循环数据类型#xff1a;地下水、河水、降水、气温和其他#xff0c;并使用相应标准化降水指数、标准化地下水指数、标准化河流水位指数和标准化降水蒸散指数。绘制和计算特定的时间序列比较统计学相关性。使用相关矩阵可视化集水区和显示空…要点
算法区分不同水循环数据类型地下水、河水、降水、气温和其他并使用相应标准化降水指数、标准化地下水指数、标准化河流水位指数和标准化降水蒸散指数。绘制和计算特定的时间序列比较统计学相关性。使用相关矩阵可视化集水区和显示空间信息。
语言内容分比 Python地图表示
Altair 是一个基于 Vega 和 Vega-Lite来自 JS的声明式图形可视化库而 Vega 和 Vega-Lite 又基于 D3.js。它允许将交叉地图与其他类型的图形相关联如以下示例所示
import altair as alt
url_geojson mallorca_geoson.json
data_geojson alt.Data(urlurl_geojson, formatalt.DataFormat(property features,typejjson))
mallorca alt.Chart(data_geojson).mark_geoshape(strokegray, colorwhite, strokeWidth0.5)
#D Data
coord_mask (pluvio.COORD_X 2.2) (pluvio.COORD_X 3.5)\(pluvio.COORD \overline{Y}38.\theta)(pluvio.COORD_
mallorca_pluvio pluvio.\्रoc[coord_mask, : ]
#Plots
brush alt.selection_interval(encodings[longitude, latitude], emptyFalse)
pluviometros alt.Chärt(mallorca_pluvio) \.mark circle(size50)\.encode(longitude COORD X:Q,latitudeCOORD \Y:Q,tooltip[NOMBRE:N, ALTITUD:Q],coloralt.condition(brush, alt.value(red), alt.value(lightgray))) \.project(equalEarth) \.properties(width500, height350) \. add params(brush)
bars alt.Chart(mallorca_pluvio) \.mark_bar() \.encode(xalt.X(ALTITUD:Q),bin(extent[0,700]),y count (ALTITUD):0,coloralt.value(steelblue))left_map mallorca pluviometros
bars_overlay bars.encode(coloralt.value(red)).transform_filter(brush)
right bars alt. layer(bars, bars_overlay)
left_map | (bars right_bars)
为简洁起见下面仅使用 2013 年的数据为每种车辆类型生成一张图表。
import altair as alt
# Base chart
url_geojson mallorca_geoson.json
data_geojson alt. Data(urlurl_geojson, formatalt.DataFormat(propertyfeatures,typejson))
mallorca alt.Chart(data_geojson), mark_geoshape(strokegray, strokeWidth0.2)data data. loc[data. year 2013, :]options [cars, scooters, motorbikes, vans, trucks]
mallorca \.transform_lookup(lookupproperties, neighbourhood,from_alt.LookupData(datadata, keymunicipality, fields[municipality] vehic)) \.encode(alt.Color(alt, repeat(row), typequantitative),tooltip[municipality:N, alt.Tooltip(alt.repeat(row), typequantitative)]) \.project(typeequalEarth) \.properties(width400, height200) \.repeat(rowoptions) \.resolve_scale(colorindependent)
Plotly 允许以与 Altair 提供的类似交互的方式表示地图此外还可以通过 mapbox API 访问 Carto 和 OpenStreet 地图。
import plotly.express as px
fig px.scatter_mapbox(pluvio,latpluvio. COORD Y,lonpluvio.COORD_X,hover_nameNOMBRE,hover dataALTITUD,mapbox_stylecarto-positron,center{lat: 39.5, lon: 2.85},zoom8)
fig.show()下面的交互式地图与 Dash 集成包含额外的交互可让您探索多年来不同车辆的数量。
import json
from dash import Dash, dcc, html, Input, Output
with open(mallorca_geoson.json) as file:mallorca_geoson json.load(file)
app Dash (__name__)
app.layout html.Div([html.H4(Vehicles per 1000 inhab.),html.P(Select a vehicle:),dcc.RadioItems(idmapbox-mallorca geoson-choropleth-x-vehicle,options[cars, scooters, motorbikes, vans, trucks],valuecars,inlineTrue),dcc.Graph(idmapbox-mallorca geoson-choropleth-x-graph),
])
app.callback(Output(mapbox-mallorca_geoson-choropleth-x-graph, figure),Input(mapbox-mallorca_geoson-choropleth-x-vehicle, value))
def display choropleth(vehicle):fig px.choropleth_mapbox(data, geojsonmallorca_geoson, colorvehicle,color continuous scaleViridis,locatīonsmunicípality,featureidkeyproperties.neighbourhood,center{lat: 39.5, lon: 2.85},zoom7.5,animation_frameyear)fig.update_layout(margin{r:0,tt:\theta,l:0,b:0},mapbox_accesstokentoken)return fig
if __name___ __main__:app.run_server (debugTrue)Bokeh 是一个用于创建交互式 JS 可视化的 Python 库它不基于 D3.js。如果 Plotly 与包含 Flask Web 服务器的 Dash 集成那么 Bokeh 则使用 Tornado Web 服务器后者在后端使用 WebSockets。WebSockets 是有状态的且异步的。
from bokeh.io import output_file, show, output_notebook
from bokeh.layouts import column
from bokeh.models import WMTSTileSource, ColumnDataSource, LinearColorMapper, ColorBar, Select, I
HoverTool, PrintfTickFormatter
from bokeh.models.widgets import RadioButtonGroup
from bokeh.palettes import Viridis6
from bokeh.plotting import figure, show
from numpy import pi, tan, log
import json
output notebook()def transform_to_mercator(data, lat, lon):k637813data[x] data[lon] * k * pi / 180.data[y] log(tan((90 data[lat]) * p1 / 360.)) * kreturn databokeh_pluvio transform_to_mercator(pluvio, COORD_Y, COORD_X)
x_range, y_range ((250000, 390000), (4750000, 4850000))
tooltips [(Name, NOMBRE), (Altitud, ALTITUD), ((Lon, Lat), ($x, $y))]
source ColumnDataSource(databokeh_pluvio)
hover HoverTool(tooltipstooltips)
p figure(toolspan, wheel_zoom, hover, reset,x_range x_range,y_rangey_range,x_axis_typemercator,y_axis_typemercator,
)p.circle(sourcesource, fill_colorblue, size10)
urlhttp://a.basemaps.cartocdn.com/rastertiles/voyager/{Z}/{X}/{Y}.png
attribution Credit: Carto, under CC BY 3.0. Data by OSM, under ODbL
p.add_tile(WMTSTileSource(urlurl, attributionattribution))
show(p)
参阅、更新计算思维 | 亚图跨际