# Difference between data from the AllenSDK and the webpage

**URL:** <https://community.brain-map.org/t/difference-between-data-from-the-allensdk-and-the-webpage/3834>\
**Category:** Allen Mouse Brain Connectivity Atlas\
**Tags:** api, atlas-mouse-brain-connectivity, allensdk\
**Created:** [November 6, 2024, 3:55pm UTC](https://community.brain-map.org/t/difference-between-data-from-the-allensdk-and-the-webpage/3834 "2024-11-06T15:55:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavideR](https://avatars.discourse-cdn.com/v4/letter/d/3da27b/32.png) [@DavideR](https://community.brain-map.org/u/DavideR)\
**Post date:** [November 6, 2024, 3:55pm UTC](https://community.brain-map.org/t/difference-between-data-from-the-allensdk-and-the-webpage/3834/1 "2024-11-06T15:55:47Z")

</div>

I was downloading some connectivity data through the AllenSKD package. I want to have connection data from all the brain structures, projecting to a specific target, so i did:

```auto
# import libraries and API
from allensdk.core.mouse_connectivity_cache import MouseConnectivityCache
from pathlib import Path

output_dir = './data'

# fetch the data
mcc = MouseConnectivityCache(manifest_file=Path(output_dir) / 'manifest.json')

# hierarchical list of mouse brain structures
structure_tree = mcc.get_structure_tree()

# Get the target structure of interest (SLC)
slc = structure_tree.get_structures_by_acronym(['SLC'])[0]

# Retrieve all experiments (wild-type)
all_exp = mcc.get_experiments(cre=False, injection_structure_ids=None)

# Retrieve unionized data for projections to SLC
proj_to_slc = mcc.get_structure_unionizes(
    [e['id'] for e in all_exp], # projection sources structures (all experiments)
    is_injection=False, # Data for non-injection sites
    structure_ids=[slc['id']], # Target SLC structure
    include_descendants=True
)

```

(please tell me also if its the correct approach, since I’ve modified it a bit from the examples provided from the website).

So, I’ve noticed that the data (of projection\_density) retrieved in this way are different from the value of the same experiments that is possible to download manually directly from the Mouse Connectivity Projection webpage ([webpage](https://connectivity.brain-map.org/)).

Can anyone help me in understanding why? is there any modification done?

to have a more detailed explanation of the situation i’ve also wrote another post [here](https://community.brain-map.org/t/discrepancies-between-connectivity-data-retrieved-via-api-allensdk-and-the-web-portal/3766)

Thank you to everyone who can help me solve those issues!

---

<div class="post-metadata">

**Author:** ![rokkha](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rokkha](https://community.brain-map.org/u/rokkha)\
**Post date:** [May 19, 2025, 11:49am UTC](https://community.brain-map.org/t/difference-between-data-from-the-allensdk-and-the-webpage/3834/2 "2025-05-19T11:49:15Z")

</div>

Hey David  
Are you still working on this issue? I think I have a similar question and the confusion is related to the variable names
