What is the problem?
The init-db.js script only appears to save the values 0 or 1 in the database. But, the density values in the JSON can be numbers between 0 and 1, such as 0.3737244897959184.
Steps to reproduce problem
- Download {F37103087}
- Put it in the /tmp folder in your ipoid directory
- Start ipoid if it is not already running (e.g. docker-compose up -d), you might need to wait for it to start
- Run docker-compose exec -e FEED_PATH=./tmp/density_reprod.json.gz web node init-db.js
- Access the ipoid database (e.g. docker-compose exec db mysql -u root -p)
- Enter USE test and then SELECT ip, conc_density FROM actor_data;
Expected behavior: Value of conc_density is 0.3737244897959184.
Observed behavior: Value is 0.
Environment
ipoid: commit 8400f97f21ff3aa3bae82fb33dfdd4d5369075f4