R Basics c- combine c(1,2,3,4) - vector(set) of 4 values help.search('input') help.start() apropos("lm") demo() --demonstration example(graphics) - example on functions c(2,3,4,5)^c(2,3) -- right c(2,3,4)^c(2,3) --- wrong Integer Division %/% Modulo divistion -- %% Maximum --- max() Minimum --- min() sum of values --sum() production of values -- prod() numeric or not -- mode(variable)
Posts
- Get link
- X
- Other Apps
Radial Guage custom comopnent <RadialGauge minValue={0} maxValue={360} majorTicks={["N","NE","E","SE","S","SW","W","NW","N"]} minorTicks={22} ticksAngle={360} startAngle={180} strokeTicks={false} highlights={false} colorPlate={"#33a"} colorMajorTicks={"#f5f5f5"} colorMinorTicks={"#ddd"} colorNumbers={"#ccc"} colorNeedle={"rgba(240, 128, 128, 1)"} colorNeedleEnd={"rgba(255, 160, 122, .9)"} valueBox={false} valueTextShadow={false} colorCircleInner={"#fff"} colorNeedleCircleOuter={"#ccc"} needle-circle-size="15" data-needle-circle-outer="false" data-animation-rule="linear" data-needle-type="line" data-needle-start="75" data-needle-end="99" data-ne...
- Get link
- X
- Other Apps
svg creation html file <svg width="60" height="200"> <defs> <linearGradient id="gradient_3" x1="0%" y1="0%" x2="0%" y2="100%" spreadMethod="pad"> <stop offset="0%" stop-color="#2868F1" stop-opacity="1"></stop> <stop offset="50%" stop-color="white" stop-opacity="1"></stop> <stop offset="100%" stop-color="#D1D3D7" stop-opacity="1"></stop> </linearGradient> </defs> <g><rect x="0" y="0" width="60" height="100%" fill="url(#gradient_3)"></rect></g> <g><line x1="0" y1="0" x2="60" y2="0" stroke-width="3" stroke="black"></line></g> <g><circle radius="10" y="0"/...
- Get link
- X
- Other Apps
NetCDF to PostGIS Script Script # Import modules import psycopg2, time, datetime from scipy.io import netcdf # Establish connection db1 = psycopg2.connect("host=xxxx dbname=priogrid user=xxxx password=xxxx") cur = db1.cursor() # Create Table in postgis print str(time.ctime())+ " Creating precipud19002008 table." cur.execute("DROP TABLE IF EXISTS precipud19002008;") cur.execute("CREATE TABLE precipud19002008 (gid serial PRIMARY KEY not null, year int, month int, lon decimal, lat decimal, prec decimal);") # Read netcdf file using the netcdf_file class. 'r' for read. f = netcdf.netcdf_file('/mnt/pc258/prio_grid/source/ClimateData/precipud19002008.nc', 'r') # Create lathash. Read the f.variables['lat'].data.tolist() creates a list of lat coodinates. print str(time.ctime())+ " Looping through lat coords." temp = f.variables['lat'].data.tolist() # Create list of lat coords lathash = {} f...