Python to MATLAB json.load
2 次查看(过去 30 天)
显示 更早的评论
Hello buddies, I need to download automatically from this interface:
Here is the python script which probably does the job:
https://github.com/akrherz/iem/blob/master/scripts/asos/iem_scraper_example.py
I tried to translate it to MATLAB, but I cannot retrieve data from the URL, it just gives some info. Here the initial part of my code:
URL = 'http://mesonet.agron.iastate.edu/cgi-bin/request/asos.pydata=all&tz=Etc/UTC&format=comma&latlon=yes&year1=2012&month1=08&day1=01&year1=2012&month1=09&day1=01'; STATE = 'MN'; NETWROK = 'AWOS%s_ASOS%MN';
%get metadata---------------------------- uri = 'http://mesonet.agron.iastate.edu/geojson/network.php?network=%sAWOS.php';
%HEADER = http_createHeader('referer',uri) %DATA = urlread2(uri,'', '', HEADER) urlread(uri)
ans =
{"type":"FeatureCollection","crs":{"type":"EPSG","properties":{"code":4326,"coordinate_order":[1,0]}},"features":[]}
Any help is really appreciated. Thank you.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!