I am trying to get the current weather conditions for a certain location, but for some reason I always get the conditions for a semi-random day/time (more or less past week). I am using this query: https://query.yahooapis.com/v1/public/yql?q=select%20item.condition%20from%20weather.forecast%20where%20woeid%20%3D%20639660%20AND%20u%3D%22c%22&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=
Even trying out the example query on their website doesn't work for me. When I click on "Current conditions for San Diego, CA" I get the same, random results. Is there any way to get the current conditions?
I am seeing the same thing. It has to be on Yahoo's side. Unfortunately it looks like their support page is down too. Returned a 404
I've also notice the random ( 1 day up to 2 wks) of old data being transmitted
http://xml.weather.yahoo.com/forecastrss/55364_f.xml It seems to change about every 30 seconds
Related
I'm building a Grafana dashboard with some Stat panels that show average, minimum, and maximum time values (see below) for specific fields in my database. I'm storing the data in seconds and setting the value's units to seconds after which the panel displays the time in weeks, days, hours, etc. For the sake of consistency, I would like everything to be shown in days but I haven't been able to find a way to force units for the output value. If it's possible to do this, could someone please point me to some docs, or something that could show me which configurations to make in my panels?
So far, I've tried (without success):
Configure each panel to use units of days
The result of this was that everything showed up in years, etc.
Configure each panel to create a new field by performing a binary calculation where I converted from seconds to days and then I updated the units to be days
The result was that the values were not changed at all -> instead of showing X days, or whatever, it just showed the value in seconds without the units. I'm not sure what I messed up there, but it didn’t change anything.
I found this link that discusses setting a time range for queries
This didn’t end up being useful for what I was trying to do because it was actually geared towards changing the query to a specific date range rather than the output.
I looked through the transformations documentation, stat panel documentation, and a few other panel documentation pages in an effort to see if there was any information on how to do it but I was unable to find anything on forcing the output value to use a specific unit.
Edit:
So I kept messing around with the dashboard and got a solution that works - i.e. it's a "good-enough" solution (see below) - but, now, I'm curious if it's possible to show the units along with the value without it converting it to some other unit. Does anyone have any ideas about this?
One thing to note is that the data for this image is different than the data for the previous one so I'm expecting an inexact conversion to days.
You can use a custom unit. It is a bit tricky to enter the unit in the UI because of the automatic selection but if you enter i.e. "days" (without the quotes) in the Unit field ans instead of leving the field with tab or mouse click use the scrollbar of the combobox and select the last entry "Custom Unit: days".
Hope it helps. And for the record: I am using Garafana 7.1.4
I download adjusted time series from AlphaVantage using the following call (you need to insert your own API key):
https://www.alphavantage.co/query?function=TIME_SERIES_daily_adjusted&symbol=^GDAXI&outputsize=full&apikey=yourAPIkey
Next, I look at one particular (and faulty) data point at date 2003-04-18:
"5. adjusted close": "766464.0000"
Then, I reload the exact same API call and check the same data point again. However, this time there is a different value for adjusted close here! Every time I reload, different value (and always wrong, too). Why is this happening and how do I fix this wrong data?
For those who come across the same problem with AlphaVantage data, I try to answer my own question.
The random data problem only occurs on some (not all) non-trading days. For example, the above date is Good Friday in 2003. I have written a function to filter out all non-trading days from the downloaded AlphaVantage data, and that "fixed" the problem of the random-data days.
I am working with ADs api and using keywordstats.
It worked well, now I am getting some weird responses, or maybe it should be like that.
I created AD 7 days ago, 24 days after using keywordstats and fields like, cpc, actions, impressions, unique_actions returned me good results, matched at what I was seeing on ADS manager. AD was live one day.
Now 6 days after after, actions and unique actions has only one element "attention_event"? Impressions by each interest are also weird, for each I am getting from 1 to 5? In total I have more then 5K impressions, how is this possible? I have tried with specific dates, for one day it returns this weird data, for other days just returns empty response.
Actions fields, 6 days ago contained and events from FB Pixel, now none is returned in response.
Is this supposed to work like this, or I am missing something?
I've also dealt with some bugginess with the keywordstats endpoint.
If you look at the API documentation, you'll see a particular line: "To query from a particular day in the last week:". It seems like Facebook doesn't allow you to query for keywordstats that aren't from the past week. The discrepancy between metrics might arise because of this.
For some more context, I've found that even the last seven days isn't a reliable indicator of retrievable dates. I had to query each date individually (using <API_VERSION>/<AD_ID>/keywordstats?date=YYYY-MM-DD) and see which ones don't return an empty object. The dates that do return a metric are the ones that you should use in your calculations.
I need to do a very large search on Github for a statistic in my thesis.
For example, I need to explore a large number of Android projects on GitHub, but the site limits the search result to 1000 (ex. https://github.com/search?l=java&q=onCreate&ref=searchresults&type=Code&utf8=%E2%9C%93). Also using the Java GitHub API I tried the library org.eclipse.egit.github.core.client.GitHubClient using the method GitHubClient.searchRepositories() but even there the number of results is limited.
Does anyone know how to get all results?
The Search API will return up to 1000 results per query (including pagination), as documented here:
https://developer.github.com/v3/search/#about-the-search-api
However, there's a neat trick you could use to fetch more than 1000 results when executing a repository search. You could split up your search into segments, by the date when the repositories were created. For example, you could first search for repositories that were created in the first week of October 2013, then second week, then September, and so on.
Because you would be restricting search to a narrow period, you will probably get less than 1000 results, and would therefore be able to get all of them. In case you notice that more than 1000 results are returned for a period, you would have to narrow the period even more, so that you can collect all results.
https://help.github.com/articles/searching-repositories/#search-based-on-when-a-repository-was-created-or-last-updated
You should be able to automate this via the API.
If you are searching for all files in Github with filename:your-file-name, you could also slice it with a query attribute : size.
For example, you are looking for all files named test.rb in Github, Github API may return more than 11M results, but you could only get 1000 of them because the GitHub Search API provides up to 1,000 results for each search. An url like : https://api.github.com/search/code?q=filename:test.rb+size:1000..1500 would be able to slice your search by changing size range.
I am attempting to retrieve events from my calendar, the below function works to a degree but only pulls the events over the first week or so (specifically until the 24th of the first month). I was hoping to find someone to help me figure out why.
Here is my code
$query = $service->newEventQuery();
$query->setUser('default');
$query->setVisibility('private');
$query->setProjection('full');
$query->setOrderby('starttime');
$query->setsingleevents('true');
$query->setStartMin('2013-07-14T00:00:00.000-10:00');
$query->setStartMax('2013-09-15T00:00:00.000-10:00');
$query->setSortOrder("ascending");
$eventFeed = $service->getCalendarEventFeed($query)
In the end I had to set max-results as in $query->setMaxResults('1000'); the reason is because apparently Google limits results to 25.
Here is the documentation:
Note: The max-results query parameter for Calendar is set to 25 by
default, so that you won't receive an entire calendar feed by
accident. If you want to receive the entire feed, you can specify a
very large number for max-results.
Found Here -> http://code.google.com/apis/calendar/data/1.0/reference.html#Parameters
P.S.
After figuring out the problem I further searched this forum with the known answer and found another similar question with the same answer, I'm listing this because honestly finding help for the Zend Framework and Google Calendar Api is not the easiest thing to do. It would be benificial to us all if there were a more stardardize way of refferencing these two libraries-> Google calendar query returns at most 25 entries