User Tools

Site Tools


codes:python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
codes:python [2023/04/25 10:14]
jlsolano [Database access examples (Python)]
codes:python [2023/04/25 10:16]
jlsolano [MATLAB 2015A]
Line 1: Line 1:
 ====== Database access examples ====== ====== Database access examples ======
  
-===== Connection from python =====+==== MATLAB 2013A ==== 
 +A [[http://​rbcce.aemet.es/​svn/​matlab/​get_dss_auth.m|matlab function]] is available for users for understanding the Authentication method. 
 +<code matlab |t get_dss_auth.m>​ 
 +extern> http://​rbcce.aemet.es/​svn/​matlab/​get_dss_auth.m 
 +</​code>​ 
 + 
 + 
 +==== MATLAB 2015A ==== 
 +<code matlab |t Example for Matlab 2015a> 
 +%% to get data in matlab (2015) 
 +% brewer thesaloniki #005 
 +% date    2015-05-10 
 +%  Level 1:​observations 
 + 
 +url2='​http://​eubrewnet.aemet.es/​eubrewnet/​data/​process/​O3L1?​brewerid=005&​date=2015-05-10';​ 
 + 
 +wop=weboptions('​Username',​ '​brewer',​ '​Password',​ '​redbrewer','​ContentType','​json'​);​ 
 + 
 +[data_json]=webread(url2,​ wop); 
 + 
 +header=data_json{1} 
 + 
 +table_dss=cell2table(cat(1,​data_json{2:​end}),'​Variablenames',​header) 
 +</​code>​ 
 + 
 +---- 
 +---- 
 + 
 + 
 +==== Connection from python ==== 
 +A [[http://​rbcce.aemet.es/​svn/​python/​connect_example.py|python script]] is available for users for understanding the Authentication method.
 <code python |t connect_example.py>​ <code python |t connect_example.py>​
 extern> http://​rbcce.aemet.es/​svn/​python/​connect_example.py extern> http://​rbcce.aemet.es/​svn/​python/​connect_example.py
 </​code>​ </​code>​
 +
 +
 +----
 +
codes/python.txt · Last modified: 2023/04/25 11:22 by jlsolano