layui数据可视化_空间数据可视化 GEOM
1.arcgis api for python 自制点 featurelayer%matplotlibimport matplotlib.pyplot as pltimport numpy as npimport pandas as pdimport mathfrom datetime importdatetime as dtfrom IPython.display import Image,..
1.arcgis api for python 自制点 featurelayer
%matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import math
from datetime import datetime as dt
from IPython.display import Image,HTML
from sklearn.svm import SVR
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics import mean_squared_error, r2_score
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import LSTM , Dense, Activation, Dropout
from tensorflow.keras.optimizers import Adam
import tensorflow.keras.backend as K
from arcgis.gis import GIS
from arcgis.features import SpatialDataFrame
from arcgis.features.analysis import interpolate_points
print("ArcGIS Online Org account")
my_gis = GIS("https://www.arcgis.com", "user ","pass")
import pandas as pd
data = pd.read_csv("./light_flight.csv",index_col=False)
test_data = data.head(30)[['FlightNum','currentlat','currentlon']]
# rename_cols
test_data['longitude'] = test_data['currentlon']
test_data['latitude'] = test_data['currentlat']
test_data = test_data.drop(columns = ['currentlat','currentlon'],axis = 1)
test_data.to_csv("test_data.csv")
# add the csv as an item
import datetime as dt
import os
import shutil
# assign variable to current timestamp to make unique file to add to portal
# test_data.to_csv("test_data.csv")
now = int(dt.datetime.now().timestamp())
item_prop = {'title':'global_flight_cur_test_' + str(now)}
csv_item = my_gis.content.add(item_properties = item_prop, data = "test_data.csv")
csv_item
航线点csv数据集
# 图层 是Feature_layer,
# 服务即图层,->"item" , "item"可以是WebMap、FeatureLayer、ImageLayer等等
# publish the csv item into a feature layer
flight_item = csv_item.publish()
flight_item
数据发布.png
map1 = my_gis.map()
map1.add_layer(flight_item)
map1
添加点元素后的三纬图.png
超级炫酷数据可视化kepler.gl
import json
from keplergl import KeplerGl
import os
with open("./data/geom/****.json","r") as f:
geojson = json.load(f)
map_k = KeplerGl(height = 600)
map_k.add_data(data = geojson, name = 'geojson')
map_k
面图层显示.png
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)