-
Notifications
You must be signed in to change notification settings - Fork 21
Windows Setup Instructions
-
First things first install PostgreSql from this link. Install version 9.5.3 selecting either Win x86-32 or Win x86-64 depending if you are 32 bit or 64 bit windows.
-
Go to the location where you installed PostgreSql and goto the data directory (default is
C:\Program Files\PostgreSQL\9.5\data
) From there right clickpg_hba.conf
and select “Open With...” then select notepad. At the bottom of the file add:
host all all \[YOUR IP ADDRESS\]/32 md5
-
Save the file.
-
The version of PostgreSql allows us to add to the package easily via an inbuilt application stack builder. Go to “All Programs” select PostgreSql and select “Application Stack Builder” then select your database from the drop down menu and click Next.
-
Click on the expand button beside “Spatial Extensions” and select the most appropriate PostGIS bundle for your operation system (v2.2.2 32bit or 64bit) and click next and complete the installation, accepting all the defaults and clicking yes with any items that might pop up.
-
Download the newest version of pgAdmin 3 and install it.
-
Once installed open “pgAdmin III” from “All Programs”.
-
Double click the item titled
PostgreSQL 9.5
to connect to the database server. -
On “Login Roles” right click and select “New Login Role”. In “Role name” type “pokemon_go_role” and go to the "Definitions" tab to set the password. Finally, select “Role privileges” along the top and sure all available check boxes are selected on this time then select “OK”.
-
On “Databases” right click and select “New Database…”. In name type “pokemon_go” and select the owner as “pokemon_go_role”. Go to the definition tab and for "Encoding" select UTF8 and click OK.
-
Right click the newly created database and select “Restore…”. Download the pokemon_go_db_backup.tar file from the Pokelyzer Github repo.
-
Back in pgAdmin, select the
...
button next to the Filename box, and in the dialog box that currently says "Backup files...", change it to "All files". Find the file you just downloaded and open it. -
Click Restore and wait a moment, and you should get a
Process returned exit code 0
message. -
Now for the final check go through the pokemon_go database tree to check that there are 6 tables (pokemon_go > Schemas > public > Tables): _meta, date_dimension, pokemon_info, spatial_ref_sys, spotted_pokemon, and time_dimension.
-
That’s the database setup.
Pokemon Go Map installation – Note this has been taken from here
-
Download Python here and install.
-
Download the LTS version of NodeJS here and install. When complete, if you still have your command prompt open, close it and open it again.
-
Create a Pokemon Club account on their official website to be used by the program to search for Pokemon. This generally shouldn't be the same as your main Trainer account you personally use. As of 7/21/2016 this page is unavailable most of the time, refresh the page every 5-10 minutes and it should allow signups eventually. You can also use a Google account. For both services, you can login without ever connecting to the actual game.
-
Then, download one the following branch of PokemonGo-Map, which we'll be using to get data for Pokelyzer: Develop branch. Extract it into the folder of you choice, but try to make sure there are no spaces in the name of any folder in its path (e.g. C:/Users/Name/This Has Spaces And Is Bad/PokemonGo-Map)
Note: The dev branch will have latest features from the development team, however it may be unstable at some times. It's required for the latest version of Pokelyzer.
-
Go into the Tools > Easy Setup folder and run setup.bat. This should install pip and the dependencies for you, and put your Google API key into the right place (follow this wiki entry to obtain a API key). If you spot an error telling you to go to http://aka.ms/vcpython27, do that and install the compiler from there, and then run the setup.bat file again.
-
From where ever you have extracted the Pokemon Go Map open a command prompt (usually by selecting File > Open Command Prompt)
-
To start the server, run the following command: python runserver.py -u [USERNAME] -p [PASSWORD] -st 10 -k [Google Maps API key] -l "[LOCATION]"
Or for Google account: python runserver.py -a google -u [USERNAME] -p [PASSWORD] -st 10 -k [Google Maps API key] -l "[LOCATION]"
Replacing [USERNAME]
and [PASSWORD]
with the Pokemon Club credentials you created previously, and [LOCATION] with any location, for example Washington, D.C or latitude and longitude coordinates, such as 38.9072, 77.0369
.
If you get an error like "No module named SomePackageName", type pip install SomePackageName
and then try to run the server again. Repeat until all the errors go away. If you get a message saying "Please run grunt build", simply run npm install
, which itself runs "grunt build" behind the scenes and takes care of that for you. It may take a few minutes to run.
-
Additionally, you can change the 10 after -st to any number. This number indicates the number of steps away from your location it should look, higher numbers being farther. The higher the number, the longer it takes, however.
-
You can now access the map by opening your browser to http://localhost:5000. Once you've confirmed it works, hit ctrl-c to exit it for now.
Getting Pokelyzer Set Up
- Go to the parent directory of the PokemonGo-Map folder and extract the repo from here in that location
- Open a terminal in that directory and install the dependencies with:
npm install
- Set the required environment variables by either typing these lines one at a time, or editing the sample
windowsBatch.bat
file and dragging it into the Command Prompt and hitting enter.
set DB_NAME=pokemon_go
set DB_USER=pokemon_go_role
set DB_PASS=[Your Pass]
set DB_PORT=5432
set WS_PORT=9876
set ERA=3
- Next, run the Pokelyzer Webhook listener by using this command:
node app.js
- Finally, run your PokemonGo-Map with the additional -wh parameter shown below:
python runserver.py -a ptc -u [Your Username] -p [Your Password] -l "[Your Location]" -st 25 -H 0.0.0.0 -k [Your Google API key] -wh http://localhost:9876
If you go back into pgAdmin, right click the spotted_pokemon
table and view the top 100 rows of data, you should see it being populated!
Pokelyzer also includes language patches for translating Pokemon names into various languages. Following setup, execute the SQL patch of your choice from the language_patches folder.
Many thanks to Matteng0 for putting this together
- Getting Started
- Ubuntu Setup
- Windows Setup
- Apple OS X Setup
- Patches and Fixes
- Applying Patches
- Fixing Timezones
- Advanced Configuration
- Multiple Time Zone Support
- Using with Tableau
- Mapping
- Dimensions and Online Hosting
- Using with Microsoft's Power BI
- Basic Charting and Mapping