spacetimecube
Developed by Murat Çalışkan and Berk Anbaroğlu (c) 2022
Examples of How To Use
Creating Random Points
from spacetimecube import CreateRandomPoints
out_path = r"...\random_points.gpkg"
end = datetime.strptime('2015-02-02 23:59:59',"%Y-%m-%d %H:%M:%S")
start = datetime.strptime('2015-02-02 00:00:01',"%Y-%m-%d %H:%M:%S")
random_points = CreateRandomPoints(numberOfPoint=5000,
maxDate=end,
minDate=start,
minWeight=0,
maxWeight=1,
minX=-74.0184326171875,
maxX=-73.91214752197266,
minY=40.70063018798828,
maxY=40.87299346923828)
random_points.savePoints(path=out_path, driver="GPKG", layerName="ranfom_layer")
Creating Space Time Cube
from spacetimecube import SpaceTimeCube
inputfilepath = "PG: host=%s dbname=%s user=%s password=%s" %(databaseServer,databaseName,databaseUser,databasePW)
outputfolderpath = r"..\output"
timefield = "time"
dateparser="%Y-%m-%d %H:%M:%S"
gridtype="size"
createtiff=True
weight=None
method="local_morans" # local_morans, getis_ord
gridsize=(10,10,10)
stc = SpaceTimeCube(inputfilepath=inputfilepath,
timefield=timefield,
outputfolderpath=outputfolderpath,
dateparser=dateparser,
method=method,
weight=weight,
gridsize=gridsize
)
stc.run()
Creating Plots
from spacetimecube import PlotCube
points = PlotCube(r"..\points.csv")
# or
points = PlotCube(stc.points)
points.plotTemporalChange(xcat=10, ycat=10, useweights=False)
points.plotNeighbors(xcat=10, ycat=10, tcat=10, useweights=False)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spacetimecube-1.3.tar.gz
(11.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spacetimecube-1.3.tar.gz.
File metadata
- Download URL: spacetimecube-1.3.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2918c3335236ab740a63ad6211a6b6b4f8c43b90fad36c1792822a92e66327ed
|
|
| MD5 |
fa55960ea7ab177b9bfad40d2f4a4b41
|
|
| BLAKE2b-256 |
22b2b34a7b2b999a4ca2f00d2d221409fa379749e5c815d168d9b24d37b0ea91
|
File details
Details for the file spacetimecube-1.3-py3-none-any.whl.
File metadata
- Download URL: spacetimecube-1.3-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57bc0892716b894e66ff33b9f2b1c206bd3f893ffb24c245dfaced5026842782
|
|
| MD5 |
01cff515f5873e7c0680eee2f8d0ce19
|
|
| BLAKE2b-256 |
9611139eb73887a4de4477561206fc9107986df014ecc217a28fd33723e23734
|