Eumirbago Posted October 21, 2015 Share Posted October 21, 2015 (edited) We wanna be able to download stats of everything. Alliance Stats: - Members - Score - Avg. Score - Beige/Gray - Treasures - Infra - GDP - All Military Nation Stats: - # of Cities - Total Military - Score - Infra - Infra Destroyed Update twice a day I guess? ilu Sheepy Edited October 21, 2015 by Eumirbago 4 Quote Link to comment Share on other sites More sharing options...
Administrators Alex Posted October 21, 2015 Administrators Share Posted October 21, 2015 You are aware that this information is available in the APIs, correct? While it doesn't output a file that you can download, you can easily grab the info. For example: Alliance: https://politicsandwar.com/api/alliance/id=831 Nation: https://politicsandwar.com/api/nation/id=10838 Quote Is there a bug? Report It | Not understanding game mechanics? Ask About It | Got a good idea? Suggest ItForums Rules | Game Link Link to comment Share on other sites More sharing options...
Dalinar Posted October 21, 2015 Share Posted October 21, 2015 You are aware that this information is available in the APIs, correct? While it doesn't output a file that you can download, you can easily grab the info. For example: Alliance: https://politicsandwar.com/api/alliance/id=831 Nation: https://politicsandwar.com/api/nation/id=10838 On the Alliance API, could you put a list of Nation IDs in the alliance? Quote I will take responsibility for what I have done, if I must fall, I will rise each time a better man. Link to comment Share on other sites More sharing options...
Yosodog Posted October 21, 2015 Share Posted October 21, 2015 On the Alliance API, could you put a list of Nation IDs in the alliance? This would be very helpful and would save from having to scrape the info from the main site. 1 Quote [22:37:51] <&Yosodog> Problem is, everyone is too busy deciding which top gun character they are that no decision has been made BK in a nutshell Link to comment Share on other sites More sharing options...
Kurdanak Posted October 22, 2015 Share Posted October 22, 2015 Alliance Stats: - Members - Score - Avg. Score - Beige/Gray - Treasures - Infra - GDP - All Military I've requested this like, three times. It'd still be really nice to have game-provided downloadable stats that are updated every day at ~12:00 amserver time. Until then, I have to either work through the alliance stat pulls of others or (more often) wake up at 3 AM each night to grab APR stats. 1 Quote Link to comment Share on other sites More sharing options...
Jessica Rabbit Posted November 5, 2015 Share Posted November 5, 2015 A daily csv dump of stats would be very helpful. That way anyone could pull them down and quickly do analytics. This kind of thing is critical for alliance management. It would allow us to easily create reports, identify members who need help or evaluate the success of econ programs. Or better yet could we have a public facing url with a complete table of this information that uses a simple structured xpath or html table (like the city management screen)? That way we could develop our own 3rd party analytics dashboards linked directly to it. The most useful tables would be: Nation Stats City Stats (with ruler name, nation name, and nation ID) War Stats (same info as above, with a flag for offense v defense) Bank Transactions (available only with credentials, with same as above and trans note in it's own field, at least a rolling month - 6 mo would be good) Tax Records (same nation data points as above with tax rate and/or daily summary, rolling month?) Trade Stats (same nation data points as above. A rolling week would be enough) I know it's a lot of work to set up, but we'll need this kind of easy data access to develop our own reports, apps and widgets necessary to manage large AAs as the game grows. Thanks Sheepy _jess Quote Link to comment Share on other sites More sharing options...
Valdoroth Posted November 6, 2015 Share Posted November 6, 2015 I would like to be able to download all bank records for my alliance, including taxes. 1 Quote Link to comment Share on other sites More sharing options...
Yosodog Posted November 6, 2015 Share Posted November 6, 2015 A daily csv dump of stats would be very helpful. That way anyone could pull them down and quickly do analytics. This kind of thing is critical for alliance management. It would allow us to easily create reports, identify members who need help or evaluate the success of econ programs. Or better yet could we have a public facing url with a complete table of this information that uses a simple structured xpath or html table (like the city management screen)? That way we could develop our own 3rd party analytics dashboards linked directly to it. The most useful tables would be: Nation Stats City Stats (with ruler name, nation name, and nation ID) War Stats (same info as above, with a flag for offense v defense) Bank Transactions (available only with credentials, with same as above and trans note in it's own field, at least a rolling month - 6 mo would be good) Tax Records (same nation data points as above with tax rate and/or daily summary, rolling month?) Trade Stats (same nation data points as above. A rolling week would be enough) I know it's a lot of work to set up, but we'll need this kind of easy data access to develop our own reports, apps and widgets necessary to manage large AAs as the game grows. Thanks Sheepy _jess pls Sheepy. pls. I've had to get really creative to be able to pull it these things. I'm pulling BK's war stats right now and it takes like 10 mins because it has to make like 500 requests Quote [22:37:51] <&Yosodog> Problem is, everyone is too busy deciding which top gun character they are that no decision has been made BK in a nutshell Link to comment Share on other sites More sharing options...
Dan77 Posted November 6, 2015 Share Posted November 6, 2015 If I can pull this info from the API, anyone can! Only thing I've had to scrape is member lists. Would be really nice though if we could have all the nation feed info for players in an alliance from a single API url rather than having to pull individual nations from separate urls. Quote Link to comment Share on other sites More sharing options...
Yosodog Posted November 6, 2015 Share Posted November 6, 2015 If I can pull this info from the API, anyone can! Only thing I've had to scrape is member lists. Would be really nice though if we could have all the nation feed info for players in an alliance from a single API url rather than having to pull individual nations from separate urls. Still gotta scrape for war stats, trade, bank transactions, and tax records unfortunately. Quote [22:37:51] <&Yosodog> Problem is, everyone is too busy deciding which top gun character they are that no decision has been made BK in a nutshell Link to comment Share on other sites More sharing options...
Dan77 Posted November 6, 2015 Share Posted November 6, 2015 Still gotta scrape for war stats, trade, bank transactions, and tax records unfortunately. Yeah. I'm not so interested in that stuff. I'm mostly looking at nation and alliance stats. Bank transactions and tax is relatively easily copy pasted but a csv file would be quicker and easier. War stats would be cool though. Quote Link to comment Share on other sites More sharing options...
Valdoroth Posted November 8, 2015 Share Posted November 8, 2015 Yeah. I'm not so interested in that stuff. I'm mostly looking at nation and alliance stats. Bank transactions and tax is relatively easily copy pasted but a csv file would be quicker and easier. War stats would be cool though. Not for excel. It seems to hate the format and I can never get it to paste with specific breakers. Do I just not know some extra setting with Excel copy+pasting from the web? Quote Link to comment Share on other sites More sharing options...
Greatnate Posted November 8, 2015 Share Posted November 8, 2015 Not for excel. It seems to hate the format and I can never get it to paste with specific breakers. Do I just not know some extra setting with Excel copy+pasting from the web? HTML tables are easily handled with the data from web option (google sheets importHTML is a little nicer). Copy-paste bank information is easy if you discard the source formatting. Maybe if you're more specific with your problem we can be more helpful. Quote Link to comment Share on other sites More sharing options...
Shakyr Posted November 9, 2015 Share Posted November 9, 2015 pls Sheepy. pls. I've had to get really creative to be able to pull it these things. I'm pulling BK's war stats right now and it takes like 10 mins because it has to make like 500 requestsIf you're using PHP, lookup rollingcurlx, for concurrent curl requests. I use it for accessing API as well as for scraping other pages. I don't have anything going over a minute yet, for my cron jobs, tracking 135 alliances and 608 nations. Also split out your cron jobs (or however you're updating) and run them separately, so you're not updating all the data from a single script. Quote Link to comment Share on other sites More sharing options...
Yosodog Posted November 9, 2015 Share Posted November 9, 2015 If you're using PHP, lookup rollingcurlx, for concurrent curl requests. I use it for accessing API as well as for scraping other pages. I don't have anything going over a minute yet, for my cron jobs, tracking 135 alliances and 608 nations. Also split out your cron jobs (or however you're updating) and run them separately, so you're not updating all the data from a single script. Interesting. I've been using regular curl for requests that require being logged in. Everything that only uses the API (with little scraping) doesn't take too long but things like war stats does. Thanks for this though. Rollingcurlx looks really good so far. Quote [22:37:51] <&Yosodog> Problem is, everyone is too busy deciding which top gun character they are that no decision has been made BK in a nutshell Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.